Improve style for "custom nodes" dialog

This commit is contained in:
Nicola Benaglia
2025-06-20 15:28:35 +02:00
parent 4134a5ec61
commit 52f2ce5de0
4 changed files with 35 additions and 33 deletions

View File

@@ -73,7 +73,6 @@ export const NotAuthenticated = ({
const [mode, setMode] = useState('list'); const [mode, setMode] = useState('list');
const [customNodes, setCustomNodes] = useState(null); const [customNodes, setCustomNodes] = useState(null);
const [importedApiKey, setImportedApiKey] = useState(null); const [importedApiKey, setImportedApiKey] = useState(null);
//add and edit states
const [url, setUrl] = useState('https://'); const [url, setUrl] = useState('https://');
const [customApikey, setCustomApiKey] = useState(''); const [customApikey, setCustomApiKey] = useState('');
const [showSelectApiKey, setShowSelectApiKey] = useState(false); const [showSelectApiKey, setShowSelectApiKey] = useState(false);
@@ -82,7 +81,13 @@ export const NotAuthenticated = ({
const { showTutorial, hasSeenGettingStarted } = const { showTutorial, hasSeenGettingStarted } =
useContext(QORTAL_APP_CONTEXT); useContext(QORTAL_APP_CONTEXT);
const theme = useTheme(); const theme = useTheme();
const { t } = useTranslation(['auth', 'core']); const { t } = useTranslation([
'auth',
'core',
'group',
'question',
'tutorial',
]);
const importedApiKeyRef = useRef(null); const importedApiKeyRef = useRef(null);
const currentNodeRef = useRef(null); const currentNodeRef = useRef(null);
@@ -635,10 +640,6 @@ export const NotAuthenticated = ({
gap: '10px', gap: '10px',
outlineStyle: 'solid', outlineStyle: 'solid',
outlineWidth: '0.5px', outlineWidth: '0.5px',
outlineColor:
theme.palette.mode === 'dark'
? 'rgba(255, 255, 255, 0.5)'
: 'rgba(0, 0, 0, 0.3)',
padding: '20px 30px', padding: '20px 30px',
}} }}
> >
@@ -778,19 +779,31 @@ export const NotAuthenticated = ({
aria-labelledby="alert-dialog-title" aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description" aria-describedby="alert-dialog-description"
fullWidth fullWidth
sx={{
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
borderRadius: '10px',
}}
> >
<DialogTitle <DialogTitle
id="alert-dialog-title" id="alert-dialog-title"
sx={{ sx={{
textAlign: 'center', backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
fontWeight: 'bold', fontWeight: 'bold',
opacity: 1, opacity: 1,
textAlign: 'center',
}} }}
> >
{t('auth:node.custom_many', { postProcess: 'capitalizeAll' })} {t('auth:node.custom_many', { postProcess: 'capitalizeAll' })}
</DialogTitle> </DialogTitle>
<DialogContent> <DialogContent
sx={{
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
}}
>
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
@@ -1004,7 +1017,12 @@ export const NotAuthenticated = ({
</Box> </Box>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions
sx={{
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
}}
>
{mode === 'list' && ( {mode === 'list' && (
<Button variant="contained" onClick={addCustomNode}> <Button variant="contained" onClick={addCustomNode}>
{t('core:action.add', { postProcess: 'capitalizeFirstChar' })} {t('core:action.add', { postProcess: 'capitalizeFirstChar' })}

View File

@@ -73,6 +73,14 @@ const commonThemeOptions = {
}, },
}, },
MuiDialog: {
styleOverrides: {
paper: {
backgroundImage: 'none',
},
},
},
MuiModal: { MuiModal: {
styleOverrides: { styleOverrides: {
root: { root: {

View File

@@ -114,18 +114,6 @@ export const darkThemeOptions: ThemeOptions = {
}, },
}, },
MuiDialog: {
styleOverrides: {
root: {
backgroundColor: 'rgb(77, 80, 85)',
color: 'rgb(255, 255, 255)',
},
paper: {
backgroundImage: 'none',
},
},
},
MuiPaper: { MuiPaper: {
styleOverrides: { styleOverrides: {
root: { root: {

View File

@@ -116,18 +116,6 @@ export const lightThemeOptions: ThemeOptions = {
}, },
}, },
MuiDialog: {
styleOverrides: {
root: {
backgroundColor: 'rgb(220, 220, 220)',
color: 'rgba(0, 0, 0, 0.87)',
},
paper: {
backgroundImage: 'none',
},
},
},
MuiPaper: { MuiPaper: {
styleOverrides: { styleOverrides: {
root: { root: {