feat: support follow system appearance (#670)

This commit is contained in:
boojack
2022-12-04 12:23:29 +08:00
committed by GitHub
parent 1ea74dfd0d
commit 4767ee3293
9 changed files with 43 additions and 22 deletions

View File

@ -4,7 +4,7 @@ import { globalService, userService } from "../services";
import { useAppSelector } from "../store";
import Icon from "./Icon";
const appearanceList = ["light", "dark"];
const appearanceList = ["system", "light", "dark"];
const AppearanceSelect = () => {
const user = useAppSelector((state) => state.user.user);
@ -17,6 +17,8 @@ const AppearanceSelect = () => {
return <Icon.Sun className={className} />;
} else if (apperance === "dark") {
return <Icon.Moon className={className} />;
} else {
return <Icon.Smile className={className} />;
}
};