Skip to content

Commit 5553d2f

Browse files
committed
improve(pages): turn sidebar pages into links
1 parent 658bcf8 commit 5553d2f

File tree

2 files changed

+32
-16
lines changed

2 files changed

+32
-16
lines changed

apps/client/src/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ html {
144144
isolation: isolate;
145145
}
146146
147+
a {
148+
text-decoration: none;
149+
}
150+
147151
h1,
148152
h2,
149153
h3 {

apps/client/src/components/PageItem.vue

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
<template>
2-
<q-item
3-
:data-page-id="pageId"
4-
clickable
5-
active-class="bg-grey-9"
6-
v-ripple
7-
@click="
8-
internals.pages.goToPage(pageId, {
9-
openInNewTab: ($event as MouseEvent).ctrlKey,
10-
})
11-
"
2+
<a
3+
:href="`/pages/${pageId}`"
4+
@click.prevent.stop
125
>
13-
<PageItemContent
14-
:icon="icon"
15-
:page-id="pageId"
16-
:prefer="prefer"
17-
/>
18-
</q-item>
6+
<q-item
7+
v-bind="$attrs"
8+
:data-page-id="pageId"
9+
clickable
10+
active-class="bg-grey-9"
11+
v-ripple
12+
@click="
13+
internals.pages.goToPage(pageId, {
14+
openInNewTab: ($event as MouseEvent).ctrlKey,
15+
})
16+
"
17+
>
18+
<PageItemContent
19+
:icon="icon"
20+
:page-id="pageId"
21+
:prefer="prefer"
22+
/>
23+
</q-item>
24+
</a>
1925
</template>
2026

27+
<script lang="ts">
28+
export default {
29+
inheritAttrs: false,
30+
};
31+
</script>
32+
2133
<script setup lang="ts">
2234
defineProps<{
2335
icon: boolean;

0 commit comments

Comments
 (0)