Skip to content

Commit

Permalink
Add show_copy to ConsoleEditorReadOnly.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
surister committed Dec 18, 2024
1 parent d6b1d1c commit eb98fe7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/console/ConsoleEditorReadOnly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const props = defineProps({
type: Boolean,
default: false
},
show_copy: {
type: Boolean,
default: true
},
callable: {
type: Function,
},
Expand Down Expand Up @@ -56,10 +60,11 @@ async function copy_content(content) {
:unclickable="false"
:hide_cursor="true"/>
</v-card-title>
<v-card-actions class="pt-2">
<v-card-actions class="pt-2" v-if="show_run || show_copy">

<v-btn @click="callable" v-if="show_run">run</v-btn>
<v-badge :icon="button_state.icon"
v-if="show_copy"
:color="button_state.color">
<v-btn @click="copy_content(content)"
:text="button_states.normal.text"/>
Expand Down

0 comments on commit eb98fe7

Please sign in to comment.