|
|
@ -185,16 +185,22 @@ const handleCancel = () => { |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<span>{{ $t('msg.apiTokenCreate') }}</span> |
|
|
|
<span>{{ $t('msg.apiTokenCreate') }}</span> |
|
|
|
<div class="w-full mt-5 overflow-hidden rounded-md h-[calc(100%-18.5rem)] border-1"> |
|
|
|
<div class="w-full mt-5 !overflow-hidden rounded-md h-[calc(100%-17.5rem)]"> |
|
|
|
<div class="flex w-full pl-5 bg-gray-50"> |
|
|
|
<div class="flex w-full pl-5 bg-gray-50 border-1 border-b-0"> |
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-2/9">{{ $t('title.tokenName') }}</span> |
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-2/9">{{ $t('title.tokenName') }}</span> |
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-2/9 text-start">{{ $t('title.creator') }}</span> |
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-2/9 text-start">{{ $t('title.creator') }}</span> |
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-3/9 text-start">{{ $t('labels.token') }}</span> |
|
|
|
<span class="py-3.5 text-gray-500 font-medium text-3.5 w-3/9 text-start">{{ $t('labels.token') }}</span> |
|
|
|
<span class="py-3.5 pl-19 text-gray-500 font-medium text-3.5 w-2/9 text-start">{{ $t('labels.actions') }}</span> |
|
|
|
<span class="py-3.5 pl-19 text-gray-500 font-medium text-3.5 w-2/9 text-start">{{ $t('labels.actions') }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="nc-scrollbar-md !overflow-y-auto h-[calc(100%-3rem)]"> |
|
|
|
<div class="nc-scrollbar-md !overflow-y-auto h-[calc(100%-3rem)] border-b-1"> |
|
|
|
<div v-if="showNewTokenModal"> |
|
|
|
<div v-if="showNewTokenModal"> |
|
|
|
<div class="flex gap-5 px-3 py-3.5 text-gray-500 font-medium text-3.5 w-full nc-token-generate border-t-1"> |
|
|
|
<div |
|
|
|
|
|
|
|
class="flex gap-5 px-3 py-3.5 text-gray-500 font-medium text-3.5 w-full nc-token-generate border-1" |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
'border-b-1': !tokens.length, |
|
|
|
|
|
|
|
'border-b-0': tokens.length, |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
> |
|
|
|
<div class="flex flex-col w-full"> |
|
|
|
<div class="flex flex-col w-full"> |
|
|
|
<a-input |
|
|
|
<a-input |
|
|
|
:ref="selectInputOnMount" |
|
|
|
:ref="selectInputOnMount" |
|
|
@ -218,15 +224,15 @@ const handleCancel = () => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="showNewTokenModal && !tokens.length" class="h-118 justify-center flex items-center"> |
|
|
|
<div v-if="!tokens.length && !showNewTokenModal" class="justify-center flex items-center border-1"> |
|
|
|
<a-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" :description="$t('title.noLabels')" /> |
|
|
|
<a-empty :image="Empty.PRESENTED_IMAGE_SIMPLE" :description="$t('labels.noToken')" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div |
|
|
|
<div |
|
|
|
v-for="el of tokens" |
|
|
|
v-for="el of tokens" |
|
|
|
:key="el.id" |
|
|
|
:key="el.id" |
|
|
|
data-testid="nc-token-list" |
|
|
|
data-testid="nc-token-list" |
|
|
|
class="flex border-t-1 pl-5 py-3 justify-between token" |
|
|
|
class="flex border-1 pl-5 py-3 justify-between token" |
|
|
|
> |
|
|
|
> |
|
|
|
<span class="text-black font-bold text-3.5 text-start w-2/9"> |
|
|
|
<span class="text-black font-bold text-3.5 text-start w-2/9"> |
|
|
|
<GeneralTruncateText placement="top" length="20"> |
|
|
|
<GeneralTruncateText placement="top" length="20"> |
|
|
@ -242,34 +248,32 @@ const handleCancel = () => { |
|
|
|
<GeneralTruncateText v-if="el.token === selectedToken.id && selectedToken.isShow" placement="top" length="29"> |
|
|
|
<GeneralTruncateText v-if="el.token === selectedToken.id && selectedToken.isShow" placement="top" length="29"> |
|
|
|
{{ el.token }} |
|
|
|
{{ el.token }} |
|
|
|
</GeneralTruncateText> |
|
|
|
</GeneralTruncateText> |
|
|
|
<span v-else>**************************************</span> |
|
|
|
<span v-else>************************************</span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<!-- ACTIONS --> |
|
|
|
<!-- ACTIONS --> |
|
|
|
<span class="text-gray-500 font-medium text-3.5 w-2/9"> |
|
|
|
<div class="flex justify-end items-center gap-3 pr-5 text-gray-500 font-medium text-3.5 w-2/9"> |
|
|
|
<div class="flex justify-end items-center gap-3 pr-5"> |
|
|
|
<NcTooltip placement="top"> |
|
|
|
<NcTooltip placement="top"> |
|
|
|
<template #title>{{ $t('labels.showOrHide') }}</template> |
|
|
|
<template #title>{{ $t('labels.showOrHide') }}</template> |
|
|
|
<component |
|
|
|
<component |
|
|
|
:is="iconMap.eye" |
|
|
|
:is="iconMap.eye" |
|
|
|
class="nc-toggle-token-visibility hover::cursor-pointer w-h-4 mb-[1.8px]" |
|
|
|
class="nc-toggle-token-visibility hover::cursor-pointer" |
|
|
|
@click="hideOrShowToken(el.token as string)" |
|
|
|
@click="hideOrShowToken(el.token as string)" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<NcTooltip placement="top" class="h-4"> |
|
|
|
<NcTooltip placement="top" class="h-4"> |
|
|
|
<template #title>{{ $t('general.copy') }}</template> |
|
|
|
<template #title>{{ $t('general.copy') }}</template> |
|
|
|
<component :is="iconMap.copy" class="hover::cursor-pointer w-4 h-4" @click="copyToken(el.token)" /> |
|
|
|
<component :is="iconMap.copy" class="hover::cursor-pointer" @click="copyToken(el.token)" /> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<NcTooltip placement="top" class="mb-0.5"> |
|
|
|
<NcTooltip placement="top" class="mb-0.5"> |
|
|
|
<template #title>{{ $t('general.delete') }}</template> |
|
|
|
<template #title>{{ $t('general.delete') }}</template> |
|
|
|
<component |
|
|
|
<component |
|
|
|
:is="iconMap.delete" |
|
|
|
:is="iconMap.delete" |
|
|
|
data-testid="nc-token-row-action-icon" |
|
|
|
data-testid="nc-token-row-action-icon" |
|
|
|
class="nc-delete-icon hover::cursor-pointer w-4 h-4" |
|
|
|
class="nc-delete-icon hover::cursor-pointer" |
|
|
|
@click="triggerDeleteModal(el.token as string, el.description as string)" |
|
|
|
@click="triggerDeleteModal(el.token as string, el.description as string)" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -304,8 +308,9 @@ const handleCancel = () => { |
|
|
|
</GeneralDeleteModal> |
|
|
|
</GeneralDeleteModal> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
.token:last-child { |
|
|
|
.token:last-child { |
|
|
|
@apply border-b-1; |
|
|
|
@apply rounded-b-md; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|