From 467deefd281f4a1e4aa51b30a3dc2918b7e28998 Mon Sep 17 00:00:00 2001 From: JefferyHcool <1063474837@qq.com> Date: Fri, 20 Jun 2025 12:03:10 +0800 Subject: [PATCH] =?UTF-8?q?build:=E5=AE=8C=E6=88=90=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BillNote_frontend/src-tauri/tauri.conf.json | 6 +++--- .../pages/HomePage/components/MarkdownViewer.tsx | 16 ++++++++++++---- .../pages/HomePage/components/NoteHistory.tsx | 3 ++- .../src/pages/SettingPage/about.tsx | 2 +- README.md | 2 +- backend/app/services/note.py | 2 +- 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/BillNote_frontend/src-tauri/tauri.conf.json b/BillNote_frontend/src-tauri/tauri.conf.json index 4e874d3..f2cab3f 100644 --- a/BillNote_frontend/src-tauri/tauri.conf.json +++ b/BillNote_frontend/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "BiliNote", - "version": "0.1.0", + "version": "1.8.0", "identifier": "com.jefferyhuang.bilinote", "build": { "frontendDist": "../dist", @@ -13,8 +13,8 @@ "windows": [ { "title": "BiliNote", - "width": 1400, - "height": 900, + "width": 1600, + "height": 1000, "resizable": true, "fullscreen": false, "devtools": true diff --git a/BillNote_frontend/src/pages/HomePage/components/MarkdownViewer.tsx b/BillNote_frontend/src/pages/HomePage/components/MarkdownViewer.tsx index b287736..9c1e1f0 100644 --- a/BillNote_frontend/src/pages/HomePage/components/MarkdownViewer.tsx +++ b/BillNote_frontend/src/pages/HomePage/components/MarkdownViewer.tsx @@ -52,7 +52,7 @@ const MarkdownViewer: FC = ({ status }) => { const [modelName, setModelName] = useState('') const [style, setStyle] = useState('') const [createTime, setCreateTime] = useState('') - + const baseURL = String(import.meta.env.VITE_API_BASE_URL).replace('/api','') || '' const getCurrentTask = useTaskStore.getState().getCurrentTask const currentTask = useTaskStore(state => state.getCurrentTask()) const taskStatus = currentTask?.status || 'PENDING' @@ -306,8 +306,16 @@ const MarkdownViewer: FC = ({ status }) => { }, // Enhanced image with zoom capability - img: ({ node, ...props }) => ( -
+ img: ({ node, ...props }) =>{ + + let src = baseURL +props.src + props.src = src + + + return( + + +
= ({ status }) => { />
- ), + )}, // Better strong/bold text strong: ({ children, ...props }) => ( diff --git a/BillNote_frontend/src/pages/HomePage/components/NoteHistory.tsx b/BillNote_frontend/src/pages/HomePage/components/NoteHistory.tsx index 0038aa7..7cc3777 100644 --- a/BillNote_frontend/src/pages/HomePage/components/NoteHistory.tsx +++ b/BillNote_frontend/src/pages/HomePage/components/NoteHistory.tsx @@ -24,6 +24,7 @@ interface NoteHistoryProps { const NoteHistory: FC = ({ onSelect, selectedId }) => { const tasks = useTaskStore(state => state.tasks) const removeTask = useTaskStore(state => state.removeTask) + const baseURL = import.meta.env.VITE_API_BASE_URL || 'api/' const [rawSearch, setRawSearch] = useState('') const [search, setSearch] = useState('') const fuse = new Fuse(tasks, { @@ -101,7 +102,7 @@ const NoteHistory: FC = ({ onSelect, selectedId }) => { src={ task.audioMeta.cover_url - ? `/api/image_proxy?url=${encodeURIComponent(task.audioMeta.cover_url)}` + ? baseURL+`/image_proxy?url=${encodeURIComponent(task.audioMeta.cover_url)}` : '/placeholder.png' } alt="封面" diff --git a/BillNote_frontend/src/pages/SettingPage/about.tsx b/BillNote_frontend/src/pages/SettingPage/about.tsx index 44059e3..a0d3148 100644 --- a/BillNote_frontend/src/pages/SettingPage/about.tsx +++ b/BillNote_frontend/src/pages/SettingPage/about.tsx @@ -26,7 +26,7 @@ export default function AboutPage() { height={50} className="rounded-lg" /> -

BiliNote v1.7.5

+

BiliNote v1.8.0

AI 视频笔记生成工具 让 AI 为你的视频做笔记 diff --git a/README.md b/README.md index 72ef454..c73f2e3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

BiliNote Banner

-

BiliNote v1.7.5

+

BiliNote v1.8.0

AI 视频笔记生成工具 让 AI 为你的视频做笔记

diff --git a/backend/app/services/note.py b/backend/app/services/note.py index 650238f..1e71fce 100644 --- a/backend/app/services/note.py +++ b/backend/app/services/note.py @@ -50,7 +50,7 @@ BACKEND_BASE_URL = f"{API_BASE_URL}:{BACKEND_PORT}" # 输出目录(用于缓存音频、转写、Markdown 文件,以及存储截图) NOTE_OUTPUT_DIR = Path(os.getenv("NOTE_OUTPUT_DIR", "note_results")) NOTE_OUTPUT_DIR.mkdir(parents=True, exist_ok=True) -IMAGE_OUTPUT_DIR = os.getenv("OUT_DIR", "images") +IMAGE_OUTPUT_DIR = os.getenv("OUT_DIR", "./static/screenshots") # 图片基础 URL(用于生成 Markdown 中的图片链接,需前端静态目录对应) IMAGE_BASE_URL = os.getenv("IMAGE_BASE_URL", "/static/screenshots")