Skip to content

Commit

Permalink
frontend: cleanup general settings
Browse files Browse the repository at this point in the history
* let general settings looks similar to cluster settings

Signed-off-by: farodin91 <[email protected]>
  • Loading branch information
farodin91 committed Nov 23, 2024
1 parent 8ff79cf commit 6311413
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 26 deletions.
8 changes: 0 additions & 8 deletions frontend/src/components/App/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ export default function Settings() {
backLink
>
<NameValueTable
valueCellProps={{
sx: theme => ({
width: '60%',
[theme.breakpoints.down('sm')]: {
width: 'unset',
},
}),
}}
rows={[
{
name: t('translation|Language'),
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/App/Settings/ThemeChangeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export default function ThemeChangeButton(props: { showBothIcons?: boolean }) {
'& button': {
boxShadow: 'none',
borderRadius: '4px',
padding: '0.8rem 1.5rem',
},
'& .MuiButton-contained': {
backgroundColor: theme.palette.mode === 'dark' ? '#fff' : 'rgba(0, 0, 0, 0.45)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@
Language
</dt>
<dd
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-8 css-9f9ori-MuiGrid-root"
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-8 css-deb4a-MuiGrid-root"
>
<div
class="MuiFormControl-root css-k2e4wk-MuiFormControl-root"
class="MuiFormControl-root css-1nrlq1o-MuiFormControl-root"
>
<div
class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-colorPrimary MuiInputBase-formControl css-16kq2pe-MuiInputBase-root-MuiInput-root-MuiSelect-root"
Expand Down Expand Up @@ -123,10 +123,10 @@
Theme
</dt>
<dd
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-8 css-9f9ori-MuiGrid-root"
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-8 css-deb4a-MuiGrid-root"
>
<div
class="MuiButtonGroup-root MuiButtonGroup-outlined css-1b41vff-MuiButtonGroup-root"
class="MuiButtonGroup-root MuiButtonGroup-outlined css-1o97n10-MuiButtonGroup-root"
role="group"
>
<button
Expand Down Expand Up @@ -157,7 +157,7 @@
Number of rows for tables
</dt>
<dd
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-8 css-9f9ori-MuiGrid-root"
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-8 css-deb4a-MuiGrid-root"
>
<div
class="MuiFormControl-root css-1nrlq1o-MuiFormControl-root"
Expand Down Expand Up @@ -203,7 +203,7 @@
Timezone to display for dates
</dt>
<dd
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-8 css-9f9ori-MuiGrid-root"
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-8 css-1xrovmc-MuiGrid-root"
>
<div
class="MuiBox-root css-10rqxfs"
Expand All @@ -214,19 +214,12 @@
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-wb57ya-MuiFormControl-root-MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-standard MuiFormLabel-colorPrimary MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-sizeMedium MuiInputLabel-standard css-zh08sj-MuiFormLabel-root-MuiInputLabel-root"
data-shrink="false"
for="cluster-selector-autocomplete"
id="cluster-selector-autocomplete-label"
>
Timezone
</label>
<div
class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-adornedEnd MuiAutocomplete-inputRoot css-lbi814-MuiInputBase-root-MuiInput-root"
>
<input
aria-autocomplete="both"
aria-describedby="cluster-selector-autocomplete-helper-text"
aria-expanded="false"
aria-invalid="false"
autocapitalize="none"
Expand Down Expand Up @@ -265,6 +258,12 @@
</button>
</div>
</div>
<p
class="MuiFormHelperText-root MuiFormHelperText-sizeMedium css-nnd8o8-MuiFormHelperText-root"
id="cluster-selector-autocomplete-helper-text"
>
Timezone
</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function TimezoneSelect(props: TimezoneSelectorProps) {
autoComplete
includeInputInList
openOnFocus
renderInput={params => <TextField {...params} label={t('Timezone')} />}
renderInput={params => <TextField {...params} helperText={t('Timezone')} />}
onChange={(_ev, value) => onChange(value.name)}
value={timezoneOptions.find(option => option.name === initialTimezone)}
/>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/i18n/LocaleSelect/LocaleSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function LocaleSelect(props: LocaleSelectProps) {
const extraInputProps = import.meta.env.UNDER_TEST ? { 'aria-controls': 'under-test' } : {};

return (
<FormControl sx={{ margin: theme.spacing(2) }} {...formControlProps}>
<FormControl {...formControlProps}>
{props.showTitle && <FormLabel component="legend">{t('Select locale')}</FormLabel>}
<Select
value={i18n.language ? i18n.language : 'en'}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<body>
<div>
<div
class="MuiFormControl-root css-k2e4wk-MuiFormControl-root"
class="MuiFormControl-root css-1nrlq1o-MuiFormControl-root"
>
<div
class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-colorPrimary MuiInputBase-formControl css-16kq2pe-MuiInputBase-root-MuiInput-root-MuiSelect-root"
Expand Down

0 comments on commit 6311413

Please sign in to comment.