1717 <IconSvg class =" layout-sidebar__link-icon" name =" smtp" />
1818 </NuxtLink >
1919
20- <NuxtLink to =" /http-dumps" title =" Http dumps" class =" layout-sidebar__link" >
20+ <NuxtLink
21+ to =" /http-dumps"
22+ title =" Http dumps"
23+ class =" layout-sidebar__link"
24+ >
2125 <IconSvg class =" layout-sidebar__link-icon" name =" http-dumps" />
2226 </NuxtLink >
2327
3236 <NuxtLink to =" /settings" title =" Settings" class =" layout-sidebar__link" >
3337 <IconSvg class =" layout-sidebar__link-icon" name =" settings" />
3438 </NuxtLink >
39+
40+ <div v-if =" appVersion" class =" layout-sidebar__nav-version" >
41+ {{ appVersion }}
42+ </div >
3543 </nav >
3644 </aside >
3745</template >
3846
3947<script lang="ts">
4048import IconSvg from " ~/components/IconSvg/IconSvg.vue" ;
4149import { defineComponent } from " vue" ;
50+ import { useNuxtApp } from " #app" ;
4251
4352export default defineComponent ({
4453 components: { IconSvg },
@@ -48,6 +57,22 @@ export default defineComponent({
4857 required: true ,
4958 },
5059 },
60+ setup() {
61+ if (process .client ) {
62+ const { $config } = useNuxtApp ();
63+
64+ return {
65+ appVersion:
66+ ! $config ?.version || $config .version === " 0.0.1"
67+ ? " @dev"
68+ : ` v${$config .version } ` ,
69+ };
70+ }
71+
72+ return {
73+ appVersion: " @dev" ,
74+ };
75+ },
5176});
5277 </script >
5378
@@ -57,7 +82,7 @@ export default defineComponent({
5782}
5883
5984.layout-sidebar__nav {
60- @apply divide-y divide-gray-300 dark :divide- gray- 600 sticky top- 0;
85+ @apply divide-y divide-gray-300 dark :divide- gray- 600 sticky top- 0 h - screen max - h - screen ;
6186}
6287
6388.layout-sidebar__link {
@@ -68,6 +93,10 @@ export default defineComponent({
6893 }
6994}
7095
96+ .layout-sidebar__nav-version {
97+ @apply flex justify-center text-xs dark :text- gray- 400 p- 2 absolute bottom- 0 left- 0 right- 0;
98+ }
99+
71100.layout-sidebar__link-icon {
72101 @apply fill-current ;
73102}
0 commit comments