(false);
+
+ createEffect(async () => {
+ setIsAdministrator(await trpc.instance.isUserAdministrator.query());
+ setShootYourselfInTheFoot(await trpc.instance.hasFeature.query("shoot_yourself_in_the_foot"));
+ });
+
const location = useLocation();
const navigate = useNavigate();
return (
-
+
- }>
- {props.children}
-
-
+ {
+ type: "button",
+ icon: { type: "icon", value: APPS_ICON },
+ label: "Applications",
+ onClick() {
+ navigate("/app/uk.tcsw.settings/applications");
+ },
+ active: location.pathname.startsWith("/app/uk.tcsw.settings/applications"),
+ },
+ isAdministrator()
+ ? {
+ type: "button",
+ icon: { type: "icon", value: SETTINGS_APPLICATIONS_ICON },
+ label: "Configure Instance",
+ onClick() {
+ navigate("/app/uk.tcsw.settings/instance");
+ },
+ active: location.pathname.startsWith("/app/uk.tcsw.settings/instance"),
+ }
+ : undefined,
+ ]}
+ >
+ }>
+ {props.children}
+
+
+
);
};
diff --git a/applications/uk.tcsw.settings/web/pages/authentication/components/MethodPassword/MethodPassword.tsx b/applications/uk.tcsw.settings/web/pages/authentication/components/MethodPassword/MethodPassword.tsx
index 32f7eb3..9a7c341 100644
--- a/applications/uk.tcsw.settings/web/pages/authentication/components/MethodPassword/MethodPassword.tsx
+++ b/applications/uk.tcsw.settings/web/pages/authentication/components/MethodPassword/MethodPassword.tsx
@@ -1,20 +1,15 @@
+import CHECK_ICON from "@material-symbols/svg-700/outlined/check.svg";
+import PASSWORD_ICON from "@material-symbols/svg-700/outlined/password.svg";
import { useSearchParams } from "@solidjs/router";
import UKButton from "@tcsw/uikit-solid/src/components/button/UKButton.jsx";
import UKDialog from "@tcsw/uikit-solid/src/components/dialog/UKDialog.tsx";
import UKIcon from "@tcsw/uikit-solid/src/components/icon/UKIcon.jsx";
import UKStackItem from "@tcsw/uikit-solid/src/components/stack/UKStackItem.jsx";
import UKText from "@tcsw/uikit-solid/src/components/text/UKText.jsx";
-import {
- type Component,
- createResource,
- createSignal,
- Suspense,
-} from "solid-js";
+import { type Component, createResource, createSignal, Suspense } from "solid-js";
import trpc from "../../../../lib/trpc";
import ResetPasswordDialogue from "./components/ResetPasswordDialogue/ResetPasswordDialogue.tsx";
import styles from "./MethodPassword.module.scss";
-import CHECK_ICON from "@material-symbols/svg-700/outlined/check.svg"
-import PASSWORD_ICON from "@material-symbols/svg-700/outlined/password.svg"
const MethodPassword: Component = () => {
const [hasPassword, { refetch: refetchHasPassword }] = createResource(() =>
@@ -39,9 +34,7 @@ const MethodPassword: Component = () => {
? "You have password authentication enabled"
: "Setup password authentication"
}
- inlineComponent={
- hasPassword() && {CHECK_ICON}
- }
+ inlineComponent={hasPassword() && {CHECK_ICON}}
expandedComponent={
diff --git a/applications/uk.tcsw.store/web/App.tsx b/applications/uk.tcsw.store/web/App.tsx
index 4a7d0ca..4173f66 100644
--- a/applications/uk.tcsw.store/web/App.tsx
+++ b/applications/uk.tcsw.store/web/App.tsx
@@ -1,12 +1,14 @@
-import { type Component } from "solid-js";
import { Route } from "@solidjs/router";
-import SearchPage from "./pages/search/Index";
-import CategoriesPage from "./pages/categories/Index";
-import ManageInstalledPage from "./pages/manage-installed/Index";
-import Layout from "./Layout";
-import ApplicationPage from "./pages/app/Index";
+import { type Component, lazy } from "solid-js";
-const App: Component = () => {1
+const SearchPage = lazy(() => import("./pages/search/Index"));
+const CategoriesPage = lazy(() => import("./pages/categories/Index"));
+const ManageInstalledPage = lazy(() => import("./pages/manage-installed/Index"));
+const Layout = lazy(() => import("./Layout"));
+const ApplicationPage = lazy(() => import("./pages/app/Index"));
+
+const App: Component = () => {
+ 1;
return (
{/**/}
@@ -14,10 +16,7 @@ const App: Component = () => {1
-
+
);
};