legacy-notification.js 661 B

123456789101112131415
  1. /**
  2. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc.
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. /**
  7. * This only gets loaded if an update is available and the notifications app is not enabled for the user.
  8. */
  9. window.addEventListener('DOMContentLoaded', function(){
  10. var text = t('core', '{version} is available. Get more information on how to update.', {version: oc_updateState.updateVersion}),
  11. element = $('<a>').attr('href', oc_updateState.updateLink).attr('target','_blank').text(text);
  12. OC.Notification.showHtml(element.prop('outerHTML'), { type: 'error' });
  13. });