Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d1322a7

Browse filesBrowse files
committed
feat: add link to directly open an issue on github with reproduction link
1 parent 677c1ff commit d1322a7
Copy full SHA for d1322a7

File tree

Expand file treeCollapse file tree

1 file changed

+31
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+31
-0
lines changed

‎app/layouts/default.vue

Copy file name to clipboardExpand all lines: app/layouts/default.vue
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ const ssr = useRouteQuery<string, boolean>('ssr', 'false', {
5454
const prod = useRouteQuery<string, boolean>('prod', 'false', {
5555
transform: stringToBooleanTransformer,
5656
})
57+
58+
const currentHref = shallowRef(location.href)
59+
const route = useRoute()
60+
61+
watch(() => route.fullPath, () => {
62+
currentHref.value = location.href
63+
})
64+
65+
const issueLink = computed(() => {
66+
return `https://github.com/vueuse/vueuse/issues/new?template=bug_report.yml&reproduction=${encodeURIComponent(currentHref.value)}`
67+
})
5768
</script>
5869

5970
<template>
@@ -86,6 +97,16 @@ const prod = useRouteQuery<string, boolean>('prod', 'false', {
8697
aria-label="GitHub"
8798
/>
8899
</UTooltip>
100+
<UTooltip text="Report an issue on GitHub">
101+
<UButton
102+
color="neutral"
103+
variant="ghost"
104+
:to="issueLink"
105+
target="_blank"
106+
icon="i-pajamas-issue-new"
107+
aria-label="Issue via GitHub"
108+
/>
109+
</UTooltip>
89110
</div>
90111
<div class="lg:hidden">
91112
<USlideover title="Settings">
@@ -101,6 +122,16 @@ const prod = useRouteQuery<string, boolean>('prod', 'false', {
101122
<USelectMenu v-model="vueVersion" :items="vueVersionsSorted" class="w-32" icon="i-logos-vue" :loading="loadingVersions" />
102123
<UButton icon="i-lucide-refresh-ccw" size="md" color="primary" variant="soft" @click="fetchVersions" />
103124
</div>
125+
<UButton
126+
color="neutral"
127+
variant="ghost"
128+
:to="issueLink"
129+
target="_blank"
130+
icon="i-pajamas-issue-new"
131+
aria-label="Issue via GitHub"
132+
>
133+
Report an issue on GitHub
134+
</UButton>
104135
</section>
105136
</template>
106137
</USlideover>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.