File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66import { getCSPNonce } from '@nextcloud/auth'
77import Vue from 'vue'
8- import SettingsNavigation from './views/SettingsNavigation .vue'
8+ import SettingsApp from './views/SettingsApp .vue'
99
1010__webpack_nonce__ = getCSPNonce ( )
1111
12- const app = new Vue ( SettingsNavigation )
13- app . $mount ( '#app-navigation ' )
12+ const app = new Vue ( SettingsApp )
13+ app . $mount ( '#settings-app ' )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import VTooltipPlugin from 'v-tooltip'
1212import Vue from 'vue'
1313import Vuex from 'vuex'
1414import { sync } from 'vuex-router-sync'
15- import SettingsApp from './views/SettingsApp .vue'
15+ import UserManagement from './views/UserManagement .vue'
1616import router from './router/index.ts'
1717import { useStore } from './store/index.js'
1818
@@ -37,10 +37,10 @@ const pinia = createPinia()
3737// Migrate legacy local storage settings to the database
3838store . dispatch ( 'migrateLocalStorage' )
3939
40- export default new Vue ( {
40+ const App = Vue . extend ( UserManagement )
41+ const app = new App ( {
4142 router,
4243 store,
4344 pinia,
44- render : ( h ) => h ( SettingsApp ) ,
45- el : '#content' ,
4645} )
46+ app . $mount ( '#content' )
Original file line number Diff line number Diff line change 1- /**
1+ /*
22 * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
33 * SPDX-License-Identifier: AGPL-3.0-or-later
44 */
55
66import type { RouteConfig } from 'vue-router'
77
8- const UserManagement = ( ) => import ( /* webpackChunkName: 'settings-users' */ '../views/UserManagement.vue' )
9- const UserManagementNavigation = ( ) => import ( /* webpackChunkName: 'settings-users' */ '../views/UserManagementNavigation.vue' )
10-
118const routes : RouteConfig [ ] = [
129 {
1310 name : 'users' ,
1411 path : '/:index(index.php/)?settings/users' ,
15- components : {
16- default : UserManagement ,
17- navigation : UserManagementNavigation ,
18- } ,
1912 props : true ,
2013 children : [
2114 {
Original file line number Diff line number Diff line change 44-->
55
66<template >
7- <NcContent app-name =" settings" >
8- <router-view name =" navigation" />
9- <router-view />
10- <router-view name =" sidebar" />
7+ <NcContent :class =" $style.settingsApp" appName =" settings" >
8+ <SettingsNavigation />
9+ <SettingsContentWrapper />
1110 </NcContent >
1211</template >
1312
1413<script setup lang="ts">
1514import NcContent from ' @nextcloud/vue/components/NcContent'
15+ import SettingsContentWrapper from ' ./SettingsContentWrapper.vue'
16+ import SettingsNavigation from ' ./SettingsNavigation.vue'
1617 </script >
18+
19+ <style module>
20+ :global(#content ):has (.settingsApp ) {
21+ margin : 0 ;
22+ width : 100% ;
23+ height : 100% ;
24+ }
25+ </style >
Original file line number Diff line number Diff line change 1+ <!--
2+ - SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
3+ - SPDX-License-Identifier: AGPL-3.0-or-later
4+ -->
5+
6+ <template >
7+ <NcAppContent >
8+ <div ref =" contentMain" />
9+ </NcAppContent >
10+ </template >
11+
12+ <script setup lang="ts">
13+ import { NcAppContent } from ' @nextcloud/vue'
14+ import { onMounted , ref } from ' vue'
15+
16+ const contentMain = ref <HTMLDivElement >()
17+ onMounted (() => {
18+ const realElement = document .getElementById (' original-settings-content' )!
19+ contentMain .value ! .replaceChildren (... realElement .childNodes )
20+ realElement .parentNode ! .removeChild (realElement )
21+ })
22+ </script >
Original file line number Diff line number Diff line change 44-->
55
66<template >
7- <NcAppContent :page-heading =" pageHeading" >
8- <UserList
9- :selected-group =" selectedGroupDecoded"
10- :external-actions =" externalActions" />
11- </NcAppContent >
7+ <NcContent app-name =" settings" >
8+ <UserManagementNavigation />
9+ <NcAppContent :page-heading =" pageHeading" >
10+ <UserList
11+ :selected-group =" selectedGroupDecoded"
12+ :external-actions =" externalActions" />
13+ </NcAppContent >
14+ </NcContent >
1215</template >
1316
1417<script >
1518import { emit } from ' @nextcloud/event-bus'
1619import { translate as t } from ' @nextcloud/l10n'
1720import { defineComponent } from ' vue'
1821import NcAppContent from ' @nextcloud/vue/components/NcAppContent'
22+ import NcContent from ' @nextcloud/vue/components/NcContent'
1923import UserList from ' ../components/UserList.vue'
24+ import UserManagementNavigation from ' ./UserManagementNavigation.vue'
2025
2126export default defineComponent ({
2227 name: ' UserManagement' ,
2328
2429 components: {
30+ NcContent,
2531 NcAppContent,
2632 UserList,
33+ UserManagementNavigation,
2734 },
2835
2936 data () {
Original file line number Diff line number Diff line change 77style ('settings ' , 'settings ' );
88?>
99
10- <div id="app-navigation "></div>
11- <main id="app -content" <?php if (!empty ($ _ ['activeSectionId ' ])) { ?> data-active-section-id="<?php print_unescaped ($ _ ['activeSectionId ' ]) ?> " <?php } if (!empty ($ _ ['activeSectionType ' ])) { ?> data-active-section-type="<?php print_unescaped ($ _ ['activeSectionType ' ]) ?> " <?php } ?> >
10+ <div id="settings-app "></div>
11+ <div class="hidden-visually" id="original-settings -content" <?php if (!empty ($ _ ['activeSectionId ' ])) { ?> data-active-section-id="<?php print_unescaped ($ _ ['activeSectionId ' ]) ?> " <?php } if (!empty ($ _ ['activeSectionType ' ])) { ?> data-active-section-type="<?php print_unescaped ($ _ ['activeSectionType ' ]) ?> " <?php } ?> >
1212 <?php print_unescaped ($ _ ['content ' ]); ?>
13- </main >
13+ </div >
You can’t perform that action at this time.
0 commit comments