|
|
@ -160,8 +160,8 @@ const handleCancel = () => { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="h-full overflow-y-scroll scrollbar-thin-dull pt-2"> |
|
|
|
<div class="h-full pt-2"> |
|
|
|
<div class="max-w-202 mx-auto px-4" data-testid="nc-token-list"> |
|
|
|
<div class="max-w-202 mx-auto px-4 h-full" data-testid="nc-token-list"> |
|
|
|
<div class="py-2 flex gap-4 items-center justify-between"> |
|
|
|
<div class="py-2 flex gap-4 items-center justify-between"> |
|
|
|
<h6 class="text-2xl my-4 text-left font-bold">{{ $t('title.apiTokens') }}</h6> |
|
|
|
<h6 class="text-2xl my-4 text-left font-bold">{{ $t('title.apiTokens') }}</h6> |
|
|
|
<NcTooltip :disabled="!(isEeUI && tokens.length)"> |
|
|
|
<NcTooltip :disabled="!(isEeUI && tokens.length)"> |
|
|
@ -185,22 +185,16 @@ const handleCancel = () => { |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<span>{{ $t('msg.apiTokenCreate') }}</span> |
|
|
|
<span>{{ $t('msg.apiTokenCreate') }}</span> |
|
|
|
<div class="w-full mt-5 rounded-md h-136 overflow-y-scroll"> |
|
|
|
<div class="w-full mt-5 overflow-hidden rounded-md h-[calc(100%-18.5rem)] border-1"> |
|
|
|
<div> |
|
|
|
<div class="flex w-full pl-5 bg-gray-50"> |
|
|
|
<div class="flex w-full pl-5 bg-gray-50 border-1"> |
|
|
|
|
|
|
|
<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> |
|
|
|
<main> |
|
|
|
<div class="nc-scrollbar-md !overflow-y-auto h-[calc(100%-3rem)]"> |
|
|
|
<div v-if="showNewTokenModal"> |
|
|
|
<div v-if="showNewTokenModal"> |
|
|
|
<div |
|
|
|
<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"> |
|
|
|
class="flex gap-5 px-3 py-3.5 text-gray-500 font-medium text-3.5 w-full nc-token-generate border-x-1" |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
'border-b-1': !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,13 +212,7 @@ const handleCancel = () => { |
|
|
|
<NcButton v-if="!isLoading" type="secondary" size="small" @click="handleCancel"> |
|
|
|
<NcButton v-if="!isLoading" type="secondary" size="small" @click="handleCancel"> |
|
|
|
{{ $t('general.cancel') }} |
|
|
|
{{ $t('general.cancel') }} |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
<NcButton |
|
|
|
<NcButton type="primary" size="sm" :is-loading="isLoading" data-testid="nc-token-save-btn" @click="generateToken"> |
|
|
|
type="primary" |
|
|
|
|
|
|
|
size="sm" |
|
|
|
|
|
|
|
:is-loading="isLoading" |
|
|
|
|
|
|
|
data-testid="nc-token-save-btn" |
|
|
|
|
|
|
|
@click="generateToken" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ $t('general.save') }} |
|
|
|
{{ $t('general.save') }} |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -238,7 +226,7 @@ const handleCancel = () => { |
|
|
|
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-1 pl-5 py-3 justify-between token" |
|
|
|
class="flex border-t-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"> |
|
|
@ -283,7 +271,6 @@ const handleCancel = () => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="pagination.total > 10" class="flex items-center justify-center mt-5"> |
|
|
|
<div v-if="pagination.total > 10" class="flex items-center justify-center mt-5"> |
|
|
@ -317,3 +304,8 @@ const handleCancel = () => { |
|
|
|
</GeneralDeleteModal> |
|
|
|
</GeneralDeleteModal> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
.token:last-child { |
|
|
|
|
|
|
|
@apply border-b-1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|