backToTop()}>
{props.timeline.match(/list_(\d+)/) ? <>{list && list.title}> : }
diff --git a/renderer/components/timelines/status/Status.tsx b/renderer/components/timelines/status/Status.tsx
index 562279b598..97464e6504 100644
--- a/renderer/components/timelines/status/Status.tsx
+++ b/renderer/components/timelines/status/Status.tsx
@@ -81,7 +81,7 @@ export default function Status(props: Props) {
return (
- setIgnoreFilter(true)}>
+ setIgnoreFilter(true)}>
diff --git a/renderer/pages/_app.tsx b/renderer/pages/_app.tsx
index 562a9db05c..6f920cf122 100644
--- a/renderer/pages/_app.tsx
+++ b/renderer/pages/_app.tsx
@@ -1,5 +1,5 @@
import type { AppProps } from 'next/app'
-import '../app.css'
+import '../app.scss'
import AccountLayout from '@/components/layouts/account'
import TimelineLayout from '@/components/layouts/timelines'
import { IntlProviderWrapper } from '@/provider/i18n'
diff --git a/yarn.lock b/yarn.lock
index 6d66ab3bd6..6f6fc9e0c0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2724,6 +2724,7 @@ __metadata:
react-intl: ^6.5.1
react-virtuoso: ^4.6.2
sanitize-html: ^2.11.0
+ sass: ^1.71.1
tailwindcss: ^3.3.3
typescript: ^5.2.2
languageName: unknown
@@ -3580,6 +3581,25 @@ __metadata:
languageName: node
linkType: hard
+"chokidar@npm:>=3.0.0 <4.0.0":
+ version: 3.6.0
+ resolution: "chokidar@npm:3.6.0"
+ dependencies:
+ anymatch: ~3.1.2
+ braces: ~3.0.2
+ fsevents: ~2.3.2
+ glob-parent: ~5.1.2
+ is-binary-path: ~2.1.0
+ is-glob: ~4.0.1
+ normalize-path: ~3.0.0
+ readdirp: ~3.6.0
+ dependenciesMeta:
+ fsevents:
+ optional: true
+ checksum: d2f29f499705dcd4f6f3bbed79a9ce2388cf530460122eed3b9c48efeab7a4e28739c6551fd15bec9245c6b9eeca7a32baa64694d64d9b6faeb74ddb8c4a413d
+ languageName: node
+ linkType: hard
+
"chokidar@npm:^3.5.3":
version: 3.5.3
resolution: "chokidar@npm:3.5.3"
@@ -5605,6 +5625,13 @@ __metadata:
languageName: node
linkType: hard
+"immutable@npm:^4.0.0":
+ version: 4.3.5
+ resolution: "immutable@npm:4.3.5"
+ checksum: 0e25dd5c314421faede9e1122ab26cdb638cc3edc8678c4a75dee104279b12621a30c80a480fae7f68bc7e81672f1e672e454dc0fdc7e6cf0af10809348387b8
+ languageName: node
+ linkType: hard
+
"import-fresh@npm:^3.2.1":
version: 3.3.0
resolution: "import-fresh@npm:3.3.0"
@@ -7967,6 +7994,19 @@ __metadata:
languageName: node
linkType: hard
+"sass@npm:^1.71.1":
+ version: 1.71.1
+ resolution: "sass@npm:1.71.1"
+ dependencies:
+ chokidar: ">=3.0.0 <4.0.0"
+ immutable: ^4.0.0
+ source-map-js: ">=0.6.2 <2.0.0"
+ bin:
+ sass: sass.js
+ checksum: 19c4939d3042eb9459d462bbd27b1f576fa18034e23c87ca0005b87effdee431c16503b5a785edcdcde1a76dfb804716d9ad42c85a78968ac3825d515e45cb53
+ languageName: node
+ linkType: hard
+
"sax@npm:^1.2.4":
version: 1.3.0
resolution: "sax@npm:1.3.0"
@@ -8193,7 +8233,7 @@ __metadata:
languageName: node
linkType: hard
-"source-map-js@npm:^1.0.2":
+"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.2":
version: 1.0.2
resolution: "source-map-js@npm:1.0.2"
checksum: c049a7fc4deb9a7e9b481ae3d424cc793cb4845daa690bc5a05d428bf41bf231ced49b4cf0c9e77f9d42fdb3d20d6187619fc586605f5eabe995a316da8d377c
From dc6c36ce9945ee892b478a488d64105f64f3a9f9 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Sat, 9 Mar 2024 19:09:36 +0900
Subject: [PATCH 2/3] refs #4795 Switch theme
---
locales/en/translation.json | 3 ++-
renderer/components/Settings.tsx | 36 +++++++++++++++++++++++++
renderer/components/layouts/account.tsx | 7 ++++-
3 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/locales/en/translation.json b/locales/en/translation.json
index 44f1d4dd28..4f686787ab 100644
--- a/locales/en/translation.json
+++ b/locales/en/translation.json
@@ -166,7 +166,8 @@
"settings": {
"title": "Settings",
"language": "Language",
- "font_size": "Font size"
+ "font_size": "Font size",
+ "theme": "Color theme"
},
"thirdparty": {
"title": "Third-party licenses"
diff --git a/renderer/components/Settings.tsx b/renderer/components/Settings.tsx
index bd56edc0c2..0cec1fb848 100644
--- a/renderer/components/Settings.tsx
+++ b/renderer/components/Settings.tsx
@@ -24,9 +24,21 @@ const languages = [
}
]
+const themes = [
+ {
+ label: 'Blue',
+ value: 'theme-blue'
+ },
+ {
+ label: 'Orange',
+ value: 'theme-orange'
+ }
+]
+
export default function Settings(props: Props) {
const [language, setLanguage] = useState('en')
const [fontSize, setFontSize] = useState(16)
+ const [theme, setTheme] = useState('theme-blue')
useEffect(() => {
if (typeof localStorage !== 'undefined') {
@@ -55,6 +67,14 @@ export default function Settings(props: Props) {
props.reloadSettings()
}
+ const themeChanged = (e: string) => {
+ setTheme(e)
+ if (typeof localStorage !== 'undefined') {
+ localStorage.setItem('theme', e)
+ }
+ props.reloadSettings()
+ }
+
return (