-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix data-bs-theme * Add other dark themes * Add vaporwave-dark to dark theme list
- Loading branch information
1 parent
4a0368b
commit 322a44b
Showing
4 changed files
with
21 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
import { MyUserInfo } from "lemmy-js-client"; | ||
import isDark from "./is-dark"; | ||
|
||
export default function dataBsTheme(user) { | ||
export default function dataBsTheme(user?: MyUserInfo) { | ||
return (isDark() && user?.local_user_view.local_user.theme === "browser") || | ||
(user && | ||
["darkly", "darkly-red", "darkly-pureblack"].includes( | ||
user.local_user_view.local_user.theme | ||
)) | ||
[ | ||
"darkly", | ||
"darkly-red", | ||
"darkly-pureblack", | ||
"darkly-compact", | ||
"i386", | ||
"vaporwave-dark", | ||
].includes(user.local_user_view.local_user.theme)) | ||
? "dark" | ||
: "light"; | ||
} |