-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
131 lines (122 loc) · 3.61 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<template>
<v-app>
<v-navigation-drawer
v-model="appStore.toggleMenu"
expand-on-hover
:rail="$vuetify.display.lgAndUp"
>
<template #prepend>
<div class="tw-hidden tw-h-16 tw-flex-col tw-px-2 md:tw-flex">
<nuxt-link
to="/"
class="tw-my-auto tw-flex tw-flex-col tw-justify-center tw-rounded-sm tw-align-middle tw-transition-colors hover:tw-bg-[#2a2a2a]"
>
<img
src="/gelbooru-logo.svg"
class="tw-mx-auto tw-h-auto tw-w-6 tw-object-contain md:tw-w-10"
>
</nuxt-link>
</div>
<v-divider />
</template>
<v-list nav>
<v-list-item
v-for="(item, i) in itemList"
:key="i"
:disabled="!authStore.logged_in_computed"
color="primary"
:to="item.to"
>
<template #prepend>
<v-icon :icon="item.icon" />
</template>
<v-list-item-title> {{ item.text }} </v-list-item-title>
</v-list-item>
<v-spacer />
</v-list>
<template #append>
<div>
<v-divider />
<v-list nav>
<v-list-item
:disabled="!authStore.logged_in_computed"
color="primary"
to="/settings"
>
<template #prepend>
<v-icon icon="mdi-cog" />
</template>
<v-list-item-title> Settings </v-list-item-title>
</v-list-item>
</v-list>
</div>
</template>
</v-navigation-drawer>
<AppSiteBar />
<v-main>
<NuxtLoadingIndicator color="#006FFA" />
<ClientOnly>
<v-fade-transition>
<div
v-if="appStore.loading"
class="tw-fixed tw-left-1/2 tw-z-50 tw-mt-1 -tw-translate-x-1/2 tw-rounded-full tw-bg-black tw-bg-opacity-70 tw-p-3 tw-backdrop-blur-sm"
>
<v-progress-circular
color="primary"
indeterminate
/>
</div>
</v-fade-transition>
<AppNotificationsAlerts class="tw-fixed tw-bottom-2 tw-right-2 tw-z-50" />
</ClientOnly>
<v-container
fluid
class="tw-flex tw-min-h-[91dvh] tw-flex-col tw-items-center tw-pb-6"
>
<NuxtPage />
</v-container>
<v-footer class="tw-flex tw-flex-col tw-gap-4 tw-bg-neutral-950 tw-p-8 tw-shadow-md">
<v-btn
icon
variant="text"
href="https://github.com/losfroger/gelbooru-nuxt"
target="_blank"
>
<v-icon icon="mdi-github" />
<v-tooltip
location="top center"
activator="parent"
>
See source code
</v-tooltip>
</v-btn>
<v-divider class="tw-w-full tw-border-opacity-70" />
<p class="text-body-2 tw-text-center">
This site is an unofficial third party client for Gelbooru.
</p>
</v-footer>
</v-main>
</v-app>
</template>
<script setup lang="ts">
import { useAuthStore } from '~/stores/authStore'
import { useSettingsStore } from '~/stores/settingsStore'
import { useAppStore } from '~/stores/appStore'
const authStore = useAuthStore()
const settingsStore = useSettingsStore()
const appStore = useAppStore()
useHead({
htmlAttrs: {
lang: 'es',
},
titleTemplate: (titleChunk) => {
return titleChunk ? `${titleChunk} - Gelbooru` : 'Gelbooru'
}
})
const itemList = ref([
{text: 'Search', icon: 'mdi-magnify', to: '/'},
{text: 'Favorites', icon: 'mdi-heart', to: '/favorites?page=1&tags=sort:score'},
])
</script>
<style scoped>
</style>