You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/core/src/profile.ts

29 lines
719 B
TypeScript

/**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getRequestToken } from '@nextcloud/auth'
import Vue from 'vue'
import Profile from './views/Profile.vue'
import ProfileSections from './profile/ProfileSections.js'
// @ts-expect-error Script nonce required for webpack loading additional scripts
__webpack_nonce__ = btoa(getRequestToken() ?? '')
if (!window.OCA) {
window.OCA = {}
}
if (!window.OCA.Core) {
window.OCA.Core = {}
}
Object.assign(window.OCA.Core, { ProfileSections: new ProfileSections() })
const View = Vue.extend(Profile)
window.addEventListener('DOMContentLoaded', () => {
new View().$mount('#content')
})