feat: 更新依赖版本,添加PWA更新组件,优化Sidebar组件,增加footer支持

This commit is contained in:
xiongxiao
2026-03-22 13:54:30 +08:00
committed by cnb
parent 518a3f2864
commit dd100fd7ef
9 changed files with 175 additions and 37 deletions

View File

@@ -90,13 +90,10 @@ export const useLayoutStore = create<LayoutStore>((set, get) => ({
setIsAdmin: (isAdmin) => set({ isAdmin }),
init: async () => {
await queryLogin.init();
const token = await queryLogin.checkLocalToken();
const token = await queryLogin.checkTokenValid();
if (token) {
set({ me: {} });
try {
// const data = await stackQueryClient.fetchQuery({
// queryKey: authQueryKeys.me,
// }) as UserInfo;
const userInfo = await queryLogin.checkLocalUser();
if (userInfo) {
set({ me: userInfo as UserInfo, isAdmin: userInfo.orgs?.includes?.('admin') || false });