diff --git a/src/components/TableFormatters/ShowKeyCopyFormatter.vue b/src/components/TableFormatters/ShowKeyCopyFormatter.vue new file mode 100644 index 000000000..6ce047a24 --- /dev/null +++ b/src/components/TableFormatters/ShowKeyCopyFormatter.vue @@ -0,0 +1,82 @@ + + + + diff --git a/src/components/TableFormatters/index.js b/src/components/TableFormatters/index.js index 18413ed41..8cbb56dde 100644 --- a/src/components/TableFormatters/index.js +++ b/src/components/TableFormatters/index.js @@ -7,6 +7,7 @@ import DeleteActionFormatter from './DeleteActionFormatter' import DateFormatter from './DateFormatter' import SystemUserFormatter from './GrantedSystemUsersShowFormatter' import ShowKeyFormatter from '@/components/TableFormatters/ShowKeyFormatter' +import ShowKeyCopyFormatter from './ShowKeyCopyFormatter' import DialogDetailFormatter from './DialogDetailFormatter' import EditableInputFormatter from './EditableInputFormatter' import StatusFormatter from './StatusFormatter' @@ -21,6 +22,7 @@ export default { DateFormatter, SystemUserFormatter, ShowKeyFormatter, + ShowKeyCopyFormatter, DialogDetailFormatter, ArrayFormatter, EditableInputFormatter, @@ -37,6 +39,7 @@ export { DateFormatter, SystemUserFormatter, ShowKeyFormatter, + ShowKeyCopyFormatter, DialogDetailFormatter, ArrayFormatter, EditableInputFormatter, diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 7a1eacd37..ade7ff2e6 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -315,6 +315,7 @@ "Disable": "Disable", "Download": "Download", "Copy": "Copy", + "CopySuccess": "Copy success", "Enable": "Enable", "On/Off": "On/Off", "EnterForSearch": "Press enter to search", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index e7ab41908..c07ea6ed6 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -327,6 +327,7 @@ "Disable": "無効", "Download": "ダウンロード", "Copy": "コピー", + "CopySuccess": "コピー成功", "Enable": "有効化", "On/Off": "起動/停止", "EnterForSearch": "Enterキーを押して検索します", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index d10c496e9..df2ec91cc 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -328,6 +328,7 @@ "Disable": "禁用", "Download": "下载", "Copy": "复制", + "CopySuccess": "复制成功", "Enable": "启用", "On/Off": "启/停", "EnterForSearch": "按回车进行搜索", diff --git a/src/layout/components/NavHeader/AccountDropdown.vue b/src/layout/components/NavHeader/AccountDropdown.vue index 8198ffff6..4f2014ab5 100644 --- a/src/layout/components/NavHeader/AccountDropdown.vue +++ b/src/layout/components/NavHeader/AccountDropdown.vue @@ -9,7 +9,7 @@ {{ $t('common.nav.Profile') }} {{ $t('common.nav.APIKey') }} - {{ $t('common.nav.TempPassword') }} + {{ $t('common.nav.TempPassword') }} {{ $t('common.nav.Logout') }} diff --git a/src/router/profile/index.js b/src/router/profile/index.js index f3f8957d5..30c8899d1 100644 --- a/src/router/profile/index.js +++ b/src/router/profile/index.js @@ -61,6 +61,7 @@ export default { meta: { title: i18n.t('common.nav.TempPassword'), icon: 'magic', + hidden: ({ settings }) => !settings['AUTH_TEMP_TOKEN'], permissions: [] } } diff --git a/src/utils/auth.js b/src/utils/auth.js index 74473856a..3bc96dd72 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -5,7 +5,8 @@ const CURRENT_ORG_KEY = 'jms_current_org' const CURRENT_ROLE_KEY = 'jms_current_role' export function getTokenFromCookie() { - return VueCookie.get(TOKEN_KEY) + const cookieNamePrefix = VueCookie.get('SESSION_COOKIE_NAME_PREFIX', '') + return VueCookie.get(cookieNamePrefix + TOKEN_KEY) } export function getCurrentRoleLocal(username) { diff --git a/src/views/profile/ApiKey.vue b/src/views/profile/ApiKey.vue index 474c50e29..aded174ea 100644 --- a/src/views/profile/ApiKey.vue +++ b/src/views/profile/ApiKey.vue @@ -9,7 +9,7 @@