diff --git a/react/src/App.tsx b/react/src/App.tsx index 61277d0..1f3774f 100644 --- a/react/src/App.tsx +++ b/react/src/App.tsx @@ -21,12 +21,12 @@ import React from 'react'; import { ThemeProvider, createTheme, StyledEngineProvider, Theme } from '@mui/material/styles'; import AppThemed from "./AppThemed"; -import {isDarkMode} from './DarkMode'; +import { isDarkMode } from './DarkMode'; declare module '@mui/material/styles' { interface Theme { - mainBackground: React.CSSProperties['color']; - toolbarColor: React.CSSProperties['color']; + mainBackground: React.CSSProperties['color']; + toolbarColor: React.CSSProperties['color']; } interface ThemeOptions { mainBackground?: React.CSSProperties['color']; @@ -35,12 +35,17 @@ declare module '@mui/material/styles' { } - +declare module '@mui/material/Button' { + interface ButtonPropsVariantOverrides { + dialogPrimary: true; + dialogSecondary: true; + } +} declare module '@mui/styles/defaultTheme' { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface DefaultTheme extends Theme {} + // eslint-disable-next-line @typescript-eslint/no-empty-interface + interface DefaultTheme extends Theme { } } @@ -49,34 +54,71 @@ declare module '@mui/styles/defaultTheme' { const theme = createTheme( isDarkMode() ? { - palette: { - mode: 'dark', - primary: { - main: '#A770E4'// #6750A4" // #5B5690 #60529A #5C5694 + components: { + MuiButton: { + variants: [ + { + props: { variant: 'dialogPrimary' }, + style: { + color: "#FFFFFF" + } + }, + { + props: { variant: 'dialogSecondary', }, + style: { + color: "rgb(255,255,255,0.7)" + }, + }, + ], + }, }, - secondary: { - main: "#FF6060" + + palette: { + mode: 'dark', + primary: { + main: '#A770E4'// #6750A4" // #5B5690 #60529A #5C5694 + }, + secondary: { + main: "#0AA102" //'"#FF6060" + }, }, - }, - mainBackground: "#222", - toolbarColor: '#222' - } + mainBackground: "#222", + toolbarColor: '#222' + } : { - palette: { - primary: { - main: "#6750A4" // #5B5690 #60529A #5C5694 + components: { + MuiButton: { + variants: [ + { + props: { variant: 'dialogPrimary' }, + style: { + color: "rgb(0,0,0,0.87)" + } + }, + { + props: { variant: 'dialogSecondary', }, + style: { + color: "rgb(0,0,0,0.6)" + }, + }, + ], + }, }, - secondary: { - main: "#FF6060" - } + palette: { + primary: { + main: "#6750A4" // #5B5690 #60529A #5C5694 + }, + secondary: { + main: "#FF6060" + } - }, - mainBackground: "#FFFFFF", - toolbarColor: '#FFFFFF' + }, + mainBackground: "#FFFFFF", + toolbarColor: '#FFFFFF' - } + } ); @@ -97,7 +139,7 @@ const App = (class extends React.Component { return ( - + ); diff --git a/react/src/AppThemed.tsx b/react/src/AppThemed.tsx index 94b00b1..19965bc 100644 --- a/react/src/AppThemed.tsx +++ b/react/src/AppThemed.tsx @@ -879,7 +879,7 @@ render() { - diff --git a/react/src/BankDialog.tsx b/react/src/BankDialog.tsx index 8ceb2d4..eb61160 100644 --- a/react/src/BankDialog.tsx +++ b/react/src/BankDialog.tsx @@ -546,10 +546,10 @@ const BankDialog = withStyles(styles, { withTheme: true })( Are you sure you want to delete bank '{this.getSelectedBankName()}'? - - diff --git a/react/src/FilePropertyDialog.tsx b/react/src/FilePropertyDialog.tsx index 72c1b6f..af384e2 100644 --- a/react/src/FilePropertyDialog.tsx +++ b/react/src/FilePropertyDialog.tsx @@ -553,12 +553,12 @@ export default withStyles(styles, { withTheme: true })(
 
- - -
diff --git a/react/src/JackServerSettingsDialog.tsx b/react/src/JackServerSettingsDialog.tsx index 34b3fec..38c811b 100644 --- a/react/src/JackServerSettingsDialog.tsx +++ b/react/src/JackServerSettingsDialog.tsx @@ -362,10 +362,10 @@ const JackServerSettingsDialog = withStyles(styles)( - - diff --git a/react/src/ListSelectDialog.tsx b/react/src/ListSelectDialog.tsx index 0124104..03f145d 100644 --- a/react/src/ListSelectDialog.tsx +++ b/react/src/ListSelectDialog.tsx @@ -106,7 +106,7 @@ export default class ListSelectDialog extends ResizeResponsiveComponent - diff --git a/react/src/LoadPluginDialog.tsx b/react/src/LoadPluginDialog.tsx index 5c7c93b..fea41e4 100644 --- a/react/src/LoadPluginDialog.tsx +++ b/react/src/LoadPluginDialog.tsx @@ -814,8 +814,8 @@ export const LoadPluginDialog =
- - + +
@@ -839,8 +839,8 @@ export const LoadPluginDialog =
- - + +
diff --git a/react/src/OkCancelDialog.tsx b/react/src/OkCancelDialog.tsx index 72f8ab4..726ac3b 100644 --- a/react/src/OkCancelDialog.tsx +++ b/react/src/OkCancelDialog.tsx @@ -70,10 +70,10 @@ export default class OkCancelDialog extends React.Component{text} - - diff --git a/react/src/PiPedalModel.tsx b/react/src/PiPedalModel.tsx index fad9d26..ae9fd62 100644 --- a/react/src/PiPedalModel.tsx +++ b/react/src/PiPedalModel.tsx @@ -2644,8 +2644,11 @@ export class PiPedalModel //implements PiPedalModel if (this.getTheme() !== value) { setColorScheme(value); - this.reloadPage(); - } + setTimeout(()=>{ + this.reloadPage(); + }, + 200); +} } reloadRequested: boolean = false; @@ -2653,7 +2656,9 @@ export class PiPedalModel //implements PiPedalModel reloadPage() { this.reloadRequested = true; // eslint-disable-next-line no-restricted-globals - window.location.reload(); + let url = window.location.href.split('#')[0]; + window.location.href = url; + //window.location.reload(); } }; diff --git a/react/src/PluginInfoDialog.tsx b/react/src/PluginInfoDialog.tsx index 465361a..2e9bfca 100644 --- a/react/src/PluginInfoDialog.tsx +++ b/react/src/PluginInfoDialog.tsx @@ -317,7 +317,7 @@ const PluginInfoDialog = withStyles(styles)((props: PluginInfoProps) => {
- diff --git a/react/src/RenameDialog.tsx b/react/src/RenameDialog.tsx index 72a68f6..2cb82bc 100644 --- a/react/src/RenameDialog.tsx +++ b/react/src/RenameDialog.tsx @@ -131,10 +131,10 @@ export default class RenameDialog extends ResizeResponsiveComponent - - diff --git a/react/src/SelectChannelsDialog.tsx b/react/src/SelectChannelsDialog.tsx index de9edd6..ccabcd2 100644 --- a/react/src/SelectChannelsDialog.tsx +++ b/react/src/SelectChannelsDialog.tsx @@ -107,10 +107,10 @@ function SelectChannelsDialog(props: SelectChannelsDialogProps) { )} - - diff --git a/react/src/SelectMidiChannelsDialog.tsx b/react/src/SelectMidiChannelsDialog.tsx index bd51194..df621bc 100644 --- a/react/src/SelectMidiChannelsDialog.tsx +++ b/react/src/SelectMidiChannelsDialog.tsx @@ -110,10 +110,10 @@ function SelectMidiChannelsDialog(props: SelectMidiChannelsDialogProps) { )} - - diff --git a/react/src/SelectThemeDialog.tsx b/react/src/SelectThemeDialog.tsx index f928663..c4db808 100644 --- a/react/src/SelectThemeDialog.tsx +++ b/react/src/SelectThemeDialog.tsx @@ -79,10 +79,10 @@ function SelectThemesDialog(props: SelectThemesDialogProps) { - - diff --git a/react/src/SettingsDialog.tsx b/react/src/SettingsDialog.tsx index 53f5da5..bd1d863 100644 --- a/react/src/SettingsDialog.tsx +++ b/react/src/SettingsDialog.tsx @@ -885,7 +885,7 @@ const SettingsDialog = withStyles(styles, { withTheme: true })( onClose={()=> { this.setState({showThemeSelectDialog: false});} } onOk={(selectedTheme: ColorTheme) => { this.model.setTheme(selectedTheme); - this.setState({showThemeSelectDialog: false}); + this.setState({showThemeSelectDialog: false}); }} defaultTheme={this.model.getTheme()} /> diff --git a/react/src/UploadFileDialog.tsx b/react/src/UploadFileDialog.tsx index f6b0d72..4e1cd31 100644 --- a/react/src/UploadFileDialog.tsx +++ b/react/src/UploadFileDialog.tsx @@ -384,7 +384,8 @@ export default class UploadFileDialog extends ResizeResponsiveComponent ) : ( - diff --git a/react/src/UploadPresetDialog.tsx b/react/src/UploadPresetDialog.tsx index 9381473..073179c 100644 --- a/react/src/UploadPresetDialog.tsx +++ b/react/src/UploadPresetDialog.tsx @@ -182,11 +182,11 @@ export default class UploadPresetDialog extends ResizeResponsiveComponent - - @@ -356,13 +356,13 @@ const WifiConfigDialog = withStyles(styles, { withTheme: true })( - diff --git a/react/src/WifiDirectConfigDialog.tsx b/react/src/WifiDirectConfigDialog.tsx index 1402c08..50bad7a 100644 --- a/react/src/WifiDirectConfigDialog.tsx +++ b/react/src/WifiDirectConfigDialog.tsx @@ -506,10 +506,10 @@ const WifiDirectConfigDialog = withStyles(styles, { withTheme: true })( )} - -