mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-21 01:01:30 +03:00
Improved default theme setting. Pushed version 2.0.1
This commit is contained in:
parent
e0f6034868
commit
c2e9f82cd6
2
.env
2
.env
@ -1,5 +1,5 @@
|
|||||||
PORT=5005
|
PORT=5005
|
||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
VERSION=2.0.0
|
VERSION=2.0.1
|
||||||
PASSWORD=flame_password
|
PASSWORD=flame_password
|
||||||
SECRET=e02eb43d69953658c6d07311d6313f2d4467672cb881f96b29368ba1f3f4da4b
|
SECRET=e02eb43d69953658c6d07311d6313f2d4467672cb881f96b29368ba1f3f4da4b
|
@ -1,7 +1,8 @@
|
|||||||
### v2.0.1 (TBA)
|
### v2.0.1 (2021-11-19)
|
||||||
- Added option to display humidity in the weather widget ([#136](https://github.com/pawelmalak/flame/issues/136))
|
- Added option to display humidity in the weather widget ([#136](https://github.com/pawelmalak/flame/issues/136))
|
||||||
- Added option to set default theme for all new users ([#165](https://github.com/pawelmalak/flame/issues/165))
|
- Added option to set default theme for all new users ([#165](https://github.com/pawelmalak/flame/issues/165))
|
||||||
- Added option to hide header greetings and date separately ([#200](https://github.com/pawelmalak/flame/issues/200))
|
- Added option to hide header greetings and date separately ([#200](https://github.com/pawelmalak/flame/issues/200))
|
||||||
|
- Fixed bug with broken basic auth ([#202](https://github.com/pawelmalak/flame/issues/202))
|
||||||
- Fixed bug with custom icons not working with apps when "pin by default" was disabled
|
- Fixed bug with custom icons not working with apps when "pin by default" was disabled
|
||||||
|
|
||||||
### v2.0.0 (2021-11-15)
|
### v2.0.0 (2021-11-15)
|
||||||
|
@ -1 +1 @@
|
|||||||
REACT_APP_VERSION=2.0.0
|
REACT_APP_VERSION=2.0.1
|
@ -68,7 +68,7 @@ export const App = (): JSX.Element => {
|
|||||||
// If there is no user theme, set the default one
|
// If there is no user theme, set the default one
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!loading && !localStorage.theme) {
|
if (!loading && !localStorage.theme) {
|
||||||
setTheme(config.defaultTheme);
|
setTheme(config.defaultTheme, false);
|
||||||
}
|
}
|
||||||
}, [loading]);
|
}, [loading]);
|
||||||
|
|
||||||
|
@ -5,11 +5,15 @@ import { Theme } from '../../interfaces/Theme';
|
|||||||
import { themes } from '../../components/Settings/Themer/themes.json';
|
import { themes } from '../../components/Settings/Themer/themes.json';
|
||||||
|
|
||||||
export const setTheme =
|
export const setTheme =
|
||||||
(name: string) => (dispatch: Dispatch<SetThemeAction>) => {
|
(name: string, remeberTheme: boolean = true) =>
|
||||||
|
(dispatch: Dispatch<SetThemeAction>) => {
|
||||||
const theme = themes.find((theme) => theme.name === name);
|
const theme = themes.find((theme) => theme.name === name);
|
||||||
|
|
||||||
if (theme) {
|
if (theme) {
|
||||||
|
if (remeberTheme) {
|
||||||
localStorage.setItem('theme', name);
|
localStorage.setItem('theme', name);
|
||||||
|
}
|
||||||
|
|
||||||
loadTheme(theme);
|
loadTheme(theme);
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
|
Loading…
Reference in New Issue
Block a user