Skip to content

Commit

Permalink
feat(server-routes): copy url button (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
arashsheyda committed Aug 13, 2023
1 parent 103419e commit 7903740
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions packages/devtools/client/components/ServerRouteDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ watchEffect(() => {
routeInputBodyJSON.value = JSON.parse(routeInputBodyJSON.value)
}
})
const copy = useCopy()
</script>

<template>
Expand All @@ -303,12 +305,23 @@ watchEffect(() => {
{{ method.toUpperCase() }}
</option>
</NSelect>
<NTextInput
:model-value="finalPath"
disabled flex-auto font-mono
p="x5 y2"
n="primary xs"
/>
<div relative w-full>
<NTextInput
:model-value="finalPath"
disabled flex-auto font-mono
p="x5 y2"
n="primary xs"
/>
<NButton
v-tooltip="'Copy URL'"
title="Copy URL"
absolute right-2 top-1.7
n="xs blue"
@click="copy(finalURL)"
>
<NIcon icon="carbon:copy" />
</NButton>
</div>
<NButton n="primary solid" @click="fetchData">
<NIcon icon="carbon:send" />
</NButton>
Expand Down

0 comments on commit 7903740

Please sign in to comment.