2020-10-11 11:50:16 +00:00
|
|
|
/*
|
2024-02-02 18:27:50 +00:00
|
|
|
* Copyright (c) 2020-2024. The Nextcloud Bookmarks contributors.
|
2020-10-11 11:50:16 +00:00
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
import Vue from 'vue'
|
2022-12-12 19:29:03 +00:00
|
|
|
import { Tooltip } from '@nextcloud/vue'
|
|
|
|
import store from './store/index.js'
|
|
|
|
import AppGlobal from './mixins/AppGlobal.js'
|
2021-03-30 11:21:18 +00:00
|
|
|
import DashboardRecent from './components/DashboardRecent.vue'
|
2022-12-12 19:29:03 +00:00
|
|
|
import DashboardFrequent from './components/DashboardFrequent.vue'
|
2021-03-30 11:21:18 +00:00
|
|
|
import { Store } from 'vuex'
|
|
|
|
import deepClone from 'clone-deep'
|
2020-10-11 11:50:16 +00:00
|
|
|
|
|
|
|
Vue.mixin(AppGlobal)
|
|
|
|
Vue.directive('tooltip', Tooltip)
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
OCA.Dashboard.register('bookmarks.recent', (el) => {
|
2021-03-30 11:21:18 +00:00
|
|
|
global.BookmarksRecent = new Vue({
|
2020-10-11 11:50:16 +00:00
|
|
|
el,
|
2021-03-30 11:21:18 +00:00
|
|
|
store: new Store(deepClone(store)),
|
|
|
|
render: h => h(DashboardRecent),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
OCA.Dashboard.register('bookmarks.frequent', (el) => {
|
|
|
|
global.BookmarksFrequent = new Vue({
|
|
|
|
el,
|
|
|
|
store: new Store(deepClone(store)),
|
|
|
|
render: h => h(DashboardFrequent),
|
2020-10-11 11:50:16 +00:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|