Skip to content

Commit

Permalink
Change transaltion. Off by default on contrast
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradPietocha committed Dec 20, 2024
1 parent 785120e commit 70212b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion public/i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ namespaces:
navigation:
all-namespaces: All Namespaces
feedback: Feedback
snow: Snow
snow: Let it snow
snow-stop: Stop the snow
menu:
get-help: Get Help
Expand Down
9 changes: 9 additions & 0 deletions src/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { isResourceEditedState } from 'state/resourceEditedAtom';
import { isFormOpenState } from 'state/formOpenAtom';
import { handleActionIfFormOpen } from 'shared/components/UnsavedMessageBox/helpers';
import { configFeaturesNames } from 'state/types';
import { themeState } from 'state/preferences/themeAtom';

const SNOW_STORAGE_KEY = 'snow-animation';

Expand Down Expand Up @@ -61,6 +62,7 @@ export function Header() {
isResourceEditedState,
);
const [isFormOpen, setIsFormOpen] = useRecoilState(isFormOpenState);
const [theme] = useRecoilState(themeState);

const shellbarRef = useRef<ShellBarDomRef>(null);
useEffect(() => {
Expand All @@ -72,6 +74,13 @@ export function Header() {
}
}, [shellbarRef]);

useEffect(() => {
if (theme === 'sap_horizon_hcb' || theme === 'sap_horizon_hcw') {
setIsSnowOpen(false);
localStorage.removeItem(SNOW_STORAGE_KEY);
}
}, [theme]);

const inactiveClusterNames = Object.keys(clusters || {}).filter(
name => name !== cluster?.name,
);
Expand Down

0 comments on commit 70212b1

Please sign in to comment.