From 615b4d231aaf1502fc0a9e435e35a200763f95dc Mon Sep 17 00:00:00 2001 From: ArvinLovegood Date: Mon, 14 Jul 2025 14:04:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor(updater):=E4=BC=98=E5=8C=96=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E6=9B=B4=E6=96=B0=E6=8F=90=E7=A4=BA=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=92=8C=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改更新提示内容,仅显示 commit message - 调整通知窗口样式,增加文本对齐和颜色设置 - 更新 README 中的下载链接描述,区分 MACOS 绿色版和安装版 --- README.md | 3 ++- app.go | 2 +- frontend/src/App.vue | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f5ea30e..d92749b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ ### 📦 立即体验 - 安装版:[go-stock-amd64-installer.exe](https://github.com/ArvinLovegood/go-stock/releases) - 绿色版:[go-stock-windows-amd64.exe](https://github.com/ArvinLovegood/go-stock/releases) -- MACOS版:[go-stock-darwin-universal](https://github.com/ArvinLovegood/go-stock/releases) +- MACOS绿色版:[go-stock-darwin-universal](https://github.com/ArvinLovegood/go-stock/releases) +- MACOS安装版:[go-stock-darwin-universal.pkg](https://github.com/ArvinLovegood/go-stock/releases) ### 💬 支持大模型/平台 diff --git a/app.go b/app.go index f5ebb09..751ed85 100644 --- a/app.go +++ b/app.go @@ -258,7 +258,7 @@ func (a *App) CheckUpdate() { "time": "发现新版本:" + releaseVersion.TagName, "isRed": false, "source": "go-stock", - "content": fmt.Sprintf("当前版本:%s, 最新版本:%s,后台开始下载...\n%s", Version, releaseVersion.TagName, commit.Message), + "content": fmt.Sprintf("%s", commit.Message), }) resp, err := resty.New().R().Get(downloadUrl) if err != nil { diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 3b75408..ee6ee86 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -10,7 +10,7 @@ import { } from '../wailsjs/runtime' import {h, onBeforeMount, onBeforeUnmount, onMounted, ref} from "vue"; import {RouterLink, useRouter} from 'vue-router' -import {createDiscreteApi,darkTheme,lightTheme , NIcon, NText,dateZhCN,zhCN} from 'naive-ui' +import {createDiscreteApi,darkTheme,lightTheme , NIcon, NText,NButton,dateZhCN,zhCN} from 'naive-ui' import { AlarmOutline, AnalyticsOutline, @@ -638,16 +638,24 @@ onMounted(() => { //type:"error", // avatar: () => h(NIcon,{component:Notifications,color:"red"}), title: data.time, - content: () => h(NText,{type:"error"}, { default: () => data.content }), + content: () => h('div',{type:"error",style:{ + "text-align":"left", + "font-size":"14px", + "color":"#f67979" + }}, { default: () => data.content }), meta: () => h(NText,{type:"warning"}, { default: () => data.source}), duration:1000*40, }) }else{ - notification.create({ + notification.create({ //type:"info", //avatar: () => h(NIcon,{component:Notifications}), title: data.time, - content: () => h(NText,{type:"info"}, { default: () => data.content }), + content: () => h('div',{type:"info",style:{ + "text-align":"left", + "font-size":"14px", + "color":"#F98C24" + }}, { default: () => data.content }), meta: () => h(NText,{type:"warning"}, { default: () => data.source}), duration:1000*30 , })