Skip to content

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

fix: correcting the ui of the webdav mask

Ilian Sapundshievee9763a4192d
diff --git a/app/components/dialogs/RenameEntryDialog.tsx b/app/components/dialogs/RenameEntryDialog.tsx
index cb480ddaa..590131600 100644
--- a/app/components/dialogs/RenameEntryDialog.tsx
+++ b/app/components/dialogs/RenameEntryDialog.tsx
@@ -129,7 +129,7 @@ function RenameEntryDialog(props: Props) {
disableConfirmButton.current = noValid;
if (noValid || initValid !== noValid) {
- if(inputError !== noValid) {
+ if (inputError !== noValid) {
setInputError(noValid);
} else {
forceUpdate();
diff --git a/app/components/dialogs/WebdavForm.tsx b/app/components/dialogs/WebdavForm.tsx
index ae352d37f..8c4bae39b 100644
--- a/app/components/dialogs/WebdavForm.tsx
+++ b/app/components/dialogs/WebdavForm.tsx
@@ -19,7 +19,7 @@
import React, { ChangeEvent } from 'react';
import FormControl from '@mui/material/FormControl';
-import Input from '@mui/material/Input';
+import TextField from '@mui/material/TextField';
import InputLabel from '@mui/material/InputLabel';
import {
Grid,
@@ -81,16 +81,14 @@ function WebdavForm(props: Props) {
<Grid container direction="column" spacing={1}>
<Grid item>
<FormControl fullWidth={true} error={errorTextName}>
- <InputLabel htmlFor="name">
- {i18n.t('core:createLocationName')}
- </InputLabel>
- <Input
+ <TextField
required
margin="dense"
name="name"
inputProps={{ autoCorrect: 'off' }}
onChange={event => setName(event.target.value)}
value={name}
+ label={i18n.t('core:createLocationName')}
data-tid="locationName"
fullWidth={true}
/>
@@ -120,26 +118,21 @@ function WebdavForm(props: Props) {
<>
<Grid item>
<FormControl fullWidth={true}>
- <InputLabel htmlFor="userNameId">
- {i18n.t('core:userName')}
- </InputLabel>
- <Input
+ <TextField
margin="dense"
name="userNameId"
fullWidth={true}
data-tid="userNameIdTID"
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={event => setUserName(event.target.value)}
+ label={i18n.t('core:userName')}
value={userName}
/>
</FormControl>
</Grid>
<Grid item>
<FormControl fullWidth={true}>
- <InputLabel htmlFor="password">
- {i18n.t('core:password')}
- </InputLabel>
- <Input
+ <TextField
margin="dense"
name="password"
type={showPassword ? 'text' : 'password'}
@@ -148,17 +141,20 @@ function WebdavForm(props: Props) {
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={event => setPassword(event.target.value)}
value={password}
- endAdornment={
- <InputAdornment position="end">
- <IconButton
- aria-label="toggle password visibility"
- onClick={() => setShowPassword(!showPassword)}
- size="large"
- >
- {showPassword ? <Visibility /> : <VisibilityOff />}
- </IconButton>
- </InputAdornment>
- }
+ label={i18n.t('core:password')}
+ InputProps={{
+ endAdornment: (
+ <InputAdornment position="end">
+ <IconButton
+ aria-label="toggle password visibility"
+ onClick={() => setShowPassword(!showPassword)}
+ size="large"
+ >
+ {showPassword ? <Visibility /> : <VisibilityOff />}
+ </IconButton>
+ </InputAdornment>
+ )
+ }}
/>
</FormControl>
</Grid>
@@ -167,10 +163,7 @@ function WebdavForm(props: Props) {
{authType === AuthTypes.Token && (
<Grid item>
<FormControl fullWidth={true}>
- <InputLabel htmlFor="webDavToken">
- {i18n.t('core:webDavToken')}
- </InputLabel>
- <Input
+ <TextField
margin="dense"
name="webDavToken"
type={showPassword ? 'text' : 'password'}
@@ -179,27 +172,27 @@ function WebdavForm(props: Props) {
inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={event => setSecretAccessKey(event.target.value)}
value={secretAccessKey}
- endAdornment={
- <InputAdornment position="end">
- <IconButton
- aria-label="toggle password visibility"
- onClick={() => setShowPassword(!showPassword)}
- size="large"
- >
- {showPassword ? <Visibility /> : <VisibilityOff />}
- </IconButton>
- </InputAdornment>
- }
+ label={i18n.t('core:webDavToken')}
+ InputProps={{
+ endAdornment: (
+ <InputAdornment position="end">
+ <IconButton
+ aria-label="toggle password visibility"
+ onClick={() => setShowPassword(!showPassword)}
+ size="large"
+ >
+ {showPassword ? <Visibility /> : <VisibilityOff />}
+ </IconButton>
+ </InputAdornment>
+ )
+ }}
/>
</FormControl>
</Grid>
)}
<Grid item>
<FormControl fullWidth={true} error={webdavErrorUrl}>
- <InputLabel htmlFor="endpointURL">
- {i18n.t('core:endpointURL')}
- </InputLabel>
- <Input
+ <TextField
margin="dense"
name="endpointURL"
fullWidth={true}
@@ -207,6 +200,7 @@ function WebdavForm(props: Props) {
placeholder={i18n.t('webdavServiceURL')}
onChange={event => setEndpointURL(event.target.value)}
value={endpointURL}
+ label={i18n.t('core:endpointURL')}
/>
</FormControl>
</Grid>
diff --git a/app/locales/de_DE/core.json b/app/locales/de_DE/core.json
index c7da49070..b7107f6b7 100644
--- a/app/locales/de_DE/core.json
+++ b/app/locales/de_DE/core.json
@@ -667,7 +667,7 @@
"byExtension": "Bei Erweiterung",
"rename": "Umbenennen",
"fileOpenHistory": "Kürzlich geöffnete Dateien",
- "folderOpenHistory": "Kürzlich geöffnete Ornder",
+ "folderOpenHistory": "Kürzlich geöffnete Ordner",
"fileEditHistory": "Kürzlich bearbeitete Dateien",
"clearHistory": "Verlauf löschen",
"showBookmarks": "Lesezeichen",
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index 4a6611225..417ca7486 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -522,7 +522,7 @@
"switchAdvancedMode": "Advanced Mode",
"switchAdvanced": "More properties",
"switchGeneral": "General",
- "userName": "User",
+ "userName": "Username",
"openLink": "Open Link",
"invalidLink": "Invalid Link",
"link": "Link",
@@ -684,5 +684,6 @@
"noItems": "No items found",
"notAvailable": "Not available",
"clearBackground": "Clear background image",
+ "password": "Password",
"-": "-"
}