Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+39
-28
@@ -1,5 +1,6 @@
|
||||
import { LoaderFunctionArgs, MetaFunction, Outlet } from "react-router";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { AdminPageHeader } from "~/components/screens/admin/AdminPageHeader";
|
||||
import IncreaseIcon from "~/components/ui/icons/crm/IncreaseIcon";
|
||||
import IncreaseIconFilled from "~/components/ui/icons/crm/IncreaseIconFilled";
|
||||
import SettingsIcon from "~/components/ui/icons/crm/SettingsIcon";
|
||||
@@ -9,6 +10,7 @@ import ToggleOnIcon from "~/components/ui/icons/featureFlags/ToggleOnIcon";
|
||||
import SidebarIconsLayout from "~/components/ui/layouts/SidebarIconsLayout";
|
||||
import { getTranslations } from "~/locale/i18next.server";
|
||||
import { adminPath } from "~/utils/app/CanonicalUrlUtils";
|
||||
import { ADMIN_AREA_ACCESS } from "~/services/admin/admin-access-contract";
|
||||
import { verifyUserHasPermission } from "~/utils/helpers/.server/PermissionsService";
|
||||
|
||||
type LoaderData = {
|
||||
@@ -16,7 +18,7 @@ type LoaderData = {
|
||||
};
|
||||
|
||||
export const loader = async ({ request }: LoaderFunctionArgs) => {
|
||||
await verifyUserHasPermission(request, "admin.featureFlags.view");
|
||||
await verifyUserHasPermission(request, ADMIN_AREA_ACCESS.featureFlags);
|
||||
const { t } = await getTranslations(request);
|
||||
const data: LoaderData = {
|
||||
title: `${t("featureFlags.title")} | ${process.env.APP_NAME}`,
|
||||
@@ -29,32 +31,41 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => [{ title: data?.t
|
||||
export default () => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<SidebarIconsLayout
|
||||
label={{ align: "right" }}
|
||||
items={[
|
||||
{
|
||||
name: t("shared.overview"),
|
||||
href: adminPath("feature-flags", { mode: "host-aware" }),
|
||||
icon: <IncreaseIcon className="h-5 w-5" />,
|
||||
iconSelected: <IncreaseIconFilled className="h-5 w-5" />,
|
||||
exact: true,
|
||||
},
|
||||
{
|
||||
name: t("featureFlags.plural"),
|
||||
href: adminPath("feature-flags/flags", { mode: "host-aware" }),
|
||||
icon: <ToggleOffIcon className="h-5 w-5" />,
|
||||
iconSelected: <ToggleOnIcon className="h-5 w-5" />,
|
||||
},
|
||||
{
|
||||
name: t("shared.settings"),
|
||||
href: adminPath("feature-flags/settings", { mode: "host-aware" }),
|
||||
icon: <SettingsIcon className="h-5 w-5" />,
|
||||
iconSelected: <SettingsIconFilled className="h-5 w-5" />,
|
||||
bottom: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Outlet />
|
||||
</SidebarIconsLayout>
|
||||
<div className="flex w-full flex-col">
|
||||
<AdminPageHeader title={t("app.sidebar.featureFlags")} description={t("featureFlags.pageDescription")} />
|
||||
<SidebarIconsLayout
|
||||
label={{ align: "right" }}
|
||||
items={[
|
||||
{
|
||||
name: t("shared.overview"),
|
||||
href: adminPath("feature-flags", { mode: "host-aware" }),
|
||||
icon: <IncreaseIcon className="h-5 w-5" />,
|
||||
iconSelected: <IncreaseIconFilled className="h-5 w-5" />,
|
||||
exact: true,
|
||||
},
|
||||
{
|
||||
name: t("featureFlags.plural"),
|
||||
href: adminPath("feature-flags/flags", { mode: "host-aware" }),
|
||||
icon: <ToggleOffIcon className="h-5 w-5" />,
|
||||
iconSelected: <ToggleOnIcon className="h-5 w-5" />,
|
||||
},
|
||||
{
|
||||
name: t("featureFlags.engine.nav"),
|
||||
href: adminPath("feature-flags/engine", { mode: "host-aware" }),
|
||||
icon: <IncreaseIcon className="h-5 w-5" />,
|
||||
iconSelected: <IncreaseIconFilled className="h-5 w-5" />,
|
||||
},
|
||||
{
|
||||
name: t("shared.settings"),
|
||||
href: adminPath("feature-flags/settings", { mode: "host-aware" }),
|
||||
icon: <SettingsIcon className="h-5 w-5" />,
|
||||
iconSelected: <SettingsIconFilled className="h-5 w-5" />,
|
||||
bottom: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Outlet />
|
||||
</SidebarIconsLayout>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user