diff --git a/resources/assets/javascripts/bootstrap/system-notifications.js b/resources/assets/javascripts/bootstrap/system-notifications.js deleted file mode 100644 index 7a85fcdbfbce669b45a63051e5016ca3464edfab..0000000000000000000000000000000000000000 --- a/resources/assets/javascripts/bootstrap/system-notifications.js +++ /dev/null @@ -1,11 +0,0 @@ -import SystemNotificationManager from '../../../vue/components/SystemNotificationManager.vue'; - -STUDIP.domReady(() => { - document.getElementById('system-notifications')?.classList.add('vueified'); - STUDIP.Vue.load().then(({ createApp }) => { - createApp({ - el: '#system-notifications', - components: { SystemNotificationManager } - }); - }); -}); diff --git a/templates/layouts/base.php b/templates/layouts/base.php index 077cdf4a2e2ffa3064819c5cf09aad8c1604fd9a..b2b665094ccb911977e4408595cc60f8cf923a83 100644 --- a/templates/layouts/base.php +++ b/templates/layouts/base.php @@ -95,10 +95,12 @@ $lang_attr = str_replace('_', '-', $_SESSION['_language']); <?= implode(PageLayout::getMessages(QuestionBox::class)) ?> <?= $content_for_layout ?> </div> - <system-notification-manager - id="system-notifications" - :notifications='<?= htmlReady(json_encode(PageLayout::getMessages(MessageBox::class))) ?>' - placement="<?= User::findCurrent()?->getConfiguration()->SYSTEM_NOTIFICATIONS_PLACEMENT ?? 'topcenter' ?>"></system-notification-manager> + <?= Studip\VueApp::create('SystemNotificationManager') + ->withProps([ + 'id' => 'system-notifications', + 'notifications' => PageLayout::getMessages(MessageBox::class), + 'placement' => User::findCurrent()?->getConfiguration()->SYSTEM_NOTIFICATIONS_PLACEMENT ?? 'topcenter', + ]) ?> </main> <!-- End main content -->