Skip to content

Commit

Permalink
chore:点击复制版本号(#5894) (#6077)
Browse files Browse the repository at this point in the history
  • Loading branch information
see-more authored Aug 9, 2024
1 parent c9a204b commit 15f4c05
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/components/system-upgrade/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
<el-button type="primary" link @click="toHalo">
<span class="font-normal">{{ isProductPro ? $t('license.pro') : $t('license.community') }}</span>
</el-button>
<span class="version">{{ version }}</span>
<span v-if="isSupported" class="version" @click="copy(version)">
{{ copied ? $t('commons.msg.copySuccess') : version }}
</span>
<span class="version" v-else>{{ version }}</span>
<el-badge is-dot style="margin-top: -3px" v-if="version !== 'Waiting' && globalStore.hasNewVersion">
<el-button type="primary" link @click="onLoadUpgradeInfo">
<span class="font-normal">({{ $t('setting.hasNewVersion') }})</span>
Expand Down Expand Up @@ -85,9 +88,11 @@ import { onMounted, ref } from 'vue';
import { GlobalStore } from '@/store';
import { ElMessageBox } from 'element-plus';
import { storeToRefs } from 'pinia';
import { useClipboard } from '@vueuse/core';
const globalStore = GlobalStore();
const { isDarkTheme } = storeToRefs(globalStore);
const { copied, copy, isSupported } = useClipboard();
const version = ref<string>('');
const isProductPro = ref();
Expand Down Expand Up @@ -190,6 +195,7 @@ onMounted(() => {
color: var(--dark-gold-base-color);
text-decoration: none;
letter-spacing: 0.5px;
cursor: pointer;
}
.line-height {
line-height: 25px;
Expand Down

0 comments on commit 15f4c05

Please sign in to comment.