Skip to content

Commit

Permalink
feat(copy-uuid): add option to completely hide uuid [MA-1917]
Browse files Browse the repository at this point in the history
sometimes we only want to show the icon and no uuid at all, redacted or not.
  • Loading branch information
filipgutica committed Aug 1, 2023
1 parent 1aba4fa commit c3d4383
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/core/copy-uuid/sandbox/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@
:uuid="uuid"
/>
</div>
<div>
<h3>Don't show uuid</h3>
<CopyUuid
:show-uuid="false"
:uuid="uuid"
/>
</div>
</main>
</div>
</template>
Expand Down
9 changes: 8 additions & 1 deletion packages/core/copy-uuid/src/components/CopyUuid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
useMono ? 'mono' : null
]"
>
{{ isHidden ? '**********' : uuid }}
<span v-if="showUuid">
{{ isHidden ? '**********' : uuid }}
</span>
</div>
</div>
<component
Expand Down Expand Up @@ -82,6 +84,11 @@ const props = defineProps({
type: String,
default: '',
},
showUuid: {
type: Boolean,
required: false,
default: true,
},
})
const emit = defineEmits<{
Expand Down

0 comments on commit c3d4383

Please sign in to comment.