Disable share downloading when EnableDownloads is false.

Fixes https://github.com/navidrome/navidrome/pull/2246#issuecomment-1472341635
This commit is contained in:
Deluan
2023-03-16 13:11:26 -04:00
parent 23c483da10
commit 377e7ebd52
5 changed files with 19 additions and 14 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import {
import { shareUrl } from '../utils'
import { Link } from '@material-ui/core'
import { DateField } from '../common'
import config from '../config'
export const ShareEdit = (props) => {
const { id, basePath, hasCreate, ...rest } = props
@@ -20,7 +21,7 @@ export const ShareEdit = (props) => {
{url}
</Link>
<TextInput source="description" />
<BooleanInput source="downloadable" />
{config.enableDownloads && <BooleanInput source="downloadable" />}
<DateTimeInput source="expiresAt" />
<TextInput source="contents" disabled />
<TextInput source="format" disabled />