Browse Source

fix: ui consistency

pull/5627/head
DarkPhoenix2704 2 years ago
parent
commit
82f67656a1
  1. 19
      packages/nc-gui/components/account/Token.vue
  2. 7
      packages/nc-gui/components/account/UserList.vue
  3. 18
      packages/nc-gui/components/account/UsersModal.vue

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

@ -105,7 +105,13 @@ const descriptionInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
<div class="py-2 flex gap-4 items-center">
<div class="flex-grow"></div>
<component :is="iconMap.reload" class="cursor-pointer" @click="loadTokens" />
<a-button data-testid="nc-token-create" size="small" type="primary" @click="showNewTokenModal = true">
<a-button
class="!rounded-md"
data-testid="nc-token-create"
size="middle"
type="primary"
@click="showNewTokenModal = true"
>
<div class="flex items-center gap-1">
<component :is="iconMap.plus" />
Add new token
@ -197,9 +203,9 @@ const descriptionInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
<template #overlay>
<a-menu data-testid="nc-token-row-action-icon">
<a-menu-item>
<div class="flex flex-row items-center py-3 h-[1rem] nc-delete-token" @click="deleteToken(record.token)">
<div class="flex flex-row items-center py-3 h-[2rem] nc-delete-token" @click="deleteToken(record.token)">
<component :is="iconMap.delete" class="flex" />
<div class="text-xs pl-2">{{ $t('general.remove') }}</div>
<div class="text-sm pl-2">{{ $t('general.remove') }}</div>
</div>
</a-menu-item>
</a-menu>
@ -228,7 +234,7 @@ const descriptionInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
</a-button>
<!-- Generate Token -->
<div class="flex flex-row justify-center w-full -mt-1 mb-3">
<div class="flex flex-row w-full -mt-1 mb-3">
<a-typography-title :level="5">{{ $t('title.generateToken') }}</a-typography-title>
</div>
@ -248,11 +254,12 @@ const descriptionInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
v-model:value="selectedTokenData.description"
data-testid="nc-token-modal-description"
:placeholder="$t('labels.description')"
class="h-9 rounded-md"
/>
<!-- Generate -->
<div class="flex flex-row justify-center">
<a-button type="primary" html-type="submit" data-testid="nc-token-modal-save">
<div class="flex flex-row justify-end">
<a-button size="middle" class="!rounded-md" type="primary" html-type="submit" data-testid="nc-token-modal-save">
{{ $t('general.generate') }}
</a-button>
</div>

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

@ -136,9 +136,9 @@ const copyPasswordResetUrl = async (user: User) => {
<div class="py-2 flex gap-4 items-center">
<a-input-search
v-model:value="searchText"
size="small"
size="middle"
class="max-w-[300px]"
placeholder="Filter by email"
placeholder="Search Users"
@blur="loadUsers"
@keydown.enter="loadUsers"
>
@ -147,7 +147,8 @@ const copyPasswordResetUrl = async (user: User) => {
<component :is="iconMap.reload" class="cursor-pointer" @click="loadUsers" />
<a-button
data-testid="nc-super-user-invite"
size="small"
size="middle"
class="!rounded-md"
type="primary"
@click="
() => {

18
packages/nc-gui/components/account/UsersModal.vue

@ -125,13 +125,13 @@ const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
<div class="px-2 mt-1.5">
<template v-if="usersData.invitationToken">
<div class="flex flex-col mt-1 border-b-1 pb-5">
<div class="flex flex-col mt-1=pb-5">
<div class="flex flex-row items-center pl-1.5 pb-1 h-[1.1rem]">
<component :is="iconMap.account" />
<div class="text-xs ml-0.5 mt-0.5">Copy Invite Token</div>
</div>
<a-alert class="mt-1" type="success" show-icon>
<a-alert class="!mt-2" type="success" show-icon>
<template #message>
<div class="flex flex-row justify-between items-center py-1">
<div class="flex pl-2 text-green-700 text-xs">
@ -152,8 +152,8 @@ const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
{{ usersData.invitationToken && usersData.emails }}
</div>
<div class="flex flex-row justify-start mt-4 ml-2">
<a-button size="small" outlined @click="clickInviteMore">
<div class="flex flex-row justify-end mt-4 ml-2">
<a-button size="middle" outlined @click="clickInviteMore">
<div class="flex flex-row justify-center items-center space-x-0.5">
<MaterialSymbolsSendOutline class="flex mx-auto text-gray-600 h-[0.8rem]" />
@ -165,11 +165,6 @@ const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
</template>
<div v-else class="flex flex-col pb-4">
<div class="flex flex-row items-center pl-2 pb-1 h-[1rem]">
<component :is="iconMap.account" />
<div class="text-xs ml-0.5 mt-0.5">{{ $t('activity.inviteUser') }}</div>
</div>
<div class="border-1 py-3 px-4 rounded-md mt-1">
<a-form
ref="formRef"
@ -190,6 +185,7 @@ const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
<a-input
:ref="emailInput"
size="middle"
v-model:value="usersData.emails"
validate-trigger="onBlur"
:placeholder="$t('labels.email')"
@ -228,8 +224,8 @@ const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
</div>
</div>
<div class="flex flex-row justify-center">
<a-button type="primary" html-type="submit">
<div class="flex flex-row justify-end">
<a-button type="primary" class="!rounded-md" html-type="submit">
<div class="flex flex-row justify-center items-center space-x-1.5">
<MaterialSymbolsSendOutline class="flex h-[0.8rem]" />
<div>{{ $t('activity.invite') }}</div>

Loading…
Cancel
Save