Skip to content

Commit

Permalink
Merge pull request #42986 from nextcloud/backport/stable28-profile-vue
Browse files Browse the repository at this point in the history
[stable28] profile: Refactor code to use vue components and styles where possible
  • Loading branch information
susnux authored Jan 20, 2024
2 parents ea2ba8b + 6e693e6 commit 79ef297
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 352 deletions.
22 changes: 4 additions & 18 deletions core/src/profile.js → core/src/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@
*
*/

import Vue from 'vue'
import { getRequestToken } from '@nextcloud/auth'
import { translate as t } from '@nextcloud/l10n'
import VTooltip from 'v-tooltip'

import logger from './logger.js'
import Vue from 'vue'

import Profile from './views/Profile.vue'
import ProfileSections from './profile/ProfileSections.js'

__webpack_nonce__ = btoa(getRequestToken())
// @ts-expect-error Script nonce required for webpack loading additional scripts
__webpack_nonce__ = btoa(getRequestToken() ?? '')

if (!window.OCA) {
window.OCA = {}
Expand All @@ -41,19 +38,8 @@ if (!window.OCA.Core) {
}
Object.assign(window.OCA.Core, { ProfileSections: new ProfileSections() })

Vue.use(VTooltip)

Vue.mixin({
props: {
logger,
},
methods: {
t,
},
})

const View = Vue.extend(Profile)

window.addEventListener('DOMContentLoaded', () => {
new View().$mount('#vue-profile')
new View().$mount('#content')
})
Loading

0 comments on commit 79ef297

Please sign in to comment.