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;
|
||||
if (editor.getModels().length > 0) {
|
||||
yamlModel = editor.getModel(modelUri)
|
||||
yamlModel = editor.getModel(modelUri);
|
||||
} else {
|
||||
yamlModel = editor.createModel(config, 'yaml', modelUri)
|
||||
yamlModel = editor.createModel(config, 'yaml', modelUri);
|
||||
}
|
||||
|
||||
setDiagnosticsOptions({
|
||||
@ -93,9 +93,11 @@ export default function Config() {
|
||||
<div className="flex justify-between">
|
||||
<Heading>Config</Heading>
|
||||
<div>
|
||||
<Button className="mx-2" onClick={(e) => handleCopyConfig(e)}>
|
||||
Copy Config
|
||||
</Button>
|
||||
{window.navigator.clipboard && (
|
||||
<Button className="mx-2" onClick={(e) => handleCopyConfig(e)}>
|
||||
Copy Config
|
||||
</Button>
|
||||
)}
|
||||
<Button className="mx-2" onClick={(e) => onHandleSaveConfig(e)}>
|
||||
Save & Restart
|
||||
</Button>
|
||||
|
||||
@ -90,9 +90,11 @@ export default function System() {
|
||||
{state.ffprobe != '' ? <p className="mb-2">{state.ffprobe}</p> : <ActivityIndicator />}
|
||||
</div>
|
||||
<div className="p-2 flex justify-start flex-row-reverse space-x-2">
|
||||
(window.navigator.clipboard && (
|
||||
<Button className="ml-2" onClick={() => onCopyFfprobe()} type="text">
|
||||
Copy
|
||||
</Button>
|
||||
))
|
||||
<Button
|
||||
className="ml-2"
|
||||
onClick={() => setState({ ...state, ffprobe: '', showFfprobe: false })}
|
||||
@ -115,9 +117,11 @@ export default function System() {
|
||||
)}
|
||||
</div>
|
||||
<div className="p-2 flex justify-start flex-row-reverse space-x-2 whitespace-pre-wrap">
|
||||
<Button className="ml-2" onClick={() => onCopyVainfo()} type="text">
|
||||
Copy
|
||||
</Button>
|
||||
{window.navigator.clipboard && (
|
||||
<Button className="ml-2" onClick={() => onCopyVainfo()} type="text">
|
||||
Copy
|
||||
</Button>
|
||||
)}
|
||||
<Button className="ml-2" onClick={() => setState({ ...state, vainfo: '', showVainfo: false })} type="text">
|
||||
Close
|
||||
</Button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user