Browse Source

fix: ui changes

pull/6459/head
sreehari jayaraj 1 year ago
parent
commit
0a70e7be42
  1. 13
      packages/nc-gui/components/account/SignupSettings.vue
  2. 123
      packages/nc-gui/components/account/UserList.vue
  3. 4
      packages/nc-gui/components/dashboard/settings/AppStore.vue
  4. 4
      packages/nc-gui/components/roles/Badge.vue
  5. 2
      packages/nc-gui/components/smartsheet/toolbar/RowHeight.vue

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

@ -30,20 +30,25 @@ loadSettings()
</script> </script>
<template> <template>
<<<<<<< HEAD
<div data-testid="nc-app-settings"> <div data-testid="nc-app-settings">
<div class="text-xl mt-4 mb-8 text-center font-weight-bold capitalize">{{ $t('activity.settings') }}</div> <div class="text-xl mt-4 mb-8 text-center font-weight-bold capitalize">{{ $t('activity.settings') }}</div>
<div class="flex justify-center"> <div class="flex justify-center">
=======
<div class="p-7">
<h1 class="text-xl mt-4 mb-5 pl-3.5 font-weight-bold">Settings</h1>
<div class="flex items-center gap-2">
>>>>>>> 41d0c7c53 (fix: ui changes)
<a-form-item> <a-form-item>
<a-checkbox <a-checkbox
v-model:checked="settings.invite_only_signup" v-model:checked="settings.invite_only_signup"
v-e="['c:account:enable-signup']" v-e="['c:account:enable-signup']"
class="nc-checkbox nc-invite-only-signup-checkbox" class="nc-checkbox nc-invite-only-signup-checkbox !mt-6"
name="virtual" name="virtual"
@change="saveSettings" @change="saveSettings"
> />
{{ $t('labels.inviteOnlySignup') }}
</a-checkbox>
</a-form-item> </a-form-item>
{{ $t('labels.inviteOnlySignup') }}
</div> </div>
</div> </div>
</template> </template>

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

@ -138,7 +138,6 @@ const copyPasswordResetUrl = async (user: User) => {
<template> <template>
<div data-testid="nc-super-user-list"> <div data-testid="nc-super-user-list">
<<<<<<< HEAD
<div class="max-w-[900px] mx-auto"> <div class="max-w-[900px] mx-auto">
<div class="text-xl my-4 text-left font-weight-bold">{{ $t('title.userManagement') }}</div> <div class="text-xl my-4 text-left font-weight-bold">{{ $t('title.userManagement') }}</div>
<div class="py-2 flex gap-4 items-center"> <div class="py-2 flex gap-4 items-center">
@ -302,132 +301,10 @@ const copyPasswordResetUrl = async (user: User) => {
</template> </template>
</a-dropdown> </a-dropdown>
</div> </div>
<<<<<<< HEAD
<span v-else></span> <span v-else></span>
</template> </template>
</a-table-column> </a-table-column>
</a-table> </a-table>
=======
</span>
</div>
=======
<div class="max-w-195 mx-auto">
<div class="text-xl my-4 text-left font-weight-bold">User Management</div>
<div class="py-2 flex gap-4 items-center justify-between">
<a-input v-model:value="searchText" class="!max-w-90 !rounded-md" placeholder="Search members" @change="loadUsers()">
<template #prefix>
<PhMagnifyingGlassBold class="!h-3.5 text-gray-500" />
</template>
</a-input>
<div class="flex gap-3 items-center justify-center">
<component :is="iconMap.reload" class="cursor-pointer" @click="loadUsers(currentPage, currentLimit)" />
<NcButton data-testid="nc-super-user-invite" size="small" type="primary" @click="openInviteModal">
<div class="flex items-center gap-1">
<component :is="iconMap.plus" />
Invite new user
</div>
</NcButton>
</div>
</div>
<div class="w-[780px] mt-5 border-1 rounded-md h-[613px]">
<div class="flex w-full bg-gray-50 border-b-1">
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-1/3 text-start pl-10">{{ $t('labels.email') }}</span>
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-1/3 text-start pl-20">{{ $t('objects.role') }}</span>
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-1/3 text-end pl-42">Actions</span>
</div>
<div v-if="isLoading" class="flex items-center justify-center text-center h-[513px]">
<GeneralLoader size="xlarge" />
</div>
<!-- if users are empty -->
<div v-else-if="!users.length" class="flex items-center justify-center text-center h-[513px]">
<a-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" :description="$t('labels.noData')" />
</div>
<section v-else class="tbody">
<div
v-for="el of users"
:key="el.id"
data-testid="nc-token-list"
class="flex py-3 justify-around px-5 border-b-1"
:class="{
'py-4': el.roles?.includes('super'),
}"
>
<span class="text-3.5 text-start w-1/3 pl-5">
{{ el.email }}
</span>
<span class="text-3.5 text-start w-1/3 pl-18">
<div v-if="el?.roles?.includes('super')" class="font-weight-bold">Super Admin</div>
<a-select
v-else
v-model:value="el.roles"
class="w-[220px] nc-user-roles"
:dropdown-match-select-width="false"
@change="updateRole(el.id, el.roles as string)"
>
<a-select-option
class="nc-users-list-role-option"
:value="OrgUserRoles.CREATOR"
:label="$t(`objects.roleType.orgLevelCreator`)"
>
<div>{{ $t(`objects.roleType.orgLevelCreator`) }}</div>
<span class="text-gray-500 text-xs whitespace-normal">
{{ $t('msg.info.roles.orgCreator') }}
</span>
</a-select-option>
<a-select-option
class="nc-users-list-role-option"
:value="OrgUserRoles.VIEWER"
:label="$t(`objects.roleType.orgLevelViewer`)"
>
<div>{{ $t(`objects.roleType.orgLevelViewer`) }}</div>
<span class="text-gray-500 text-xs whitespace-normal">
{{ $t('msg.info.roles.orgViewer') }}
</span>
</a-select-option>
</a-select>
</span>
<span class="w-1/3 pl-43">
<div
class="flex items-center gap-2"
:class="{
'opacity-0': el.roles?.includes('super'),
}"
>
<NcDropdown :trigger="['click']">
<MdiDotsVertical
class="border-1 !text-gray-600 h-5.5 w-5.5 rounded outline-0 p-0.5 nc-workspace-menu transform transition-transform !text-gray-400 cursor-pointer hover:(!text-gray-500 bg-gray-100)"
/>
<template #overlay>
<NcMenu>
<template v-if="!el.roles?.includes('super')">
<!-- Resend invite Email -->
<NcMenuItem @click="resendInvite(el)">
<component :is="iconMap.email" class="flex text-gray-500" />
<div>{{ $t('activity.resendInvite') }}</div>
</NcMenuItem>
<NcMenuItem @click="copyInviteUrl(el)">
<component :is="iconMap.copy" class="flex text-gray-500" />
<div>{{ $t('activity.copyInviteURL') }}</div>
</NcMenuItem>
<NcMenuItem @click="copyPasswordResetUrl(el)">
<component :is="iconMap.copy" class="flex text-gray-500" />
<div>{{ $t('activity.copyPasswordResetURL') }}</div>
</NcMenuItem>
</template>
<NcDivider v-if="!el.roles?.includes('super')" />
<NcMenuItem class="!text-red-500 !hover:bg-red-50" @click="openDeleteModal(el)">
<MaterialSymbolsDeleteOutlineRounded />
Remove user
</NcMenuItem>
</NcMenu>
</template>
</NcDropdown>
</div>
</span>
</div>
</section>
>>>>>>> 994c6208a (feat: moved reset password to client side)
</div> </div>
<div v-if="pagination.total > 10" class="flex items-center justify-center mt-7"> <div v-if="pagination.total > 10" class="flex items-center justify-center mt-7">
<a-pagination <a-pagination

