Skip to content

Commit 47c0808

Browse files
committed
fix: apply coderabbit suggestions for help button
1 parent b5810db commit 47c0808

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/Panels/Shared/HelpButton.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,23 @@
1313

1414
<script lang="ts" setup>
1515
import { isTauri } from '@tauri-apps/api/core'
16+
import { computed } from 'vue'
1617
1718
const props = defineProps({
1819
obj: { type: Object, default: undefined },
1920
})
2021
21-
const helplink = props.obj?.helplink
22+
const helplink = computed(() => props.obj?.helplink)
2223
2324
async function helpButtonClick() {
24-
if (!helplink) return
25+
const link = helplink.value
26+
if (!link) return
2527
2628
if (await isTauri()) {
2729
const { open } = await import('@tauri-apps/plugin-shell')
28-
await open(helplink)
30+
await open(link)
2931
} else {
30-
window.open(helplink, '_blank')
32+
window.open(link, '_blank')
3133
}
3234
}
3335
</script>

0 commit comments

Comments
 (0)