feat(sj_1.0.0): 优化关于业务的链接404问题
This commit is contained in:
parent
2f9033c933
commit
6f4cde6ba3
2
.env
2
.env
@ -2,7 +2,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_DESC=A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.
|
||||||
|
|
||||||
VITE_APP_VERSION=3.1.0
|
VITE_APP_VERSION=1.0.0-beta2
|
||||||
|
|
||||||
# the prefix of the icon name
|
# the prefix of the icon name
|
||||||
VITE_ICON_PREFIX=icon
|
VITE_ICON_PREFIX=icon
|
||||||
|
@ -112,5 +112,5 @@
|
|||||||
"*": "eslint --fix"
|
"*": "eslint --fix"
|
||||||
},
|
},
|
||||||
"officialWebsite": "https://snailjob.opensnail.com",
|
"officialWebsite": "https://snailjob.opensnail.com",
|
||||||
"website": "https://snailjob.opensnail.com/pages/78ba75/"
|
"website": "https://snailjob.opensnail.com/docs/preview.html"
|
||||||
}
|
}
|
||||||
|
@ -1,41 +1,44 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
import pkg from '~/package.json';
|
import pkg from '~/package.json';
|
||||||
|
import { localStg } from '@/utils/storage';
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
|
|
||||||
const column = computed(() => (appStore.isMobile ? 1 : 2));
|
const column = computed(() => (appStore.isMobile ? 1 : 2));
|
||||||
|
|
||||||
interface PkgJson {
|
// interface PkgJson {
|
||||||
name: string;
|
// name: string;
|
||||||
version: string;
|
// dependencies: PkgVersionInfo[];
|
||||||
dependencies: PkgVersionInfo[];
|
// devDependencies: PkgVersionInfo[];
|
||||||
devDependencies: PkgVersionInfo[];
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
interface PkgVersionInfo {
|
// interface PkgVersionInfo {
|
||||||
name: string;
|
// name: string;
|
||||||
version: string;
|
// version: string;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const { name, version, dependencies, devDependencies } = pkg;
|
const { VITE_APP_VERSION } = import.meta.env;
|
||||||
|
|
||||||
function transformVersionData(tuple: [string, string]): PkgVersionInfo {
|
// const { name, dependencies, devDependencies } = pkg;
|
||||||
const [$name, $version] = tuple;
|
//
|
||||||
return {
|
// function transformVersionData(tuple: [string, string]): PkgVersionInfo {
|
||||||
name: $name,
|
// const [$name, $version] = tuple;
|
||||||
version: $version
|
// return {
|
||||||
};
|
// name: $name,
|
||||||
}
|
// version: $version
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
|
||||||
const pkgJson: PkgJson = {
|
const version = ref<string>(`${localStg.get('version') || VITE_APP_VERSION}`);
|
||||||
name,
|
|
||||||
version,
|
// const pkgJson: PkgJson = {
|
||||||
dependencies: Object.entries(dependencies).map(item => transformVersionData(item)),
|
// name,
|
||||||
devDependencies: Object.entries(devDependencies).map(item => transformVersionData(item))
|
// dependencies: Object.entries(dependencies).map(item => transformVersionData(item)),
|
||||||
};
|
// devDependencies: Object.entries(devDependencies).map(item => transformVersionData(item))
|
||||||
|
// };
|
||||||
|
|
||||||
const latestBuildTime = BUILD_TIME;
|
const latestBuildTime = BUILD_TIME;
|
||||||
</script>
|
</script>
|
||||||
@ -53,7 +56,7 @@ const latestBuildTime = BUILD_TIME;
|
|||||||
</a>
|
</a>
|
||||||
</NDescriptionsItem>
|
</NDescriptionsItem>
|
||||||
<NDescriptionsItem :label="$t('page.about.projectInfo.version')">
|
<NDescriptionsItem :label="$t('page.about.projectInfo.version')">
|
||||||
<NTag type="primary">{{ pkgJson.version }}</NTag>
|
<NTag type="primary">{{ version }}</NTag>
|
||||||
</NDescriptionsItem>
|
</NDescriptionsItem>
|
||||||
<NDescriptionsItem :label="$t('page.about.projectInfo.githubLink')">
|
<NDescriptionsItem :label="$t('page.about.projectInfo.githubLink')">
|
||||||
<a class="text-primary" :href="pkg.repository.githubUrl" target="_blank" rel="noopener noreferrer">
|
<a class="text-primary" :href="pkg.repository.githubUrl" target="_blank" rel="noopener noreferrer">
|
||||||
|
Loading…
Reference in New Issue
Block a user