Add mobile tabs for videos and articles
All checks were successful
Deploy Dzen assistant / deploy (push) Successful in 2m2s
All checks were successful
Deploy Dzen assistant / deploy (push) Successful in 2m2s
This commit is contained in:
parent
ca6d953785
commit
1fcecc22e6
1 changed files with 42 additions and 2 deletions
|
|
@ -15,6 +15,7 @@ import {
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
FilePenLine,
|
FilePenLine,
|
||||||
FileText,
|
FileText,
|
||||||
|
Film,
|
||||||
Fingerprint,
|
Fingerprint,
|
||||||
ImagePlus,
|
ImagePlus,
|
||||||
Link2,
|
Link2,
|
||||||
|
|
@ -1277,6 +1278,7 @@ export default function App() {
|
||||||
const [authState, setAuthState] = useState<"loading" | "unauthenticated" | "authenticated">("loading")
|
const [authState, setAuthState] = useState<"loading" | "unauthenticated" | "authenticated">("loading")
|
||||||
const [hasPasskeys, setHasPasskeys] = useState(false)
|
const [hasPasskeys, setHasPasskeys] = useState(false)
|
||||||
const [activeView, setActiveView] = useState<"dashboard" | "settings">("dashboard")
|
const [activeView, setActiveView] = useState<"dashboard" | "settings">("dashboard")
|
||||||
|
const [mobileWorkspaceTab, setMobileWorkspaceTab] = useState<"videos" | "articles">("videos")
|
||||||
const [appSettings, setAppSettings] = useState<AppSettings>({
|
const [appSettings, setAppSettings] = useState<AppSettings>({
|
||||||
signatureHtml: "",
|
signatureHtml: "",
|
||||||
llmInstructions: "",
|
llmInstructions: "",
|
||||||
|
|
@ -2499,8 +2501,41 @@ export default function App() {
|
||||||
<p className="mt-3 text-xs leading-5 text-muted-foreground">Данные о диске недоступны.</p>
|
<p className="mt-3 text-xs leading-5 text-muted-foreground">Данные о диске недоступны.</p>
|
||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
<div className="workspace-tabs grid grid-cols-2 rounded-md border bg-background p-1 xl:hidden" role="tablist" aria-label="Рабочие разделы">
|
||||||
|
<button
|
||||||
|
aria-selected={mobileWorkspaceTab === "videos"}
|
||||||
|
className={`flex min-h-10 items-center justify-center gap-2 rounded-sm px-3 text-sm font-medium transition-colors ${
|
||||||
|
mobileWorkspaceTab === "videos" ? "bg-foreground text-background shadow-sm" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
||||||
|
}`}
|
||||||
|
id="workspace-tab-videos"
|
||||||
|
role="tab"
|
||||||
|
type="button"
|
||||||
|
onClick={() => setMobileWorkspaceTab("videos")}
|
||||||
|
>
|
||||||
|
<Film className="size-4" />
|
||||||
|
Ролики
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
aria-selected={mobileWorkspaceTab === "articles"}
|
||||||
|
className={`flex min-h-10 items-center justify-center gap-2 rounded-sm px-3 text-sm font-medium transition-colors ${
|
||||||
|
mobileWorkspaceTab === "articles" ? "bg-foreground text-background shadow-sm" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
||||||
|
}`}
|
||||||
|
id="workspace-tab-articles"
|
||||||
|
role="tab"
|
||||||
|
type="button"
|
||||||
|
onClick={() => setMobileWorkspaceTab("articles")}
|
||||||
|
>
|
||||||
|
<FileText className="size-4" />
|
||||||
|
Статьи
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<section className="workspace-grid grid gap-5 xl:grid-cols-2">
|
<section className="workspace-grid grid gap-5 xl:grid-cols-2">
|
||||||
<Card className="work-column min-w-0">
|
<Card
|
||||||
|
aria-labelledby="workspace-tab-videos"
|
||||||
|
className={`work-column min-w-0 ${mobileWorkspaceTab === "videos" ? "block" : "hidden"} xl:block`}
|
||||||
|
id="workspace-panel-videos"
|
||||||
|
role="tabpanel"
|
||||||
|
>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<div className="flex items-start justify-between gap-4">
|
<div className="flex items-start justify-between gap-4">
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -2648,7 +2683,12 @@ export default function App() {
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card className="work-column min-w-0">
|
<Card
|
||||||
|
aria-labelledby="workspace-tab-articles"
|
||||||
|
className={`work-column min-w-0 ${mobileWorkspaceTab === "articles" ? "block" : "hidden"} xl:block`}
|
||||||
|
id="workspace-panel-articles"
|
||||||
|
role="tabpanel"
|
||||||
|
>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<div className="flex items-start justify-between gap-4">
|
<div className="flex items-start justify-between gap-4">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue