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 { //