Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix: design of filetypes in settings

Ilian Sapundshiev17e57b639593
diff --git a/app/components/dialogs/settings/SettingsFileTypes.tsx b/app/components/dialogs/settings/SettingsFileTypes.tsx
index 61f37a58e..4e55b827e 100644
--- a/app/components/dialogs/settings/SettingsFileTypes.tsx
+++ b/app/components/dialogs/settings/SettingsFileTypes.tsx
@@ -34,31 +34,18 @@ import i18n from '-/services/i18n';
import TransparentBackground from '../../TransparentBackground';
const styles: any = (theme: any) => ({
- root: {
- background: theme.palette.background.paper
- },
fileExtension: {
- width: '15%',
- padding: '0 12px 0 0'
- },
- fileType: {
- paddingBottom: 0,
- paddingTop: 0,
- paddingRight: 0,
+ width: 60,
padding: '0 12px 0 0'
},
fileOpener: {
- width: '25%',
+ width: '35%',
padding: '0 12px 0 0'
},
fileTypeColorDialog: {
- width: '15%',
+ width: 60,
padding: '0 12px 0 0'
},
- fileTypeColorDialogButton: {
- width: '100px',
- padding: '0 10px 0 0'
- },
colorChooserButton: {
maxWidth: 30,
width: 30,
@@ -117,10 +104,6 @@ const SettingsFileTypes = (props: Props) => {
isValidationInProgress = false
} = props;
- /* const modifiedItems = !isComponentActive
- ? sortBy(items, 'type', 'string', 'asc')
- : items; */
-
return (
<div className={classes.root}>
<ColorPickerDialog
@@ -134,10 +117,9 @@ const SettingsFileTypes = (props: Props) => {
<ListItem
data-id={item.id}
key={item.id}
- className={classes.fileType}
style={{
- borderBottom: '1px solid rgba(0, 0, 0, 0.1)',
- padding: '16px 0',
+ padding: 0,
+ paddingBottom: 15,
alignItems: 'flex-end'
}}
>
@@ -228,14 +210,15 @@ const SettingsFileTypes = (props: Props) => {
))}
</Select>
</FormControl>
- <FormControl className={classes.fileTypeColorDialogButton}>
+ <FormControl style={{ width: 50, padding: 0 }}>
<TransparentBackground>
<Button
data-tid="settingsFileTypes_openColorPicker_"
className={classes.colorChooserButton}
style={{
backgroundColor: `${item.color}`,
- minWidth: '100px',
+ minWidth: 50,
+ maxWidth: 50,
cursor: 'pointer'
}}
onClick={() => {