diff --git a/src/ui/src/components/core/base/BaseControlBar.vue b/src/ui/src/components/core/base/BaseControlBar.vue
index 6ce2da620..8dce2fd86 100644
--- a/src/ui/src/components/core/base/BaseControlBar.vue
+++ b/src/ui/src/components/core/base/BaseControlBar.vue
@@ -37,10 +37,11 @@ function copyToClipboard({ text = "" }: { text?: string }) {
@import "@/renderer/sharedStyles.css";
.BaseControlBar {
- margin: 10px 0;
+ margin-top: 8px;
display: flex;
flex-direction: row;
justify-content: flex-end;
+ gap: 8px;
}
.control-button {
@@ -50,7 +51,6 @@ function copyToClipboard({ text = "" }: { text?: string }) {
color: white;
cursor: pointer;
font-size: 11px;
- margin-right: 10px;
padding: 4px 8px;
&:hover {
diff --git a/src/ui/src/components/core/content/CoreJsonViewer.vue b/src/ui/src/components/core/content/CoreJsonViewer.vue
index cd059a2ae..5ddcdadea 100644
--- a/src/ui/src/components/core/content/CoreJsonViewer.vue
+++ b/src/ui/src/components/core/content/CoreJsonViewer.vue
@@ -6,6 +6,10 @@
:initial-depth="initialDepth"
/>
+
@@ -55,6 +59,17 @@ const definition: WriterComponentDefinition = {
type: FieldType.Number,
init: "0",
},
+ copy: {
+ name: "Copy",
+ desc: "If active, adds a control bar with copy JSON button.",
+ type: FieldType.Text,
+ options: {
+ yes: "yes",
+ no: "no",
+ },
+ default: "no",
+ category: FieldCategory.Style,
+ },
jsonViewerIndentationSpacing: {
name: "JSON indentation",
type: FieldType.Width,
@@ -75,13 +90,15 @@ export default { writer: definition };