forked from pulsejet/memories
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.ts
37 lines (28 loc) · 1.12 KB
/
bootstrap.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import Vue from 'vue';
import { generateFilePath } from '@nextcloud/router';
import { getRequestToken } from '@nextcloud/auth';
// Global components
import XLoadingIcon from '@components/XLoadingIcon.vue';
// Locals
import { constants, initstate } from '@services/utils';
import { translate, translatePlural } from '@services/l10n';
// Global CSS
import './styles/global.scss';
// CSP config for webpack dynamic chunk loading
__webpack_nonce__ = window.btoa(getRequestToken() ?? '');
// Correct the root of the app for chunk loading
// OC.linkTo matches the apps folders
// OC.generateUrl ensure the index.php (or not)
// We do not want the index.php since we're loading files
__webpack_public_path__ = generateFilePath('memories', '', 'js/');
// Turn on virtual keyboard support
if ('virtualKeyboard' in navigator) {
(<any>navigator.virtualKeyboard).overlaysContent = true;
}
// Register global components and plugins
Vue.component('XLoadingIcon', XLoadingIcon);
// Register global constants and functions
Vue.prototype.c = constants;
Vue.prototype.initstate = initstate;
Vue.prototype.t = translate;
Vue.prototype.n = translatePlural;