mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-27 19:38:57 +01:00
fix: allow editing name of main library
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
493e7ff534
commit
d715f161ce
1 changed files with 2 additions and 2 deletions
|
|
@ -55,6 +55,7 @@ const LibraryEdit = (props) => {
|
|||
|
||||
// Library ID 1 is protected (main library)
|
||||
const canDelete = props.id !== '1'
|
||||
const canEditPath = props.id !== '1'
|
||||
|
||||
const save = useCallback(
|
||||
async (values) => {
|
||||
|
|
@ -99,14 +100,13 @@ const LibraryEdit = (props) => {
|
|||
source="name"
|
||||
validate={[required()]}
|
||||
variant="outlined"
|
||||
InputProps={{ readOnly: !canDelete }} // Disable editing path for library 1
|
||||
/>
|
||||
<TextInput
|
||||
source="path"
|
||||
validate={[required()]}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
InputProps={{ readOnly: !canDelete }} // Disable editing path for library 1
|
||||
InputProps={{ readOnly: !canEditPath }} // Disable editing path for library 1
|
||||
/>
|
||||
|
||||
<Box mt="2em" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue