From 6294b47c32bdae00cca10f7877a2225e66496f35 Mon Sep 17 00:00:00 2001 From: naiy Date: Fri, 31 Jul 2026 04:07:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=86=E4=B9=A6=E6=9E=B6=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=8A=A0=E5=85=A5=E7=94=A8=E6=88=B7=E7=9A=84=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/bookshelf.svg | 15 +++++++++++++++ src/hooks/userHook.ts | 20 +++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 src/assets/bookshelf.svg diff --git a/src/assets/bookshelf.svg b/src/assets/bookshelf.svg new file mode 100644 index 0000000..d92df61 --- /dev/null +++ b/src/assets/bookshelf.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/src/hooks/userHook.ts b/src/hooks/userHook.ts index 6514e88..ed73dba 100644 --- a/src/hooks/userHook.ts +++ b/src/hooks/userHook.ts @@ -1,5 +1,6 @@ import { getDetailedUserInfo, userState } from '../api/user' import type { HookConfig } from '../config' +import bookshelf from '../assets/bookshelf.svg?raw' function formatReadingTime(readBookTime: bigint): string { let minutes = readBookTime / 60_000n @@ -8,7 +9,7 @@ function formatReadingTime(readBookTime: bigint): string { return `${hours} 时 ${minutes} 分` } -function createMenuItem(text: string): HTMLDivElement { +function createMenuItem(text: string, icon?: string, onclick?: () => void): HTMLDivElement { //