Browse Source

refactor: update path

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4134/head
Pranav C 2 years ago
parent
commit
3c6c1a21b8
  1. 0
      packages/nc-gui/components/account/License.vue
  2. 0
      packages/nc-gui/components/account/ResetPassword.vue
  3. 0
      packages/nc-gui/components/account/SignupSettings.vue
  4. 0
      packages/nc-gui/components/account/Token.vue
  5. 2
      packages/nc-gui/components/account/UserList.vue
  6. 6
      packages/nc-gui/components/account/UserManagement.vue
  7. 0
      packages/nc-gui/components/account/UsersModal.vue
  8. 2
      packages/nc-gui/layouts/base.vue
  9. 6
      packages/nc-gui/pages/account/index.vue
  10. 14
      packages/nc-gui/pages/account/index/[page].vue
  11. 14
      packages/nc-gui/pages/admin/index/[page].vue

0
packages/nc-gui/components/admin/License.vue → packages/nc-gui/components/account/License.vue

0
packages/nc-gui/components/admin/ResetPassword.vue → packages/nc-gui/components/account/ResetPassword.vue

0
packages/nc-gui/components/admin/SignupSettings.vue → packages/nc-gui/components/account/SignupSettings.vue

0
packages/nc-gui/components/admin/Token.vue → packages/nc-gui/components/account/Token.vue

2
packages/nc-gui/components/admin/UserList.vue → packages/nc-gui/components/account/UserList.vue

@ -250,7 +250,7 @@ const copyPasswordResetUrl = async (user: User) => {
</a-table-column>
</a-table>
<LazyAdminUsersModal :show="showUserModal" @closed="showUserModal = false" @reload="loadUsers" />
<LazyAccountUsersModal :show="showUserModal" @closed="showUserModal = false" @reload="loadUsers" />
</div>
</div>
</template>

6
packages/nc-gui/components/admin/UserManagement.vue → packages/nc-gui/components/account/UserManagement.vue

@ -28,13 +28,13 @@ const selectedTabKey = ref(tabs[0].key)
</a-tab-pane>
</a-tabs>
<template v-if="selectedTabKey === 'users'">
<LazyAdminUserList />
<LazyAccountUserList />
</template>
<template v-else-if="selectedTabKey === 'settings'">
<LazyAdminSignupSettings />
<LazyAccountSignupSettings />
</template>
<template v-else-if="selectedTabKey === 'password-reset'">
<LazyAdminResetPassword />
<LazyAccountResetPassword />
</template>
</div>
</template>

0
packages/nc-gui/components/admin/UsersModal.vue → packages/nc-gui/components/account/UsersModal.vue

2
packages/nc-gui/layouts/base.vue

@ -87,7 +87,7 @@ hooks.hook('page:finish', () => {
<template #overlay>
<a-menu class="!py-0 leading-8 !rounded">
<a-menu-item key="0" data-testid="nc-menu-accounts__user-settings" class="!rounded-t">
<nuxt-link v-e="['c:navbar:user:email']" class="nc-project-menu-item group !no-underline" to="/admin/users">
<nuxt-link v-e="['c:navbar:user:email']" class="nc-project-menu-item group !no-underline" to="/account/users">
<MdiAt class="mt-1 group-hover:text-accent" />&nbsp;
<span class="prose group-hover:text-primary"> {{ email }}</span>

6
packages/nc-gui/pages/admin/index.vue → packages/nc-gui/pages/account/index.vue

@ -19,7 +19,7 @@ const { isUIAllowed } = useUIPermission()
<a-menu-item
key="users"
class="group active:(!ring-0) hover:(!bg-primary !bg-opacity-25)"
@click="navigateTo('/admin/users')"
@click="navigateTo('/account/users')"
>
<div class="flex items-center space-x-2">
<MdiAccountSupervisorOutline />
@ -30,7 +30,7 @@ const { isUIAllowed } = useUIPermission()
<a-menu-item
key="tokens"
class="group active:(!ring-0) hover:(!bg-primary !bg-opacity-25)"
@click="navigateTo('/admin/tokens')"
@click="navigateTo('/account/tokens')"
>
<div class="flex items-center space-x-2">
<MdiShieldKeyOutline />
@ -42,7 +42,7 @@ const { isUIAllowed } = useUIPermission()
v-if="isUIAllowed('appLicense')"
key="license"
class="group active:(!ring-0) hover:(!bg-primary !bg-opacity-25)"
@click="navigateTo('/admin/license')"
@click="navigateTo('/account/license')"
>
<div class="flex items-center space-x-2">
<MdiKeyChainVariant />

14
packages/nc-gui/pages/account/index/[page].vue

@ -0,0 +1,14 @@
<script>
export default {
name: 'Index',
}
</script>
<template>
<AccountUserManagement v-if="$route.params.page === 'users'" />
<AccountToken v-else-if="$route.params.page === 'tokens'" />
<AccountLicense v-else-if="$route.params.page === 'license'" />
<span v-else></span>
</template>
<style scoped></style>

14
packages/nc-gui/pages/admin/index/[page].vue

@ -1,14 +0,0 @@
<script>
export default {
name: 'Index',
}
</script>
<template>
<AdminUserManagement v-if="$route.params.page === 'users'" />
<AdminToken v-else-if="$route.params.page === 'tokens'" />
<AdminLicense v-else-if="$route.params.page === 'license'" />
<span v-else></span>
</template>
<style scoped></style>
Loading…
Cancel
Save