Skip to content

Commit 26fc0a2

Browse files
Update src/components/Panels/Shared/HelpButton.vue
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent d84f7f2 commit 26fc0a2

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

src/components/Panels/Shared/HelpButton.vue

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,30 @@ const props = defineProps({
2222
2323
const helplink = computed(() => props.obj?.helplink)
2424
25+
async function helpButtonClick() {
26+
const link = helplink.value
27+
if (!link) return
28+
2529
async function helpButtonClick() {
2630
const link = helplink.value
2731
if (!link) return
2832
2933
if (await isTauri()) {
30-
new WebviewWindow(`help-${Date.now()}`, {
31-
url: link,
32-
title: 'Help - CircuitVerse',
33-
width: 1000,
34-
height: 700
35-
})
34+
try {
35+
new WebviewWindow(`help-${Date.now()}`, {
36+
url: link,
37+
title: 'Help - CircuitVerse',
38+
width: 1000,
39+
height: 700
40+
})
41+
} catch {
42+
// Fallback to browser if WebviewWindow fails
43+
window.open(link, '_blank')
44+
}
45+
} else {
46+
window.open(link, '_blank')
47+
}
48+
}
3649
} else {
3750
window.open(link, '_blank')
3851
}

0 commit comments

Comments
 (0)