Skip to content

Commit

Permalink
rework settings system
Browse files Browse the repository at this point in the history
  • Loading branch information
DerGoogler committed Aug 29, 2024
1 parent 136bdc7 commit b19640e
Show file tree
Hide file tree
Showing 23 changed files with 126 additions and 648 deletions.
9 changes: 2 additions & 7 deletions src/activitys/AboutActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Avatar from "@mui/material/Avatar";
import Typography from "@mui/material/Typography";
import Stack from "@mui/material/Stack";
import CodeRoundedIcon from "@mui/icons-material/CodeRounded";
import { useSettings } from "@Hooks/useSettings";
import { Shell } from "@Native/Shell";
import { ListSubheader } from "@mui/material";
import React from "react";
Expand All @@ -33,7 +32,6 @@ const checkRoot = (): string | undefined => {

const AboutActivity = () => {
const { strings } = useStrings();
const { settings } = useSettings();
const { context } = useActivity();

const renderToolbar = () => {
Expand Down Expand Up @@ -102,9 +100,7 @@ const AboutActivity = () => {
bgcolor: "transparent",
})}
src={checkRoot()}
>

</Avatar>
></Avatar>
}
>
<Avatar sx={{ height: 100, width: 100, bgcolor: "#4a148c" }}>
Expand All @@ -115,7 +111,6 @@ const AboutActivity = () => {
<Typography
variant="h3"
noWrap
color={settings.darkmode ? "text.primary" : undefined}
sx={{
display: "flex",
fontFamily: "monospace",
Expand All @@ -137,7 +132,7 @@ const AboutActivity = () => {
primary={
<>
<Stack direction="row" justifyContent="space-between" alignItems="center" spacing={1}>
<Typography sx={{ display: "inline" }} color={settings.darkmode ? "text.primary" : undefined} component="span">
<Typography sx={{ display: "inline" }} component="span">
{c.primary}
</Typography>
<Typography sx={{ display: "inline" }} component="span" variant="body2" color="text.primary">
Expand Down
6 changes: 2 additions & 4 deletions src/activitys/CommentsActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import { useStrings } from "@Hooks/useStrings";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import { useSettings } from "@Hooks/useSettings";
import Giscus from "@giscus/react";
import { useTheme } from "@Hooks/useTheme";

type Extra = {
id: string;
};

const CommentsActivity = () => {
const { strings } = useStrings();
const { settings } = useSettings();
const { theme } = useTheme();
const [language] = useSettings("language");
const { context, extra } = useActivity<Extra>();

const renderToolbar = () => {
Expand Down Expand Up @@ -43,7 +41,7 @@ const CommentsActivity = () => {
emitMetadata="0"
inputPosition="bottom"
// theme="preferred_color_scheme"
lang={settings.language.value}
lang={language.value}
loading="lazy"
/>
</Page.RelativeContent>
Expand Down
Loading

0 comments on commit b19640e

Please sign in to comment.