Skip to content

Commit df21022

Browse files
authored
fix: open url with system browser (#18)
Signed-off-by: Young Xu <xuthus5@gmail.com>
1 parent c6ebb9b commit df21022

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

frontend/src/components/About.vue

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@
1919
<div class="about-section">
2020
<h3>{{ $t('about.links') }}</h3>
2121
<div class="links-container">
22-
<a
23-
href="https://github.com/openGemini/openGemini-studio"
24-
target="_blank"
25-
rel="noopener noreferrer"
22+
<button
23+
@click="openURL('https://github.com/openGemini/openGemini-studio')"
2624
class="link-item"
2725
>
2826
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
@@ -34,12 +32,10 @@
3432
<polyline points="15 3 21 3 21 9"/>
3533
<line x1="10" y1="14" x2="21" y2="3"/>
3634
</svg>
37-
</a>
35+
</button>
3836

39-
<a
40-
href="https://github.com/openGemini/openGemini"
41-
target="_blank"
42-
rel="noopener noreferrer"
37+
<button
38+
@click="openURL('https://github.com/openGemini/openGemini')"
4339
class="link-item"
4440
>
4541
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
@@ -51,7 +47,7 @@
5147
<polyline points="15 3 21 3 21 9"/>
5248
<line x1="10" y1="14" x2="21" y2="3"/>
5349
</svg>
54-
</a>
50+
</button>
5551
</div>
5652
</div>
5753
</div>
@@ -64,13 +60,19 @@
6460
</template>
6561

6662
<script setup lang="ts">
63+
import { BrowserOpenURL } from '../../wailsjs/runtime/runtime'
64+
6765
defineProps<{
6866
visible: boolean
6967
}>()
7068
7169
defineEmits<{
7270
close: []
7371
}>()
72+
73+
const openURL = (url: string) => {
74+
BrowserOpenURL(url)
75+
}
7476
</script>
7577

7678
<style scoped>
@@ -176,6 +178,10 @@ defineEmits<{
176178
color: var(--text-primary);
177179
text-decoration: none;
178180
transition: all 0.2s;
181+
cursor: pointer;
182+
width: 100%;
183+
font-size: 14px;
184+
text-align: left;
179185
}
180186
181187
.link-item:hover {

0 commit comments

Comments
 (0)