2023-05-26 16:47:05 +00:00
|
|
|
import Vue from 'vue';
|
2023-10-16 18:15:02 +00:00
|
|
|
|
2023-05-26 16:47:05 +00:00
|
|
|
import { generateFilePath } from '@nextcloud/router';
|
|
|
|
import { getRequestToken } from '@nextcloud/auth';
|
|
|
|
|
|
|
|
// Global components
|
2023-10-29 21:10:56 +00:00
|
|
|
import XLoadingIcon from '@components/XLoadingIcon.vue';
|
2023-05-26 16:47:05 +00:00
|
|
|
|
|
|
|
// Locals
|
2023-10-29 21:10:56 +00:00
|
|
|
import { constants, initstate } from '@services/utils';
|
|
|
|
import { translate, translatePlural } from '@services/l10n';
|
2023-05-26 16:47:05 +00:00
|
|
|
|
|
|
|
// Global CSS
|
2023-08-22 01:17:55 +00:00
|
|
|
import './styles/global.scss';
|
2023-05-26 16:47:05 +00:00
|
|
|
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|
2023-10-16 18:15:02 +00:00
|
|
|
// Register global components and plugins
|
2023-05-26 16:47:05 +00:00
|
|
|
Vue.component('XLoadingIcon', XLoadingIcon);
|
2023-10-16 18:15:02 +00:00
|
|
|
|
|
|
|
// Register global constants and functions
|
2023-10-16 18:23:01 +00:00
|
|
|
Vue.prototype.c = constants;
|
|
|
|
Vue.prototype.initstate = initstate;
|
2023-10-16 18:15:02 +00:00
|
|
|
Vue.prototype.t = translate;
|
|
|
|
Vue.prototype.n = translatePlural;
|