mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 04:57:42 +03:00
Clean up output for vainfo and ffprobe
This commit is contained in:
parent
9621b4b9a1
commit
a0b6fcb73c
@ -56,7 +56,7 @@ export default function System() {
|
||||
};
|
||||
|
||||
const onCopyFfprobe = async () => {
|
||||
copy(JSON.stringify(state.ffprobe, null, 2));
|
||||
copy(JSON.stringify(state.ffprobe, jsonCleaner, 2));
|
||||
setState({ ...state, ffprobe: '', showFfprobe: false });
|
||||
};
|
||||
|
||||
@ -75,7 +75,7 @@ export default function System() {
|
||||
};
|
||||
|
||||
const onCopyVainfo = async () => {
|
||||
copy(JSON.stringify(state.vainfo, null, 2));
|
||||
copy(JSON.stringify(state.vainfo, jsonCleaner, 2));
|
||||
setState({ ...state, vainfo: '', showVainfo: false });
|
||||
};
|
||||
|
||||
@ -298,3 +298,7 @@ export default function System() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function jsonCleaner(key, value) {
|
||||
return value.replace(/[\\n]+/gi, '');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user