diff --git a/.env b/.env index 15bf070..64294f8 100644 --- a/.env +++ b/.env @@ -6,7 +6,7 @@ VITE_APP_TITLE=Snail Job VITE_APP_DESC=A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling. -VITE_APP_VERSION=1.4.0-beta1 +VITE_APP_VERSION=1.4.0 VITE_APP_DEFAULT_TOKEN=SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj diff --git a/src/views/group/modules/group-detail-drawer.vue b/src/views/group/modules/group-detail-drawer.vue index 267ccfc..d05ae19 100644 --- a/src/views/group/modules/group-detail-drawer.vue +++ b/src/views/group/modules/group-detail-drawer.vue @@ -1,8 +1,8 @@ @@ -26,7 +51,17 @@ const visible = defineModel('visible', { {{ rowData?.groupName }} - {{ rowData?.token }} + + + + {{ $t('page.groupConfig.token') }} + + + + + + {{ rowData?.token }} + {{ $t(groupConfigStatusRecord[rowData?.groupStatus!]) }} diff --git a/src/views/group/modules/group-operate-drawer.vue b/src/views/group/modules/group-operate-drawer.vue index 53d0976..c194f1b 100644 --- a/src/views/group/modules/group-operate-drawer.vue +++ b/src/views/group/modules/group-operate-drawer.vue @@ -172,7 +172,16 @@ async function handleCopy(source: string) { return; } - await copy(source); + if (navigator.clipboard && window.isSecureContext) { + await copy(source); + } else { + const range = document.createRange(); + range.selectNode(document.getElementById('tokenOperateInput')!); + const selection = window.getSelection(); + if (selection?.rangeCount) selection.removeAllRanges(); + selection?.addRange(range); + document.execCommand('copy'); + } window.$message?.success('复制成功'); } @@ -206,6 +215,7 @@ async function handleCopy(source: string) { @@ -135,6 +144,7 @@ async function handleCopy(source: string) { ('visible', { - +