Skip to content

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

chore: ui improvements

Ilian Sapundshiev0375ef212c69
diff --git a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
index c9b08c532..42f48af2c 100644
--- a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
+++ b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
@@ -1012,7 +1012,7 @@ function CreateEditLocationDialog(props: Props) {
className={classes.formControl}
disabled={!Pro}
labelPlacement="start"
- style={{ justifyContent: 'space-between' }}
+ style={{ justifyContent: 'space-between', marginTop: 15 }}
control={
<ProTooltip tooltip={t('ignorePatternDialogTitle')}>
<TsButton
diff --git a/src/renderer/components/dialogs/LocalForm.tsx b/src/renderer/components/dialogs/LocalForm.tsx
index f2292f5c0..0e677771e 100644
--- a/src/renderer/components/dialogs/LocalForm.tsx
+++ b/src/renderer/components/dialogs/LocalForm.tsx
@@ -67,7 +67,7 @@ function LocalForm(props: Props) {
return (
<Grid container>
<Grid item xs={12}>
- <FormControl fullWidth={true} error={errorTextName}>
+ <FormControl fullWidth={true}>
<TsTextField
required
autoFocus
@@ -77,12 +77,12 @@ function LocalForm(props: Props) {
value={name}
data-tid="locationName"
// helperText="Please enter location name"
- label={t('core:createLocationName')}
+ label={t('core:createLocationName') + ' *'}
/>
</FormControl>
</Grid>
<Grid item xs={12}>
- <FormControl fullWidth={true} error={errorTextPath}>
+ <FormControl fullWidth={true}>
<TsTextField
required
name="path"
@@ -100,7 +100,7 @@ function LocalForm(props: Props) {
</InputAdornment>
),
}}
- label={t('core:createLocationPath')}
+ label={t('core:createLocationPath') + ' *'}
/>
{AppConfig.isCordovaAndroid && (
<FormHelperText>
diff --git a/src/renderer/components/dialogs/ObjectStoreForm.tsx b/src/renderer/components/dialogs/ObjectStoreForm.tsx
index 430ccb4bb..1eacbf40a 100644
--- a/src/renderer/components/dialogs/ObjectStoreForm.tsx
+++ b/src/renderer/components/dialogs/ObjectStoreForm.tsx
@@ -20,6 +20,7 @@ import React from 'react';
import Autocomplete from '@mui/material/Autocomplete';
import Grid from '@mui/material/Grid';
import FormControl from '@mui/material/FormControl';
+import FormHelperText from '@mui/material/FormHelperText';
import IconButton from '@mui/material/IconButton';
import TsTextField from '-/components/TsTextField';
import InputAdornment from '@mui/material/InputAdornment';
@@ -147,7 +148,7 @@ function ObjectStoreForm(props: Props) {
return (
<Grid container>
<Grid item xs={12}>
- <FormControl fullWidth={true} error={cloudErrorTextName}>
+ <FormControl fullWidth={true}>
<TsTextField
required
autoFocus
@@ -156,15 +157,19 @@ function ObjectStoreForm(props: Props) {
data-tid="locationName"
onChange={(event) => setStoreName(event.target.value)}
value={storeName}
- label={t('core:createLocationName')}
+ label={t('core:createLocationName') + ' *'}
/>
- {/* {state.cloudErrorTextName && (
- <FormHelperText>{t('core:invalidName')}</FormHelperText>
- )} */}
+ {cloudErrorTextName && (
+ <FormHelperText
+ style={{ marginLeft: 0, marginTop: 0, marginBottom: 10 }}
+ >
+ {t('core:invalidName')}
+ </FormHelperText>
+ )}
</FormControl>
</Grid>
<Grid item xs={12}>
- <FormControl fullWidth={true} error={cloudErrorTextPath}>
+ <FormControl fullWidth={true}>
<TsTextField
name="storePath"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
@@ -173,13 +178,17 @@ function ObjectStoreForm(props: Props) {
value={storePath}
label={t('core:createLocationPath')}
/>
- {/* {state.cloudErrorTextPath && (
- <FormHelperText>{t('core:invalidPath')}</FormHelperText>
- )} */}
+ {cloudErrorTextPath && (
+ <FormHelperText
+ style={{ marginLeft: 0, marginTop: 0, marginBottom: 10 }}
+ >
+ {t('core:invalidPath')}
+ </FormHelperText>
+ )}
</FormControl>
</Grid>
<Grid item xs={12}>
- <FormControl fullWidth={true} error={cloudErrorAccessKey}>
+ <FormControl fullWidth={true}>
<TsTextField
required
name="accessKeyId"
@@ -187,15 +196,20 @@ function ObjectStoreForm(props: Props) {
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={(event) => setAccessKeyId(event.target.value)}
value={accessKeyId}
- label={t('core:accessKeyId')}
+ label={t('core:accessKeyId') + ' *'}
/>
- {/* {state.cloudErrorAccessKey && (
- <FormHelperText>{t('core:invalidAccessKey')}</FormHelperText>
- )} */}
+ {cloudErrorAccessKey && (
+ <FormHelperText
+ style={{ marginLeft: 0, marginTop: 0, marginBottom: 10 }}
+ >
+ {t('core:invalidAccessKey')}
+ </FormHelperText>
+ )}
</FormControl>
</Grid>
<Grid item xs={12}>
- <FormControl fullWidth={true} error={cloudErrorSecretAccessKey}>
+ {/* error={cloudErrorSecretAccessKey} */}
+ <FormControl fullWidth={true}>
<TsTextField
required
name="secretAccessKey"
@@ -204,7 +218,7 @@ function ObjectStoreForm(props: Props) {
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={(event) => setSecretAccessKey(event.target.value)}
value={secretAccessKey}
- label={t('core:secretAccessKey')}
+ label={t('core:secretAccessKey') + ' *'}
InputProps={{
endAdornment: (
<InputAdornment position="end">