/
app.vue
93 lines (85 loc) · 2.73 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
<template>
<k-app
theme="ios"
class="sm:!w-frame sm:!mx-auto sm:border-x !bg-transparent overflow-hidden"
>
<section class="flex flex-col min-h-dvh w-full overflow-y-auto bg-transparent">
<k-navbar component="header" :title="appTitle" class="relative">
<template #left>
<k-link navbar @click="showLeftMenu = true">
<CogIcon class="size-8 text-sky-600" />
</k-link>
</template>
<template #right>
<k-link navbar @click="menu = true">
<img src="~/assets/imas_logo.svg" class="h-8 w-10 text-sky-600" />
</k-link>
</template>
</k-navbar>
<NuxtPage />
<footer class="h-[44px]">
<k-toolbar
:top="false"
component="nav"
class="fixed inset-0 top-auto w-full sm:w-frame sm:mx-auto sm:border-x"
inner-class="justify-evenly bg-gradient-to-b from-slate-200 to-slate-400"
>
<k-link toolbar @click="$router.back">
<ChevronDoubleLeftIcon class="size-8 text-sky-600" />
</k-link>
<k-link toolbar @click="$router.forward">
<ChevronDoubleRightIcon class="size-8 text-sky-600" />
</k-link>
<k-link toolbar @click="openShare">
<ShareIcon class="h-7 w-8 text-sky-600" />
</k-link>
<k-link toolbar @click="reload">
<ArrowPathIcon class="size-8 text-sky-600" />
</k-link>
<k-link toolbar @click="menu = true">
<img src="@/assets/imas_logo.svg" class="h-8 w-10 fill-sky-600" />
</k-link>
</k-toolbar>
</footer>
</section>
<LeftSideMenu />
<SideMenu />
<ShareMenu />
<InfoSheet />
</k-app>
</template>
<script lang="ts" setup>
import { kApp, kToolbar, kLink, kNavbar } from 'konsta/vue'
import {
ArrowPathIcon,
ChevronDoubleLeftIcon,
ChevronDoubleRightIcon,
CogIcon,
ShareIcon,
} from '@heroicons/vue/24/solid'
import { useShare } from '@vueuse/core'
import InfoSheet from '@/components/infoSheet.vue'
import ShareMenu from '@/components/shareMenu.vue'
import LeftSideMenu from '@/components/leftSideMenu.vue'
import SideMenu from '@/components/sideMenu.vue'
const menu = useMenu()
const appTitle = useAppTitle()
const tanzaku = useTanzaku()
const thumbnail = useThumbnail()
const { showMenu: showLeftMenu } = useSetting()
const { share } = useShare()
// const shareMenu = useShareMenu()
await Promise.all([
tanzaku.fetch(),
thumbnail.fetchId(),
thumbnail.fetchBlobs(),
])
function openShare() {
share({
title: 'モバマスアーカイブ(二宮飛鳥編)',
text: '#モバマスアーカイブ #二宮飛鳥',
url: location.href,
})
}
const reload = () => location.reload()
</script>