openxiangda 1.0.90 → 1.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ import {
5
5
  useParams,
6
6
  } from "react-router-dom";
7
7
  import { lazy, Suspense, type ReactNode } from "react";
8
- import { Sparkles } from "lucide-react";
8
+ import { ShieldAlert, Sparkles } from "lucide-react";
9
9
  import {
10
10
  LoginPage,
11
11
  OpenXiangdaPageProvider,
@@ -55,6 +55,26 @@ const routeElement = (element: ReactNode) => (
55
55
  </Suspense>
56
56
  );
57
57
 
58
+ const publicAccessFallback = (
59
+ <StatePage
60
+ description="正在创建公开访问会话。"
61
+ fullScreen
62
+ icon={<Sparkles size={24} />}
63
+ status="PUBLIC"
64
+ title="正在进入公开页面"
65
+ />
66
+ );
67
+
68
+ const publicAccessErrorFallback = (error: { message?: string }) => (
69
+ <StatePage
70
+ description={error.message || "公开链接不可用或已过期。"}
71
+ fullScreen
72
+ icon={<ShieldAlert size={24} />}
73
+ status="PUBLIC"
74
+ title="链接不可用"
75
+ />
76
+ );
77
+
58
78
  function RuntimeRoot() {
59
79
  const { appType = process.env.OPENXIANGDA_APP_TYPE || "" } = useParams();
60
80
  return (
@@ -86,6 +106,8 @@ export const router = createBrowserRouter([
86
106
  path: "public/register",
87
107
  element: routeElement(
88
108
  <PublicAccessGate
109
+ errorFallback={publicAccessErrorFallback}
110
+ fallback={publicAccessFallback}
89
111
  policyCode="public_register"
90
112
  routeCode="public.register"
91
113
  >