feat: Adapt version handle for offline mode. (#10448)

This commit is contained in:
CityFun 2025-09-23 12:00:05 +08:00 committed by GitHub
parent 1d54dcc95c
commit ab77aa2b5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,12 +28,7 @@
{{ $t('license.community') }}
</span>
</el-link>
<el-link
underline="never"
class="version"
type="primary"
@click="releasesRef.acceptParams({ version: version })"
>
<el-link underline="never" class="version" type="primary" @click="getVersionLog()">
{{ version }}
</el-link>
<el-badge is-dot class="-mt-0.5" :hidden="version === 'Waiting' || !globalStore.hasNewVersion">
@ -91,7 +86,18 @@ const search = async () => {
version.value = res.data.systemVersion;
};
const getVersionLog = () => {
if (isOffLine) {
return;
}
releasesRef.value.acceptParams({ version: version });
};
const toLxware = () => {
if (isOffLine) {
to1Panel();
return;
}
if (!globalStore.isIntl) {
window.open('https://www.lxware.cn/1panel' + '', '_blank', 'noopener,noreferrer');
} else {
@ -99,6 +105,10 @@ const toLxware = () => {
}
};
const to1Panel = () => {
window.open('https://1panel.cn', '_blank', 'noopener,noreferrer');
};
const toDoc = () => {
window.open(docsUrl.value, '_blank', 'noopener,noreferrer');
};