chore: bump version to v1.0.4

This commit is contained in:
ctwj
2025-07-20 22:57:20 +08:00
parent 2cb91072ba
commit c76298a10b
6 changed files with 22 additions and 68 deletions

View File

@@ -1 +1 @@
1.0.3
1.0.4

View File

@@ -95,6 +95,19 @@ update_version_in_files() {
echo -e " ✅ 更新 web/package.json"
fi
# 更新useVersion.ts中的默认版本
if [ -f "web/composables/useVersion.ts" ]; then
# 使用更简单的模式匹配,先获取当前版本号
current_use_version=$(grep -o "version: '[0-9]\+\.[0-9]\+\.[0-9]\+'" web/composables/useVersion.ts | head -1)
if [ -n "$current_use_version" ]; then
sed -i.bak "s/$current_use_version/version: '${new_version}'/" web/composables/useVersion.ts
rm -f web/composables/useVersion.ts.bak
echo -e " ✅ 更新 web/composables/useVersion.ts"
else
echo -e " ⚠️ 未找到useVersion.ts中的版本号"
fi
fi
# 更新Docker镜像标签
if [ -f "docker-compose.yml" ]; then
sed -i.bak "s/image:.*:.*/image: urldb:${new_version}/" docker-compose.yml

View File

@@ -12,7 +12,7 @@
<script setup lang="ts">
// 使用版本信息组合式函数
const { versionInfo } = useVersion()
const { versionInfo, fetchVersionInfo } = useVersion()
// 获取系统配置
const { data: systemConfigData } = await useAsyncData('systemConfig',
@@ -20,4 +20,9 @@ const { data: systemConfigData } = await useAsyncData('systemConfig',
)
const systemConfig = computed(() => (systemConfigData.value as any)?.data || { copyright: '© 2025 网盘资源数据库 By 老九' })
// 组件挂载时获取版本信息
onMounted(() => {
fetchVersionInfo()
})
</script>

View File

@@ -18,7 +18,7 @@ interface VersionResponse {
export const useVersion = () => {
const versionInfo = ref<VersionInfo>({
version: '1.0.0',
version: '1.0.3',
build_time: '',
git_commit: 'unknown',
git_branch: 'unknown',

View File

@@ -1,6 +1,6 @@
{
"name": "res-db-web",
"version": "1.0.1",
"version": "1.0.3",
"private": true,
"type": "module",
"scripts": {

View File

@@ -15,70 +15,6 @@
<!-- 版本信息组件 -->
<VersionInfo />
<!-- 版本历史 -->
<div class="mt-8 bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">
<i class="fas fa-history mr-2 text-green-500"></i>
版本历史
</h3>
<div class="space-y-4">
<div v-for="(version, index) in versionHistory" :key="index"
class="border-l-4 border-blue-500 pl-4 py-2">
<div class="flex items-center justify-between">
<div>
<h4 class="font-medium text-gray-900 dark:text-white">
v{{ version.version }}
</h4>
<p class="text-sm text-gray-600 dark:text-gray-400 mt-1">
{{ version.date }}
</p>
</div>
<span class="px-2 py-1 text-xs rounded-full"
:class="getVersionTypeClass(version.type)">
{{ version.type }}
</span>
</div>
<ul class="mt-2 space-y-1">
<li v-for="(change, changeIndex) in version.changes" :key="changeIndex"
class="text-sm text-gray-600 dark:text-gray-400 flex items-start">
<span class="mr-2 mt-1" :class="getChangeTypeClass(change.type)">
{{ getChangeTypeIcon(change.type) }}
</span>
{{ change.description }}
</li>
</ul>
</div>
</div>
</div>
<!-- 构建信息 -->
<div class="mt-8 bg-white dark:bg-gray-800 rounded-lg shadow-md p-6">
<h3 class="text-lg font-semibold text-gray-900 dark:text-white mb-4">
<i class="fas fa-cogs mr-2 text-purple-500"></i>
构建信息
</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="p-3 bg-gray-50 dark:bg-gray-700 rounded">
<span class="text-sm text-gray-600 dark:text-gray-400">构建环境</span>
<p class="font-mono text-gray-900 dark:text-white">Go 1.23.0</p>
</div>
<div class="p-3 bg-gray-50 dark:bg-gray-700 rounded">
<span class="text-sm text-gray-600 dark:text-gray-400">前端框架</span>
<p class="font-mono text-gray-900 dark:text-white">Nuxt.js 3.8.0</p>
</div>
<div class="p-3 bg-gray-50 dark:bg-gray-700 rounded">
<span class="text-sm text-gray-600 dark:text-gray-400">数据库</span>
<p class="font-mono text-gray-900 dark:text-white">PostgreSQL 15+</p>
</div>
<div class="p-3 bg-gray-50 dark:bg-gray-700 rounded">
<span class="text-sm text-gray-600 dark:text-gray-400">部署方式</span>
<p class="font-mono text-gray-900 dark:text-white">Docker</p>
</div>
</div>
</div>
</div>
</div>
</div>