From e0f30b678b888d2c4d16c2c0b56be660781bbf7a Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 5 Oct 2023 10:24:48 +0000 Subject: [PATCH] refactor: limit token creation in ui level --- packages/nc-gui/components/account/Token.vue | 36 +++++++++++--------- packages/nc-gui/lang/en.json | 1 + 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/packages/nc-gui/components/account/Token.vue b/packages/nc-gui/components/account/Token.vue index 049495e54a..8b0b84c1fd 100644 --- a/packages/nc-gui/components/account/Token.vue +++ b/packages/nc-gui/components/account/Token.vue @@ -2,7 +2,7 @@ import type { VNodeRef } from '@vue/runtime-core' import { message } from 'ant-design-vue' import type { ApiTokenType, RequestParams } from 'nocodb-sdk' -import { extractSdkResponseErrorMsg, ref, useApi, useCopy, useNuxtApp } from '#imports' +import { extractSdkResponseErrorMsg, isEeUI, ref, useApi, useCopy, useNuxtApp } from '#imports' const { api, isLoading } = useApi() @@ -164,21 +164,25 @@ const handleCancel = () => {
{{ $t('title.apiTokens') }}
- - - - - - + + + + + + + + +
{{ $t('msg.apiTokenCreate') }}
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 5d66c9b49f..b140958c9a 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -388,6 +388,7 @@ } }, "labels": { + "tokenLimit": "Only one token per user is allowed", "duplicateAttachment": "File with name {filename} already attached", "toAddress": "To Address", "subject": "Subject",