Settings: use AppTopBar
This commit is contained in:
parent
81b5fe1450
commit
4df609f1f5
4 changed files with 26 additions and 42 deletions
|
@ -25,6 +25,7 @@ import type { Template } from "@solid-primitives/i18n";
|
||||||
import { useStore } from "@nanostores/solid";
|
import { useStore } from "@nanostores/solid";
|
||||||
import { $settings } from "./stores";
|
import { $settings } from "./stores";
|
||||||
import { useNavigator } from "~platform/StackedRouter";
|
import { useNavigator } from "~platform/StackedRouter";
|
||||||
|
import AppTopBar from "~material/AppTopBar";
|
||||||
|
|
||||||
const ChooseLang: Component = () => {
|
const ChooseLang: Component = () => {
|
||||||
const { pop } = useNavigator();
|
const { pop } = useNavigator();
|
||||||
|
@ -54,17 +55,12 @@ const ChooseLang: Component = () => {
|
||||||
return (
|
return (
|
||||||
<Scaffold
|
<Scaffold
|
||||||
topbar={
|
topbar={
|
||||||
<AppBar position="static">
|
<AppTopBar>
|
||||||
<Toolbar
|
<IconButton color="inherit" onClick={[pop, 1]} disableRipple>
|
||||||
variant="dense"
|
<ArrowBack />
|
||||||
sx={{ paddingTop: "var(--safe-area-inset-top, 0px)" }}
|
</IconButton>
|
||||||
>
|
<Title>{t("Choose Language")}</Title>
|
||||||
<IconButton color="inherit" onClick={[pop, 1]} disableRipple>
|
</AppTopBar>
|
||||||
<ArrowBack />
|
|
||||||
</IconButton>
|
|
||||||
<Title>{t("Choose Language")}</Title>
|
|
||||||
</Toolbar>
|
|
||||||
</AppBar>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<List
|
<List
|
||||||
|
|
|
@ -18,6 +18,7 @@ import { createTranslator } from "~platform/i18n";
|
||||||
import { useStore } from "@nanostores/solid";
|
import { useStore } from "@nanostores/solid";
|
||||||
import { $settings } from "./stores";
|
import { $settings } from "./stores";
|
||||||
import { useNavigator } from "~platform/StackedRouter";
|
import { useNavigator } from "~platform/StackedRouter";
|
||||||
|
import AppTopBar from "~material/AppTopBar";
|
||||||
|
|
||||||
const Motions: Component = () => {
|
const Motions: Component = () => {
|
||||||
const {pop} = useNavigator();
|
const {pop} = useNavigator();
|
||||||
|
@ -31,17 +32,12 @@ const Motions: Component = () => {
|
||||||
return (
|
return (
|
||||||
<Scaffold
|
<Scaffold
|
||||||
topbar={
|
topbar={
|
||||||
<AppBar position="static">
|
<AppTopBar>
|
||||||
<Toolbar
|
<IconButton color="inherit" onClick={[pop, 1]} disableRipple>
|
||||||
variant="dense"
|
|
||||||
sx={{ paddingTop: "var(--safe-area-inset-top, 0px)" }}
|
|
||||||
>
|
|
||||||
<IconButton color="inherit" onClick={[pop, 1]} disableRipple>
|
|
||||||
<ArrowBack />
|
<ArrowBack />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Title>{t("motions")}</Title>
|
<Title>{t("motions")}</Title>
|
||||||
</Toolbar>
|
</AppTopBar>
|
||||||
</AppBar>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<List
|
<List
|
||||||
|
|
|
@ -23,9 +23,10 @@ import type { Template } from "@solid-primitives/i18n";
|
||||||
import { $settings } from "./stores";
|
import { $settings } from "./stores";
|
||||||
import { useStore } from "@nanostores/solid";
|
import { useStore } from "@nanostores/solid";
|
||||||
import { useNavigator } from "~platform/StackedRouter";
|
import { useNavigator } from "~platform/StackedRouter";
|
||||||
|
import AppTopBar from "~material/AppTopBar";
|
||||||
|
|
||||||
const ChooseRegion: Component = () => {
|
const ChooseRegion: Component = () => {
|
||||||
const {pop} = useNavigator();
|
const { pop } = useNavigator();
|
||||||
const [t] = createTranslator(
|
const [t] = createTranslator(
|
||||||
() => import("./i18n/generic.json"),
|
() => import("./i18n/generic.json"),
|
||||||
(code) =>
|
(code) =>
|
||||||
|
@ -49,17 +50,12 @@ const ChooseRegion: Component = () => {
|
||||||
return (
|
return (
|
||||||
<Scaffold
|
<Scaffold
|
||||||
topbar={
|
topbar={
|
||||||
<AppBar position="static">
|
<AppTopBar>
|
||||||
<Toolbar
|
<IconButton color="inherit" onClick={[pop, 1]} disableRipple>
|
||||||
variant="dense"
|
<ArrowBack />
|
||||||
sx={{ paddingTop: "var(--safe-area-inset-top, 0px)" }}
|
</IconButton>
|
||||||
>
|
<Title>{t("Choose Region")}</Title>
|
||||||
<IconButton color="inherit" onClick={[pop, 1]} disableRipple>
|
</AppTopBar>
|
||||||
<ArrowBack />
|
|
||||||
</IconButton>
|
|
||||||
<Title>{t("Choose Region")}</Title>
|
|
||||||
</Toolbar>
|
|
||||||
</AppBar>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<List
|
<List
|
||||||
|
|
|
@ -41,6 +41,7 @@ import { type Template } from "@solid-primitives/i18n";
|
||||||
import { useServiceWorker } from "~platform/host.js";
|
import { useServiceWorker } from "~platform/host.js";
|
||||||
import { useSessions } from "../masto/clients.js";
|
import { useSessions } from "../masto/clients.js";
|
||||||
import { useNavigator } from "~platform/StackedRouter.jsx";
|
import { useNavigator } from "~platform/StackedRouter.jsx";
|
||||||
|
import AppTopBar from "~material/AppTopBar.jsx";
|
||||||
|
|
||||||
type Inset = {
|
type Inset = {
|
||||||
top?: number;
|
top?: number;
|
||||||
|
@ -199,17 +200,12 @@ const Settings: Component = () => {
|
||||||
return (
|
return (
|
||||||
<Scaffold
|
<Scaffold
|
||||||
topbar={
|
topbar={
|
||||||
<AppBar position="static">
|
<AppTopBar>
|
||||||
<Toolbar
|
<IconButton color="inherit" onClick={[pop, 1]} disableRipple>
|
||||||
variant="dense"
|
<CloseIcon />
|
||||||
sx={{ paddingTop: "var(--safe-area-inset-top, 0px)" }}
|
</IconButton>
|
||||||
>
|
<Title>{t("Settings")}</Title>
|
||||||
<IconButton color="inherit" onClick={[pop, 1]} disableRipple>
|
</AppTopBar>
|
||||||
<CloseIcon />
|
|
||||||
</IconButton>
|
|
||||||
<Title>{t("Settings")}</Title>
|
|
||||||
</Toolbar>
|
|
||||||
</AppBar>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<List class="setting-list" use:solid-styled>
|
<List class="setting-list" use:solid-styled>
|
||||||
|
|
Loading…
Reference in a new issue