Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Inline

Manav Rathi6a71d6359afc
diff --git a/web/packages/base/components/utils/theme.ts b/web/packages/base/components/utils/theme.ts
index 4e8fde99c8..923c455256 100644
--- a/web/packages/base/components/utils/theme.ts
+++ b/web/packages/base/components/utils/theme.ts
@@ -132,31 +132,11 @@ type ColorAccentType = "auth" | "photos";
const getColors = (
themeColor: THEME_COLOR,
accentType: ColorAccentType,
-): ThemeColorsOptions => {
- switch (themeColor) {
- case THEME_COLOR.LIGHT:
- return { ...fixedColors(accentType), ...lightThemeColors };
- default:
- return { ...fixedColors(accentType), ...darkThemeColors };
- }
-};
-
-const fixedColors = (
- accentType: "auth" | "photos",
-): Pick<ThemeColorsOptions, keyof FixedColors> => {
- switch (accentType) {
- case "auth":
- return {
- ...commonFixedColors,
- accent: authAccentColor,
- };
- default:
- return {
- ...commonFixedColors,
- accent: photosAccentColor,
- };
- }
-};
+): ThemeColorsOptions => ({
+ ...commonFixedColors,
+ ...{ accent: accentType == "auth" ? authAccentColor : photosAccentColor },
+ ...(themeColor === THEME_COLOR.LIGHT ? lightThemeColors : darkThemeColors),
+});
const commonFixedColors: Partial<Pick<ThemeColorsOptions, keyof FixedColors>> =
{