mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
"jQuery is deprecated and will be removed with Nextcloud 19"
Well... At least it is removed now 😉
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
35 lines
825 B
JavaScript
35 lines
825 B
JavaScript
/**
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
import { translatePlural as n, translate as t } from '@nextcloud/l10n'
|
|
import Vue from 'vue'
|
|
import AppMenu from './AppMenu.vue'
|
|
|
|
/**
|
|
* Set up the main menu component ("AppMenu")
|
|
* This is the top left menu where users can navigate between different apps.
|
|
*/
|
|
export function setUp() {
|
|
Vue.mixin({
|
|
methods: {
|
|
t,
|
|
n,
|
|
},
|
|
})
|
|
|
|
const container = document.getElementById('header-start__appmenu')
|
|
if (!container) {
|
|
// no container, possibly we're on a public page
|
|
return
|
|
}
|
|
const AppMenuApp = Vue.extend(AppMenu)
|
|
const appMenu = new AppMenuApp({}).$mount(container)
|
|
|
|
Object.assign(OC, {
|
|
setNavigationCounter(id, counter) {
|
|
appMenu.setNavigationCounter(id, counter)
|
|
},
|
|
})
|
|
}
|