Skip to content

Commit 4c691b8

Browse files
feat : Add Refresh Button on App Header
1 parent 0846b99 commit 4c691b8

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

client/components/AppHeader.vue

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,19 @@
3333
</nav> -->
3434

3535
<!-- Right: Action Links -->
36-
<div class="flex items-center gap-6 flex-shrink-0">
36+
<div class="flex items-center gap-3 flex-shrink-0">
3737
<button
38-
@click="toggleTheme"
38+
@click="handleRefresh"
3939
class="p-2 border border-mono-border hover:bg-mono-hover transition-colors text-primary ml-2"
40+
aria-label="Refresh page"
41+
>
42+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
43+
<path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
44+
</svg>
45+
</button>
46+
<button
47+
@click="toggleTheme"
48+
class="p-2 border border-mono-border hover:bg-mono-hover transition-colors text-primary"
4049
aria-label="Toggle theme"
4150
>
4251
<svg v-if="isDark" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
@@ -58,6 +67,12 @@ const { isDark, toggleTheme } = useTheme()
5867
const logoPath = computed(() => {
5968
return isDark.value ? '/logo-white.png' : '/logo-black.png'
6069
})
70+
71+
const handleRefresh = () => {
72+
if (process.client) {
73+
window.location.reload()
74+
}
75+
}
6176
</script>
6277

6378
<style scoped>

0 commit comments

Comments
 (0)