chore: frontend build
This commit is contained in:
147
bootstrap/ssr/assets/layout-BQI5MpcL.js
Normal file
147
bootstrap/ssr/assets/layout-BQI5MpcL.js
Normal file
@@ -0,0 +1,147 @@
|
||||
import { jsx, jsxs } from "react/jsx-runtime";
|
||||
import { c as cn, q as queryParams, B as Button } from "./index-CY6fYws-.js";
|
||||
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
||||
import { e as edit$2 } from "./index-BuzAnds1.js";
|
||||
import { e as edit$1 } from "./app-layout-BFyUFda2.js";
|
||||
import { b as show } from "./index-BHwjGIZD.js";
|
||||
import { Link } from "@inertiajs/react";
|
||||
function Separator({
|
||||
className,
|
||||
orientation = "horizontal",
|
||||
decorative = true,
|
||||
...props
|
||||
}) {
|
||||
return /* @__PURE__ */ jsx(
|
||||
SeparatorPrimitive.Root,
|
||||
{
|
||||
"data-slot": "separator-root",
|
||||
decorative,
|
||||
orientation,
|
||||
className: cn(
|
||||
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
||||
className
|
||||
),
|
||||
...props
|
||||
}
|
||||
);
|
||||
}
|
||||
function HeadingSmall({
|
||||
title,
|
||||
description
|
||||
}) {
|
||||
return /* @__PURE__ */ jsxs("header", { children: [
|
||||
/* @__PURE__ */ jsx("h3", { className: "mb-0.5 text-base font-medium", children: title }),
|
||||
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
||||
] });
|
||||
}
|
||||
function Heading({
|
||||
title,
|
||||
description
|
||||
}) {
|
||||
return /* @__PURE__ */ jsxs("div", { className: "mb-8 space-y-0.5", children: [
|
||||
/* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold tracking-tight", children: title }),
|
||||
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
||||
] });
|
||||
}
|
||||
const edit = (options) => ({
|
||||
url: edit.url(options),
|
||||
method: "get"
|
||||
});
|
||||
edit.definition = {
|
||||
methods: ["get", "head"],
|
||||
url: "/settings/appearance"
|
||||
};
|
||||
edit.url = (options) => {
|
||||
return edit.definition.url + queryParams(options);
|
||||
};
|
||||
edit.get = (options) => ({
|
||||
url: edit.url(options),
|
||||
method: "get"
|
||||
});
|
||||
edit.head = (options) => ({
|
||||
url: edit.url(options),
|
||||
method: "head"
|
||||
});
|
||||
const editForm = (options) => ({
|
||||
action: edit.url(options),
|
||||
method: "get"
|
||||
});
|
||||
editForm.get = (options) => ({
|
||||
action: edit.url(options),
|
||||
method: "get"
|
||||
});
|
||||
editForm.head = (options) => ({
|
||||
action: edit.url({
|
||||
[options?.mergeQuery ? "mergeQuery" : "query"]: {
|
||||
_method: "HEAD",
|
||||
...options?.query ?? options?.mergeQuery ?? {}
|
||||
}
|
||||
}),
|
||||
method: "get"
|
||||
});
|
||||
edit.form = editForm;
|
||||
({
|
||||
edit: Object.assign(edit, edit)
|
||||
});
|
||||
const sidebarNavItems = [
|
||||
{
|
||||
title: "Profile",
|
||||
href: edit$1(),
|
||||
icon: null
|
||||
},
|
||||
{
|
||||
title: "Password",
|
||||
href: edit$2(),
|
||||
icon: null
|
||||
},
|
||||
{
|
||||
title: "Two-Factor Auth",
|
||||
href: show(),
|
||||
icon: null
|
||||
},
|
||||
{
|
||||
title: "Appearance",
|
||||
href: edit(),
|
||||
icon: null
|
||||
}
|
||||
];
|
||||
function SettingsLayout({ children }) {
|
||||
if (typeof window === "undefined") {
|
||||
return null;
|
||||
}
|
||||
const currentPath = window.location.pathname;
|
||||
return /* @__PURE__ */ jsxs("div", { className: "px-4 py-6", children: [
|
||||
/* @__PURE__ */ jsx(
|
||||
Heading,
|
||||
{
|
||||
title: "Settings",
|
||||
description: "Manage your profile and account settings"
|
||||
}
|
||||
),
|
||||
/* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row lg:space-x-12", children: [
|
||||
/* @__PURE__ */ jsx("aside", { className: "w-full max-w-xl lg:w-48", children: /* @__PURE__ */ jsx("nav", { className: "flex flex-col space-y-1 space-x-0", children: sidebarNavItems.map((item, index) => /* @__PURE__ */ jsx(
|
||||
Button,
|
||||
{
|
||||
size: "sm",
|
||||
variant: "ghost",
|
||||
asChild: true,
|
||||
className: cn("w-full justify-start", {
|
||||
"bg-muted": currentPath === (typeof item.href === "string" ? item.href : item.href.url)
|
||||
}),
|
||||
children: /* @__PURE__ */ jsxs(Link, { href: item.href, children: [
|
||||
item.icon && /* @__PURE__ */ jsx(item.icon, { className: "h-4 w-4" }),
|
||||
item.title
|
||||
] })
|
||||
},
|
||||
`${typeof item.href === "string" ? item.href : item.href.url}-${index}`
|
||||
)) }) }),
|
||||
/* @__PURE__ */ jsx(Separator, { className: "my-6 lg:hidden" }),
|
||||
/* @__PURE__ */ jsx("div", { className: "flex-1 md:max-w-2xl", children: /* @__PURE__ */ jsx("section", { className: "max-w-xl space-y-12", children }) })
|
||||
] })
|
||||
] });
|
||||
}
|
||||
export {
|
||||
HeadingSmall as H,
|
||||
SettingsLayout as S,
|
||||
edit as e
|
||||
};
|
||||
Reference in New Issue
Block a user