Skip to content

Commit c62be3d

Browse files
committed
fix(dashboard): properly handle container with Vue3 mount
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 338e190 commit c62be3d

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

apps/dashboard/src/DashboardApp.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
import { getCurrentUser } from '@nextcloud/auth'
133133
import axios from '@nextcloud/axios'
134134
import { loadState } from '@nextcloud/initial-state'
135+
import { t } from '@nextcloud/l10n'
135136
import { generateOcsUrl, generateUrl } from '@nextcloud/router'
136137
// import this directly so Vite builds it and we don't end up using the UMD bundle which
137138
// tries to run "new Function(...)" (for no good reason) which is blocked by our CSP
@@ -175,6 +176,7 @@ export default {
175176
176177
setup() {
177178
return {
179+
t,
178180
productName: window.OC.theme.productName,
179181
}
180182
},
@@ -559,6 +561,11 @@ export default {
559561
</script>
560562
561563
<style lang="scss" scoped>
564+
:global(#content.app-dashboard) {
565+
margin-inline: 0;
566+
width: 100%;
567+
}
568+
562569
#app-dashboard {
563570
width: 100%;
564571
min-height: 100%;

apps/dashboard/src/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
/**
1+
/*!
22
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
import { t } from '@nextcloud/l10n'
76
import { createApp } from 'vue'
87
import DashboardApp from './DashboardApp.vue'
98

109
const app = createApp(DashboardApp)
11-
app.mixin({ methods: { t, n } })
1210
const Instance = app.mount('#app-content-vue')
1311

1412
window.OCA.Dashboard = {

0 commit comments

Comments
 (0)