2021-03-31 06:15:40 -04:00
|
|
|
/**
|
2019-05-10 07:38:11 -04:00
|
|
|
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
|
|
|
*
|
2021-03-31 06:15:40 -04:00
|
|
|
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
|
|
|
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
|
|
|
* @author Julius Härtl <jus@bitgrid.net>
|
2019-05-10 07:38:11 -04:00
|
|
|
*
|
2022-01-11 11:18:11 -05:00
|
|
|
* @license AGPL-3.0-or-later
|
2019-05-10 07:38:11 -04:00
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
2021-03-31 06:15:40 -04:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*
|
2019-05-10 07:38:11 -04:00
|
|
|
*/
|
|
|
|
|
|
2022-08-27 04:57:13 -04:00
|
|
|
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
|
|
|
|
|
import Vue from 'vue'
|
2019-05-10 07:38:11 -04:00
|
|
|
|
2022-08-27 04:57:13 -04:00
|
|
|
import AppMenu from './AppMenu.vue'
|
2019-05-10 07:38:11 -04:00
|
|
|
|
|
|
|
|
export const setUp = () => {
|
2022-11-18 09:10:02 -05:00
|
|
|
|
2022-08-27 04:57:13 -04:00
|
|
|
Vue.mixin({
|
|
|
|
|
methods: {
|
|
|
|
|
t,
|
|
|
|
|
n,
|
2021-05-11 02:22:51 -04:00
|
|
|
},
|
|
|
|
|
})
|
2019-05-10 07:38:11 -04:00
|
|
|
|
2022-11-18 09:10:02 -05:00
|
|
|
const container = document.getElementById('header-left__appmenu')
|
|
|
|
|
if (!container) {
|
|
|
|
|
// no container, possibly we're on a public page
|
|
|
|
|
return
|
|
|
|
|
}
|
2022-08-27 04:57:13 -04:00
|
|
|
const AppMenuApp = Vue.extend(AppMenu)
|
2022-11-18 09:10:02 -05:00
|
|
|
const appMenu = new AppMenuApp({}).$mount(container)
|
2019-05-10 07:38:11 -04:00
|
|
|
|
2022-08-27 04:57:13 -04:00
|
|
|
Object.assign(OC, {
|
|
|
|
|
setNavigationCounter(id, counter) {
|
|
|
|
|
appMenu.setNavigationCounter(id, counter)
|
|
|
|
|
},
|
2019-05-10 07:38:11 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|