mirror of
https://github.com/mue/mue.git
synced 2026-07-19 23:14:10 +02:00
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:
@@ -32,7 +32,7 @@ const EffectsSettings = ({ backgroundFilter, onFilterChange }) => {
|
||||
name="brightness"
|
||||
min="0"
|
||||
max="100"
|
||||
default="90"
|
||||
default="100"
|
||||
display="%"
|
||||
marks={values.background}
|
||||
category="backgroundeffect"
|
||||
|
||||
@@ -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 />}
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user