1
|
|
|
/** |
2
|
|
|
* @copyright Copyright (c) 2019 John Molakvoæ <[email protected]> |
3
|
|
|
* |
4
|
|
|
* @author John Molakvoæ <[email protected]> |
5
|
|
|
* |
6
|
|
|
* @license GNU AGPL version 3 or any later version |
7
|
|
|
* |
8
|
|
|
* This program is free software: you can redistribute it and/or modify |
9
|
|
|
* it under the terms of the GNU Affero General Public License as |
10
|
|
|
* published by the Free Software Foundation, either version 3 of the |
11
|
|
|
* License, or (at your option) any later version. |
12
|
|
|
* |
13
|
|
|
* This program is distributed in the hope that it will be useful, |
14
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
|
|
|
* GNU Affero General Public License for more details. |
17
|
|
|
* |
18
|
|
|
* You should have received a copy of the GNU Affero General Public License |
19
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
20
|
|
|
* |
21
|
|
|
*/ |
22
|
|
|
|
23
|
|
|
import { generateFilePath } from '@nextcloud/router' |
24
|
|
|
import { getRequestToken } from '@nextcloud/auth' |
25
|
|
|
import { sync } from 'vuex-router-sync' |
26
|
|
|
import { translate, translatePlural } from '@nextcloud/l10n' |
27
|
|
|
import Vue from 'vue' |
28
|
|
|
|
29
|
|
|
import Gallery from './Gallery' |
30
|
|
|
import router from './router' |
31
|
|
|
import store from './store' |
32
|
|
|
|
33
|
|
|
// CSP config for webpack dynamic chunk loading |
34
|
|
|
// eslint-disable-next-line |
35
|
|
|
__webpack_nonce__ = btoa(getRequestToken()) |
|
|
|
|
36
|
|
|
|
37
|
|
|
// Correct the root of the app for chunk loading |
38
|
|
|
// OC.linkTo matches the apps folders |
39
|
|
|
// OC.generateUrl ensure the index.php (or not) |
40
|
|
|
// We do not want the index.php since we're loading files |
41
|
|
|
// eslint-disable-next-line |
42
|
|
|
__webpack_public_path__ = generateFilePath('gallery', '', 'js/') |
|
|
|
|
43
|
|
|
|
44
|
|
|
sync(store, router) |
45
|
|
|
|
46
|
|
|
Vue.prototype.t = translate |
47
|
|
|
Vue.prototype.n = translatePlural |
48
|
|
|
|
49
|
|
|
export default new Vue({ |
50
|
|
|
el: '#content', |
51
|
|
|
// eslint-disable-next-line vue/match-component-file-name |
52
|
|
|
name: 'GalleryRoot', |
53
|
|
|
router, |
54
|
|
|
store, |
55
|
|
|
render: h => h(Gallery), |
56
|
|
|
}) |
57
|
|
|
|