Browse Source

chore(gui): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4134/head
Pranav C 2 years ago
parent
commit
74fda80f8f
  1. 4
      packages/nc-gui/components/account/SignupSettings.vue
  2. 6
      packages/nc-gui/components/account/Token.vue
  3. 4
      packages/nc-gui/components/account/UserList.vue
  4. 3
      packages/nc-gui/pages/account/index.vue

4
packages/nc-gui/components/account/SignupSettings.vue

@ -32,13 +32,13 @@ loadSettings()
<div class="text-xl">Settings</div> <div class="text-xl">Settings</div>
<a-divider class="!my-3" /> <a-divider class="!my-3" />
<a-form-item> <a-form-item>
<a-checkbox class="nc-checkbox" v-model:checked="settings.enable_user_signup" name="virtual" <a-checkbox v-model:checked="settings.enable_user_signup" class="nc-checkbox" name="virtual" @change="saveSettings">
@change="saveSettings">
Enable user signup Enable user signup
</a-checkbox> </a-checkbox>
</a-form-item> </a-form-item>
</div> </div>
</template> </template>
<style scoped> <style scoped>
:deep(.ant-checkbox-wrapper) { :deep(.ant-checkbox-wrapper) {
@apply !flex-row-reverse !flex !justify-start gap-4; @apply !flex-row-reverse !flex !justify-start gap-4;

6
packages/nc-gui/components/account/Token.vue

@ -100,7 +100,7 @@ const descriptionInput = ref((el) => {
<div class="h-full overflow-y-scroll scrollbar-thin-dull pt-2"> <div class="h-full overflow-y-scroll scrollbar-thin-dull pt-2">
<div class="text-xl mt-4">Token Management</div> <div class="text-xl mt-4">Token Management</div>
<a-divider class="!my-3" /> <a-divider class="!my-3" />
<div class="max-w-[900px] mx-auto p-4" data-cy="nc-token-list"> <div class="max-w-[900px] mx-auto p-4" data-cy="nc-token-list">
<div class="py-2 flex gap-4 items-center"> <div class="py-2 flex gap-4 items-center">
<div class="flex-grow"></div> <div class="flex-grow"></div>
<MdiReload class="cursor-pointer" @click="loadTokens" /> <MdiReload class="cursor-pointer" @click="loadTokens" />
@ -188,7 +188,7 @@ const descriptionInput = ref((el) => {
<div class="flex flex-row items-center"> <div class="flex flex-row items-center">
<a-button type="text" class="!px-0"> <a-button type="text" class="!px-0">
<div class="flex flex-row items-center h-[1.2rem]"> <div class="flex flex-row items-center h-[1.2rem]">
<IcBaselineMoreVert class="nc-token-menu"/> <IcBaselineMoreVert class="nc-token-menu" />
</div> </div>
</a-button> </a-button>
</div> </div>
@ -242,9 +242,9 @@ const descriptionInput = ref((el) => {
@finish="generateToken" @finish="generateToken"
> >
<a-input <a-input
data-cy="nc-token-modal-description"
:ref="descriptionInput" :ref="descriptionInput"
v-model:value="selectedTokenData.description" v-model:value="selectedTokenData.description"
data-cy="nc-token-modal-description"
:placeholder="$t('labels.description')" :placeholder="$t('labels.description')"
/> />

4
packages/nc-gui/components/account/UserList.vue

@ -119,7 +119,7 @@ const copyPasswordResetUrl = async (user: User) => {
</script> </script>
<template> <template>
<div data-cy='nc-super-user-list'> <div data-cy="nc-super-user-list">
<div class="text-xl">User Management</div> <div class="text-xl">User Management</div>
<a-divider class="!my-3" /> <a-divider class="!my-3" />
<div class="max-w-[900px] mx-auto p-4"> <div class="max-w-[900px] mx-auto p-4">
@ -164,7 +164,7 @@ const copyPasswordResetUrl = async (user: User) => {
</a-table-column> </a-table-column>
<!-- Role --> <!-- Role -->
<a-table-column key="roles" :title="$t('objects.role')" data-index="roles"> <a-table-column key="roles" :title="$t('objects.role')" data-index="roles">
<template #default="{ record }"> <template #default="{ record }">
<div> <div>
<div v-if="record.roles.includes('super')" class="font-weight-bold">Super Admin</div> <div v-if="record.roles.includes('super')" class="font-weight-bold">Super Admin</div>

3
packages/nc-gui/pages/account/index.vue

@ -1,12 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { navigateTo } from '#imports' import { navigateTo } from '#imports'
import { useUIPermission } from '~/composables/useUIPermission'
const $route = useRoute() const $route = useRoute()
const selectedTabKeys = computed(() => [$route.params.page]) const selectedTabKeys = computed(() => [$route.params.page])
const { isUIAllowed } = useUIPermission()
</script> </script>
<template> <template>

Loading…
Cancel
Save