Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(options/appearance): merge layout style with orientation
Elian Doran85ebe59a3bae
diff --git a/apps/client/src/widgets/type_widgets/options/appearance.tsx b/apps/client/src/widgets/type_widgets/options/appearance.tsxindex f92da1f4a2..9a3399226b 100644--- a/apps/client/src/widgets/type_widgets/options/appearance.tsx+++ b/apps/client/src/widgets/type_widgets/options/appearance.tsx@@ -119,7 +119,7 @@ function LayoutOptions() {return (<OptionsSection title={t("settings_appearance.ui")}>- <OptionsRow name="layout-style" label={t("settings_appearance.ui_layout_style")} stacked>+ <OptionsRow name="layout-style" label={t("settings_appearance.ui_layout_style")}><RadioWithIllustrationcurrentValue={newLayout ? "new-layout" : "old-layout"}onChange={async newValue => {@@ -132,7 +132,7 @@ function LayoutOptions() {]}/></OptionsRow>- <OptionsRow name="layout-orientation" label={t("settings_appearance.ui_layout_orientation")} stacked>+ <OptionsRow name="layout-orientation" label={t("settings_appearance.ui_layout_orientation")}><RadioWithIllustrationcurrentValue={layoutOrientation ?? "vertical"}onChange={setLayoutOrientation}@@ -238,23 +238,6 @@ function LayoutIllustration({ isNewLayout }: { isNewLayout?: boolean }) {);}-function LayoutOrientation() {- const [ layoutOrientation, setLayoutOrientation ] = useTriliumOption("layoutOrientation", true);-- return (- <OptionsSection title={t("theme.layout")}>- <RadioWithIllustration- currentValue={layoutOrientation ?? "vertical"}- onChange={setLayoutOrientation}- values={[- { key: "vertical", text: t("theme.layout-vertical-title"), illustration: <OrientationIllustration orientation="vertical" /> },- { key: "horizontal", text: t("theme.layout-horizontal-title"), illustration: <OrientationIllustration orientation="horizontal" /> }- ]}- />- </OptionsSection>- );-}-function OrientationIllustration({ orientation }: { orientation: "vertical" | "horizontal" }) {const isHorizontal = orientation === "horizontal";