-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c655a24
commit a2b6b4e
Showing
9 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<script setup lang="ts"> | ||
import { $t } from '@/locales'; | ||
import pkg from '~/package.json'; | ||
interface PkgJson { | ||
name: string; | ||
version: string; | ||
dependencies: PkgVersionInfo[]; | ||
devDependencies: PkgVersionInfo[]; | ||
} | ||
interface PkgVersionInfo { | ||
name: string; | ||
version: string; | ||
} | ||
const { name, version, dependencies, devDependencies } = pkg; | ||
function transformVersionData(tuple: [string, string]): PkgVersionInfo { | ||
const [$name, $version] = tuple; | ||
return { | ||
name: $name, | ||
version: $version | ||
}; | ||
} | ||
const pkgJson: PkgJson = { | ||
name, | ||
version, | ||
dependencies: Object.entries(dependencies).map(item => transformVersionData(item)), | ||
devDependencies: Object.entries(devDependencies).map(item => transformVersionData(item)) | ||
}; | ||
const latestBuildTime = BUILD_TIME; | ||
</script> | ||
|
||
<template> | ||
<ASpace direction="vertical" :size="16"> | ||
<ACard :title="$t('page.about.title')" :bordered="false" class="card-wrapper"> | ||
<p>{{ $t('page.about.introduction') }}</p> | ||
</ACard> | ||
<ACard :title="$t('page.about.projectInfo.title')" :bordered="false" class="card-wrapper"> | ||
<ADescriptions label-placement="left" bordered size="small" :column="{ xs: 1, sm: 2 }"> | ||
<ADescriptionsItem :label="$t('page.about.projectInfo.version')"> | ||
<ATag type="primary">{{ pkgJson.version }}</ATag> | ||
</ADescriptionsItem> | ||
<ADescriptionsItem :label="$t('page.about.projectInfo.latestBuildTime')"> | ||
<ATag type="primary">{{ latestBuildTime }}</ATag> | ||
</ADescriptionsItem> | ||
<ADescriptionsItem :label="$t('page.about.projectInfo.githubLink')"> | ||
<a class="text-primary" :href="pkg.homepage" target="_blank" rel="noopener noreferrer"> | ||
{{ $t('page.about.projectInfo.githubLink') }} | ||
</a> | ||
</ADescriptionsItem> | ||
<ADescriptionsItem :label="$t('page.about.projectInfo.previewLink')"> | ||
<a class="text-primary" :href="pkg.website" target="_blank" rel="noopener noreferrer"> | ||
{{ $t('page.about.projectInfo.previewLink') }} | ||
</a> | ||
</ADescriptionsItem> | ||
</ADescriptions> | ||
</ACard> | ||
<ACard :title="$t('page.about.prdDep')" :bordered="false" class="card-wrapper"> | ||
<ADescriptions label-placement="left" bordered size="small" :column="{ xs: 1, sm: 2 }"> | ||
<ADescriptionsItem v-for="item in pkgJson.dependencies" :key="item.name" :label="item.name"> | ||
{{ item.version }} | ||
</ADescriptionsItem> | ||
</ADescriptions> | ||
</ACard> | ||
<ACard :title="$t('page.about.devDep')" :bordered="false" class="card-wrapper"> | ||
<ADescriptions label-placement="left" bordered size="small" :column="{ xs: 1, sm: 2 }"> | ||
<ADescriptionsItem v-for="item in pkgJson.devDependencies" :key="item.name" :label="item.name"> | ||
{{ item.version }} | ||
</ADescriptionsItem> | ||
</ADescriptions> | ||
</ACard> | ||
</ASpace> | ||
</template> | ||
|
||
<style scoped></style> |