4
packages/nc-gui/components/dashboard/settings/AppStore.vue

@ -108,11 +108,11 @@ onMounted(async () => {
</div> </div>
</a-modal> </a-modal>
<div class="flex flex-col md:flex-row flex-wrap mt-4 w-full gap-5 mb-10"> <div class="flex flex-wrap mt-4 w-full gap-5 mb-10">
<a-card <a-card
v-for="(app, i) in apps" v-for="(app, i) in apps"
:key="i" :key="i"
class="sm:w-138.2" class="sm:w-100 md:w-138.1"
:class="`relative flex overflow-x-hidden app-item-card !shadow-sm rounded-md w-full nc-app-store-card-${app.title}`" :class="`relative flex overflow-x-hidden app-item-card !shadow-sm rounded-md w-full nc-app-store-card-${app.title}`"
> >
<div class="install-btn flex flex-row justify-end space-x-1"> <div class="install-btn flex flex-row justify-end space-x-1">

4
packages/nc-gui/components/roles/Badge.vue

@ -61,7 +61,9 @@ const roleProperties = computed(() => {
}" }"
> >
<GeneralIcon :icon="roleProperties.icon" /> <GeneralIcon :icon="roleProperties.icon" />
{{ roleProperties.label }} <span class="flex whitespace-nowrap">
{{ roleProperties.label }}
</span>
<GeneralIcon v-if="clickableRef" icon="arrowDown" /> <GeneralIcon v-if="clickableRef" icon="arrowDown" />
</div> </div>
</NcBadge> </NcBadge>

2
packages/nc-gui/components/smartsheet/toolbar/RowHeight.vue

@ -72,7 +72,7 @@ useMenuCloseOnEsc(open)
<div class="text-xs text-gray-500 px-3 pt-2 pb-1 select-none">{{ $t('objects.rowHeight') }}</div> <div class="text-xs text-gray-500 px-3 pt-2 pb-1 select-none">{{ $t('objects.rowHeight') }}</div>
<div <div
class="nc-row-height-option" class="nc-row-height-option"
:class="{'active': (view?.view as GridType).row_height === 0}" :class="{'active': !(view?.view as GridType).row_height }"
@click="updateRowHeight(0)" @click="updateRowHeight(0)"
> >
<GeneralIcon icon="heightShort" class="nc-row-height-icon" /> <GeneralIcon icon="heightShort" class="nc-row-height-icon" />

Loading…
Cancel
Save