aboutsummaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/js/legacy-notification.js
blob: 7ae258c651be70806e51e24304645c042110e5cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc.
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

/**
 * This only gets loaded if an update is available and the notifications app is not enabled for the user.
 */
window.addEventListener('DOMContentLoaded', function(){
	var text = t('core', '{version} is available. Get more information on how to update.', {version: oc_updateState.updateVersion}),
		element = $('<a>').attr('href', oc_updateState.updateLink).attr('target','_blank').text(text);

	OC.Notification.showHtml(element.prop('outerHTML'), { type: 'error' });
});