mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Don't show copy buttons when not available
This commit is contained in:
parent
d49359e26a
commit
dfbc511f41
@ -57,9 +57,9 @@ export default function Config() {
|
|||||||
|
|
||||||
let yamlModel;
|
let yamlModel;
|
||||||
if (editor.getModels().length > 0) {
|
if (editor.getModels().length > 0) {
|
||||||
yamlModel = editor.getModel(modelUri)
|
yamlModel = editor.getModel(modelUri);
|
||||||
} else {
|
} else {
|
||||||
yamlModel = editor.createModel(config, 'yaml', modelUri)
|
yamlModel = editor.createModel(config, 'yaml', modelUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
setDiagnosticsOptions({
|
setDiagnosticsOptions({
|
||||||
@ -93,9 +93,11 @@ export default function Config() {
|
|||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<Heading>Config</Heading>
|
<Heading>Config</Heading>
|
||||||
<div>
|
<div>
|
||||||
<Button className="mx-2" onClick={(e) => handleCopyConfig(e)}>
|
{window.navigator.clipboard && (
|
||||||
Copy Config
|
<Button className="mx-2" onClick={(e) => handleCopyConfig(e)}>
|
||||||
</Button>
|
Copy Config
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<Button className="mx-2" onClick={(e) => onHandleSaveConfig(e)}>
|
<Button className="mx-2" onClick={(e) => onHandleSaveConfig(e)}>
|
||||||
Save & Restart
|
Save & Restart
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -90,9 +90,11 @@ export default function System() {
|
|||||||
{state.ffprobe != '' ? <p className="mb-2">{state.ffprobe}</p> : <ActivityIndicator />}
|
{state.ffprobe != '' ? <p className="mb-2">{state.ffprobe}</p> : <ActivityIndicator />}
|
||||||
</div>
|
</div>
|
||||||
<div className="p-2 flex justify-start flex-row-reverse space-x-2">
|
<div className="p-2 flex justify-start flex-row-reverse space-x-2">
|
||||||
|
(window.navigator.clipboard && (
|
||||||
<Button className="ml-2" onClick={() => onCopyFfprobe()} type="text">
|
<Button className="ml-2" onClick={() => onCopyFfprobe()} type="text">
|
||||||
Copy
|
Copy
|
||||||
</Button>
|
</Button>
|
||||||
|
))
|
||||||
<Button
|
<Button
|
||||||
className="ml-2"
|
className="ml-2"
|
||||||
onClick={() => setState({ ...state, ffprobe: '', showFfprobe: false })}
|
onClick={() => setState({ ...state, ffprobe: '', showFfprobe: false })}
|
||||||
@ -115,9 +117,11 @@ export default function System() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="p-2 flex justify-start flex-row-reverse space-x-2 whitespace-pre-wrap">
|
<div className="p-2 flex justify-start flex-row-reverse space-x-2 whitespace-pre-wrap">
|
||||||
<Button className="ml-2" onClick={() => onCopyVainfo()} type="text">
|
{window.navigator.clipboard && (
|
||||||
Copy
|
<Button className="ml-2" onClick={() => onCopyVainfo()} type="text">
|
||||||
</Button>
|
Copy
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<Button className="ml-2" onClick={() => setState({ ...state, vainfo: '', showVainfo: false })} type="text">
|
<Button className="ml-2" onClick={() => setState({ ...state, vainfo: '', showVainfo: false })} type="text">
|
||||||
Close
|
Close
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user