From cc76e78db8ef4ce231129ee8b5972d30fe398e70 Mon Sep 17 00:00:00 2001 From: trashtemp <96388163+trashtemp@users.noreply.github.com> Date: Thu, 23 Dec 2021 16:46:50 +0100 Subject: [PATCH] fix(settings): started work on settings cleanup --- src/components/ui/fluent/CategoryButton.tsx | 8 ++++++-- src/pages/settings/Settings.module.scss | 4 ++++ src/pages/settings/Settings.tsx | 17 +++++++++++++++-- src/pages/settings/panes/Account.tsx | 13 +++++++++++-- src/pages/settings/panes/Appearance.tsx | 14 ++++++++++++++ 5 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/components/ui/fluent/CategoryButton.tsx b/src/components/ui/fluent/CategoryButton.tsx index a25d08dd..9a1203f0 100644 --- a/src/components/ui/fluent/CategoryButton.tsx +++ b/src/components/ui/fluent/CategoryButton.tsx @@ -1,4 +1,8 @@ -import { ChevronRight, LinkExternal } from "@styled-icons/boxicons-regular"; +import { + ChevronRight, + LinkExternal, + Pencil, +} from "@styled-icons/boxicons-regular"; import styled, { css } from "styled-components"; import { Children } from "../../../types/Preact"; @@ -11,7 +15,6 @@ interface BaseProps { } const CategoryBase = styled.div` - /*height: 54px;*/ padding: 9.8px 12px; border-radius: var(--border-radius); margin-bottom: 10px; @@ -21,6 +24,7 @@ const CategoryBase = styled.div` display: flex; align-items: center; flex-direction: row; + overflow: hidden; > svg { flex-shrink: 0; diff --git a/src/pages/settings/Settings.module.scss b/src/pages/settings/Settings.module.scss index 4391f399..2efd7342 100644 --- a/src/pages/settings/Settings.module.scss +++ b/src/pages/settings/Settings.module.scss @@ -244,6 +244,10 @@ margin-top: 0; font-size: 0.75rem; font-weight: 400; + + > a:hover { + text-decoration: underline; + } } h6 { diff --git a/src/pages/settings/Settings.tsx b/src/pages/settings/Settings.tsx index bb7c005b..562dee21 100644 --- a/src/pages/settings/Settings.tsx +++ b/src/pages/settings/Settings.tsx @@ -34,6 +34,7 @@ import { OperationsContext, } from "../../context/revoltjs/RevoltClient"; +import UserIcon from "../../components/common/user/UserIcon"; import LineDivider from "../../components/ui/LineDivider"; import ButtonItem from "../../components/navigation/items/ButtonItem"; @@ -54,7 +55,14 @@ import { Sessions } from "./panes/Sessions"; import { Sync } from "./panes/Sync"; import { ThemeShop } from "./panes/ThemeShop"; -const IndexHeader = styled.div``; +const IndexHeader = styled.div` + display: flex; + background: var(--secondary-background); + border-radius: var(--border-radius); + padding: 20px; + align-items: center; + gap: 10px; +`; export default function Settings() { const history = useHistory(); @@ -261,7 +269,12 @@ export default function Settings() { } - indexHeader={{/**/}} + indexHeader={ + + + Username + + } /> ); } diff --git a/src/pages/settings/panes/Account.tsx b/src/pages/settings/panes/Account.tsx index 0c7ebf0b..6d58d4aa 100644 --- a/src/pages/settings/panes/Account.tsx +++ b/src/pages/settings/panes/Account.tsx @@ -1,4 +1,4 @@ -import { At, Key, Block } from "@styled-icons/boxicons-regular"; +import { At, Key, Block, ListOl } from "@styled-icons/boxicons-regular"; import { Envelope, HelpCircle, @@ -165,6 +165,7 @@ export const Account = observer(() => { ))} +

@@ -184,9 +185,17 @@ export const Account = observer(() => { icon={} description={"Set up 2FA on your account."} disabled - action="chevron"> + action={}> Set up Two-factor authentication + {/*} + description={"View and download your 2FA backup codes."} + disabled + action="chevron"> + View my backup codes + */} +

diff --git a/src/pages/settings/panes/Appearance.tsx b/src/pages/settings/panes/Appearance.tsx index b6439528..e510779f 100644 --- a/src/pages/settings/panes/Appearance.tsx +++ b/src/pages/settings/panes/Appearance.tsx @@ -165,6 +165,20 @@ export function Component(props: Props) { + {/* TOFIX: Chane this checkbox to turn off the seasonal home page animations*/} + + setTheme({ + ligatures: !props.settings.theme?.ligatures, + }) + } + description={ + "Displays effects in the home tab during holiday seasons." + }> + Seasonal theme + + {/*