-
Notifications
You must be signed in to change notification settings - Fork 257
chore: update version to 7.12.10 #750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c4e66c2
3242aff
73a3186
80ff96b
d8eeb5f
0935636
193d826
d2cd398
10bb429
9591348
fe1826c
aeef973
34dee17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| {"name":"llonebot-dist","version":"7.12.9","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}} | ||
| {"name":"llonebot-dist","version":"7.12.10","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,7 +73,7 @@ export class NTQQUserApi extends Service { | |
| return (await this.ctx.pmhq.invoke('nodeIKernelUixConvertService/getUin', [[uid]])).uinInfo.get(uid) | ||
| }, | ||
| async () => { | ||
| return (await this.fetchUserDetailInfo(uid)).detail.get(uid)?.uin | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: 新的 之前的兜底逻辑使用的是 Original comment in Englishissue: New The previous fallback used |
||
| return (await this.getUserSimpleInfo(uid)).uin | ||
| }, | ||
| ] | ||
|
|
||
|
|
@@ -91,7 +91,7 @@ export class NTQQUserApi extends Service { | |
| return '' | ||
| } | ||
|
|
||
| // 这个会从服务器拉取,比较可靠 | ||
| /** 始终会从服务器拉取 */ | ||
| async fetchUserDetailInfo(uid: string) { | ||
| return await this.ctx.pmhq.invoke( | ||
| 'nodeIKernelProfileService/fetchUserDetailInfo', | ||
|
|
@@ -119,6 +119,7 @@ export class NTQQUserApi extends Service { | |
| return result | ||
| } | ||
|
|
||
| /** 无缓存时会从服务器拉取 */ | ||
| async getUserSimpleInfo(uid: string, force = true) { | ||
| const data = await this.ctx.pmhq.invoke<Map<string, SimpleInfo>>( | ||
| 'nodeIKernelProfileService/getUserSimpleInfo', | ||
|
|
@@ -134,6 +135,7 @@ export class NTQQUserApi extends Service { | |
| return data.get(uid)! | ||
| } | ||
|
|
||
| /** 无缓存时会获取不到用户信息 */ | ||
| async getCoreAndBaseInfo(uids: string[]) { | ||
| return await this.ctx.pmhq.invoke( | ||
| 'nodeIKernelProfileService/getCoreAndBaseInfo', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export const version = '7.12.9' | ||
| export const version = '7.12.10' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,18 @@ | ||
| import React from 'react' | ||
| import { X, Sun, Moon, Monitor, Eye, EyeOff } from 'lucide-react' | ||
| import { X, Sun, Moon, Monitor, Eye, EyeOff, LogOut } from 'lucide-react' | ||
| import { useThemeStore } from '../../stores/themeStore' | ||
| import { useSettingsStore } from '../../stores/settingsStore' | ||
|
|
||
| interface SettingsDialogProps { | ||
| visible: boolean | ||
| onClose: () => void | ||
| onLogout?: () => void | ||
| } | ||
|
|
||
| const SettingsDialog: React.FC<SettingsDialogProps> = ({ visible, onClose }) => { | ||
| const SettingsDialog: React.FC<SettingsDialogProps> = ({ visible, onClose, onLogout }) => { | ||
| const { mode, setMode } = useThemeStore() | ||
| const { autoHideSidebarInWebQQ, setAutoHideSidebarInWebQQ, showWebQQFullscreenButton, setShowWebQQFullscreenButton } = useSettingsStore() | ||
| const [showLogoutConfirm, setShowLogoutConfirm] = React.useState(false) | ||
|
|
||
| if (!visible) return null | ||
|
|
||
|
Comment on lines
+15
to
18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): 需要保护可选的 由于 Original comment in Englishissue (bug_risk): Guard optional Since |
||
|
|
@@ -111,7 +113,14 @@ const SettingsDialog: React.FC<SettingsDialogProps> = ({ visible, onClose }) => | |
| </div> | ||
|
|
||
| {/* Footer */} | ||
| <div className="flex justify-end gap-3 p-6 border-t border-theme-divider"> | ||
| <div className="flex justify-between gap-3 p-6 border-t border-theme-divider"> | ||
| <button | ||
| onClick={() => setShowLogoutConfirm(true)} | ||
| className="flex items-center gap-2 px-4 py-2.5 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-xl transition-colors font-medium" | ||
| > | ||
| <LogOut size={18} /> | ||
| 退出 WebUI | ||
| </button> | ||
| <button | ||
| onClick={onClose} | ||
| className="px-6 py-2.5 bg-theme-item hover:bg-theme-item-hover text-theme rounded-xl transition-colors font-medium" | ||
|
|
@@ -120,6 +129,33 @@ const SettingsDialog: React.FC<SettingsDialogProps> = ({ visible, onClose }) => | |
| </button> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Logout Confirm Dialog */} | ||
| {showLogoutConfirm && ( | ||
| <div className="fixed inset-0 z-[10000] flex items-center justify-center"> | ||
| <div className="absolute inset-0 bg-black/50 backdrop-blur-sm" onClick={() => setShowLogoutConfirm(false)} /> | ||
| <div className="relative bg-theme-card rounded-2xl shadow-2xl w-full max-w-sm mx-4 p-6"> | ||
| <h3 className="text-lg font-semibold text-theme mb-2">确认退出</h3> | ||
| <p className="text-sm text-theme-secondary mb-6"> | ||
| 确定要退出 WebUI 吗?这不会退出 QQ,仅清除 WebUI 登录状态。 | ||
| </p> | ||
| <div className="flex justify-end gap-3"> | ||
| <button | ||
| onClick={() => setShowLogoutConfirm(false)} | ||
| className="px-4 py-2 bg-theme-item hover:bg-theme-item-hover text-theme rounded-xl transition-colors font-medium" | ||
| > | ||
| 取消 | ||
| </button> | ||
| <button | ||
| onClick={onLogout} | ||
| className="px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-xl transition-colors font-medium" | ||
| > | ||
| 确认退出 | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| )} | ||
| </div> | ||
| ) | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk):
filterMsgToTime与filterMsgFromTime之间类型不一致,可能带来问题。现在
filterMsgToTime传的是String(filterMsgTime + 1),而filterMsgFromTime仍然是一个数字。如果 API 预期这两个字段的类型一致,这种不匹配可能会导致一些隐蔽的问题。建议根据 PMHQ/NT API 的约定统一这两个字段的类型,例如都传字符串(String(filterMsgTime)和String(filterMsgTime + 1)),或者都传数字。Original comment in English
issue (bug_risk): Inconsistent typing between
filterMsgToTimeandfilterMsgFromTimemay be problematic.filterMsgToTimeis now passed asString(filterMsgTime + 1)whilefilterMsgFromTimeis still a number. If the API expects these fields to share a type, this mismatch could lead to subtle issues. Consider normalizing both fields, e.g.String(filterMsgTime)andString(filterMsgTime + 1), or both as numbers, based on the PMHQ/NT API contract.