Merge remote-tracking branch 'github/feat/ui-1.1.0' into feature-plugin

# Conflicts:
#	ui/src/hooks/index.ts
This commit is contained in:
LinkinStars
2023-02-21 18:14:49 +08:00
3 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ import useChangeUserRoleModal from './useChangeUserRoleModal';
import useUserModal from './useUserModal';
import useChangePasswordModal from './useChangePasswordModal';
import usePageTags from './usePageTags';
import usePromptWithUnload from './usePrompt';
import useLoginRedirect from './useLoginRedirect';
import usePromptWithUnload from './usePrompt';
export {
useTagModal,
@@ -22,6 +22,6 @@ export {
useUserModal,
useChangePasswordModal,
usePageTags,
usePromptWithUnload,
useLoginRedirect,
usePromptWithUnload,
};
+4 -1
View File
@@ -24,7 +24,10 @@ const routes: RouteNode[] = [
{
path: '/',
page: 'pages/Layout',
loader: guard.setupApp,
loader: async () => {
await guard.setupApp();
return null;
},
guard: () => {
const gr = guard.shouldLoginRequired();
if (!gr.ok) {
-1
View File
@@ -85,7 +85,6 @@ export const pullLoggedUser = async (forceRePull = false) => {
if (Date.now() - dedupeTimestamp < 1000 * 10) {
return;
}
dedupeTimestamp = Date.now();
const loggedUserInfo = await getLoggedUserInfo().catch((ex) => {
dedupeTimestamp = 0;