Skip to content
Snippets Groups Projects
Unverified Commit 703c319f authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:recycle: hide theme selector in prod (#2671)

parent ca8a8174
No related branches found
No related tags found
No related merge requests found
Showing
with 12 additions and 1 deletion
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -14,9 +14,11 @@ expect.extend({
const config = {
// eslint-disable-next-line rulesdir/typography
mask: [locator.locator('[data-vrt-mask="true"]')],
maxDiffPixels: 5,
};
// Check lightmode
await locator.evaluate(() => window.Actual.setTheme('light'));
const lightmode = await expect(locator).toHaveScreenshot(config);
if (lightmode && !lightmode.pass) {
......
......@@ -12,6 +12,7 @@ import { Routes, Route, useLocation } from 'react-router-dom';
import * as Platform from 'loot-core/src/client/platform';
import * as queries from 'loot-core/src/client/queries';
import { listen } from 'loot-core/src/platform/client/fetch';
import { isDevelopmentEnvironment } from 'loot-core/src/shared/environment';
import { type LocalPrefs } from 'loot-core/src/types/prefs';
import { useActions } from '../hooks/useActions';
......@@ -458,7 +459,9 @@ export function Titlebar({ style }: TitlebarProps) {
</Routes>
<View style={{ flex: 1 }} />
<UncategorizedButton />
<ThemeSelector style={{ marginLeft: 10 }} />
{isDevelopmentEnvironment() && !Platform.isPlaywright && (
<ThemeSelector style={{ marginLeft: 10 }} />
)}
<PrivacyButton style={{ marginLeft: 10 }} />
{serverURL ? <SyncButton style={{ marginLeft: 10 }} /> : null}
<LoggedInUser style={{ marginLeft: 10 }} />
......
---
category: Enhancements
authors: [MatissJanis]
---
Hide theme selector from the top of the page - it is now only available in the settings page.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment