openxiangda 1.0.63 → 1.0.65

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openxiangda",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "OpenXiangda CLI, workspace build tools, runtime SDK, and form components.",
5
5
  "private": false,
6
6
  "bin": {
@@ -101,6 +101,7 @@ export const router = createBrowserRouter([
101
101
  { path: "forms/:formUuid/new", element: routeElement(<FormRoutePage mode="submit" />) },
102
102
  ],
103
103
  },
104
+ { path: "file-preview", element: routeElement(<FilePreviewRoutePage />) },
104
105
  { path: "*", element: <NotFoundPage /> },
105
106
  ],
106
107
  },
@@ -235,12 +235,22 @@ export function AdminShell() {
235
235
  {mobileOpen ? (
236
236
  <div className="fixed inset-0 z-40 lg:hidden">
237
237
  <button
238
- aria-label="关闭导航"
238
+ aria-label="关闭导航遮罩"
239
239
  className="absolute inset-0 bg-slate-950/35"
240
240
  onClick={() => setMobileOpen(false)}
241
241
  type="button"
242
242
  />
243
- <div className="relative h-full w-[min(22rem,88vw)]">{sidebar}</div>
243
+ <div className="relative h-full w-[min(22rem,88vw)]">
244
+ <button
245
+ aria-label="关闭导航"
246
+ className="absolute right-3 top-3 z-50 grid h-10 w-10 place-items-center rounded-xl bg-slate-100 text-slate-700 shadow-sm ring-1 ring-slate-200"
247
+ onClick={() => setMobileOpen(false)}
248
+ type="button"
249
+ >
250
+ <X size={19} />
251
+ </button>
252
+ {sidebar}
253
+ </div>
244
254
  </div>
245
255
  ) : null}
246
256
 
@@ -1,4 +1,5 @@
1
1
  import { FileSearch, LockKeyhole, ShieldCheck, Ticket } from "lucide-react";
2
+ import { useParams } from "react-router-dom";
2
3
 
3
4
  import {
4
5
  MacDiagnosticPanel,
@@ -13,8 +14,9 @@ import {
13
14
  } from "@/runtime/default-page-overrides";
14
15
 
15
16
  export function FilePreviewRoutePage() {
17
+ const params = useParams();
16
18
  const ticket = new URLSearchParams(window.location.search).get("ticket") || "";
17
- const appType = process.env.OPENXIANGDA_APP_TYPE || process.env.APP_TYPE || "";
19
+ const appType = params.appType || process.env.OPENXIANGDA_APP_TYPE || process.env.APP_TYPE || "";
18
20
  const Override = resolveDefaultPageOverride(defaultPageOverrides, "file-preview");
19
21
  const defaultNode = ticket ? (
20
22
  <div className="min-w-0 space-y-5">