feat(EffectsSettings): update default brightness value to 100

feat(GreetingOptions): refine event title message key for clarity
refactor(WelcomeModal): simplify useEffect by removing event bus listener
This commit is contained in:
alexsparkes
2026-01-24 17:53:44 +00:00
parent 37578d7638
commit 30aa53fdd7
3 changed files with 4 additions and 21 deletions

View File

@@ -32,7 +32,7 @@ const EffectsSettings = ({ backgroundFilter, onFilterChange }) => {
name="brightness"
min="0"
max="100"
default="90"
default="100"
display="%"
marks={values.background}
category="backgroundeffect"

View File

@@ -323,7 +323,7 @@ const GreetingOptions = ({ currentSubSection, onSubSectionChange, sectionName })
>
<AdditionalOptions />
<Section
title={variables.getMessage(`${GREETING_SECTION}.events`)}
title={variables.getMessage(`${GREETING_SECTION}.events.title`)}
subtitle={variables.getMessage(`${GREETING_SECTION}.events_description`)}
onClick={() => onSubSectionChange('events', sectionName)}
icon={<MdEventNote />}

View File

@@ -29,7 +29,7 @@ function WelcomeModal({ modalClose, modalSkip }) {
const [importedSettings, setImportedSettings] = useState([]);
const finalTab = 6;
// useEffect hook to handle tab changes and event bus listener
// useEffect hook to handle tab changes
useEffect(() => {
// Get the current welcome tab from local storage
const welcomeTab = localStorage.getItem('welcomeTab');
@@ -42,24 +42,7 @@ function WelcomeModal({ modalClose, modalSkip }) {
: variables.getMessage('modals.welcome.buttons.finish'),
);
}
// Listener for the 'refresh' event
const refreshListener = (data) => {
if (data === 'welcomeLanguage') {
localStorage.setItem('welcomeTab', currentTab);
localStorage.setItem('bgtransition', false);
window.location.reload();
}
};
// Subscribe to the 'refresh' event
EventBus.on('refresh', refreshListener);
// Cleanup function to unsubscribe from the 'refresh' event
return () => {
EventBus.off('refresh', refreshListener);
};
}, [currentTab, finalTab]);
}, [finalTab]);
// Function to update the current tab and button text
const updateTabAndButtonText = (newTab) => {