refactor: keep only dashboard sidebars and their state
This commit is contained in:
+132
-810
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,12 @@
|
|||||||
import { Suspense } from "react";
|
import { Suspense } from "react";
|
||||||
import { Brand } from "@/components/brand";
|
|
||||||
import Dashboard from "./dashboard";
|
import Dashboard from "./dashboard";
|
||||||
|
|
||||||
export default function DashboardPage() {
|
export default function DashboardPage() {
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={
|
<Suspense fallback={
|
||||||
<div className="loading-page">
|
<div className="dashboard sidebar-only" aria-label="正在加载侧边栏" aria-busy="true">
|
||||||
<Brand />
|
<aside className="icon-rail" />
|
||||||
<p>正在打开你的创作空间…</p>
|
<aside className="workspace-sidebar" />
|
||||||
</div>
|
</div>
|
||||||
}>
|
}>
|
||||||
<Dashboard />
|
<Dashboard />
|
||||||
|
|||||||
@@ -2863,3 +2863,13 @@ a.bg-primary {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Keep the sidebar-only dashboard accessible at narrow viewport widths. */
|
||||||
|
.sidebar-only .workspace-sidebar {
|
||||||
|
display: block;
|
||||||
|
max-width: calc(100vw - 48px);
|
||||||
|
}
|
||||||
|
.sidebar-only button:disabled {
|
||||||
|
opacity: 0.45;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user