Skip to content

Commit be39646

Browse files
committed
refactor(ui): better nav
Signed-off-by: Neko Ayaka <[email protected]>
1 parent b3ec732 commit be39646

File tree

4 files changed

+40
-37
lines changed

4 files changed

+40
-37
lines changed

app/components/Generate.vue

+2-6
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,8 @@ onMounted(() => {
5858
<span text-right md:text-left>{{ framePerSecond.toFixed(2) }}</span>
5959
</div>
6060
</Collapsable>
61-
<div
62-
w-full flex flex-col items-center pb-6
63-
max-h="[calc(100vh-250px)]"
64-
max-w="[calc(100vh-250px)]"
65-
>
66-
<div class="relative h-full w-full">
61+
<div w-full flex flex-col items-center>
62+
<div relative w-full>
6763
<div
6864
class="aspect-square [&>svg]:h-full [&>svg]:w-full"
6965
h-full w-full overflow-hidden rounded-lg

app/layouts/default.vue

+30-26
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
<template>
2-
<main h-full>
3-
<div flex flex-col gap-4 px-4 pb-4 pt-4>
4-
<div flex items-center gap-2 text-4xl>
5-
<img src="/logo.svg" alt="Qrs" size-1em>
6-
<h1>
7-
Qrs
8-
</h1>
9-
</div>
10-
<div h-full flex gap-8>
11-
<NuxtLink op70 hover="text-blue" duration-300 transition="all ease-in-out" to="/" active-class="!op100" flex="~ items-center gap-1">
12-
<span i-carbon-upload inline-block />
13-
Transfer
14-
</NuxtLink>
15-
<NuxtLink op70 hover="text-blue" duration-300 transition="all ease-in-out" to="/scan" active-class="!op100" flex="~ items-center gap-1">
16-
<span i-carbon-download inline-block />
17-
Receive
18-
</NuxtLink>
19-
</div>
20-
</div>
21-
<slot />
22-
<div flex flex-col items-center px-4 py-2>
23-
<a href="https://github.com/qqrss/qrs" target="_blank" op70 hover="text-blue" duration-300 transition="all ease-in-out" flex="~ items-center gap-1">
24-
<span i-carbon:logo-github inline-block /><span>GitHub</span>
25-
</a>
26-
</div>
27-
</main>
2+
<div h-full w-full flex flex-col>
3+
<header flex flex-col gap-4 px-4 pb-4 pt-4>
4+
<nav flex items-center>
5+
<div w-40 flex items-center gap-2 text-4xl>
6+
<img src="/logo.svg" alt="Qrs" size-1em>
7+
<h1>
8+
Qrs
9+
</h1>
10+
</div>
11+
<div h-full flex flex-1 justify-center gap-8 text-lg>
12+
<NuxtLink op70 hover="text-blue" duration-300 transition="all ease-in-out" to="/" active-class="!op100" flex="~ items-center gap-1">
13+
<span i-carbon-upload inline-block />
14+
Transfer
15+
</NuxtLink>
16+
<NuxtLink op70 hover="text-blue" duration-300 transition="all ease-in-out" to="/scan" active-class="!op100" flex="~ items-center gap-1">
17+
<span i-carbon-download inline-block />
18+
Receive
19+
</NuxtLink>
20+
</div>
21+
<div w-40 flex justify-end text-2xl>
22+
<a href="https://github.com/qqrss/qrs" target="_blank" op70 hover="text-blue" duration-300 transition="all ease-in-out" flex="~ items-center gap-1">
23+
<span i-carbon:logo-github inline-block />
24+
</a>
25+
</div>
26+
</nav>
27+
</header>
28+
<main h-full w-full flex-1>
29+
<slot />
30+
</main>
31+
</div>
2832
</template>

app/pages/index.vue

+7-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function onFileChange(file?: File) {
4747
</script>
4848

4949
<template>
50-
<div px="4" flex="~ col" w-full gap-6 py-2>
50+
<div px="4" flex="~ col" h-full w-full gap-4 py-2>
5151
<div flex="~ col sm:row" gap="6 sm:2">
5252
<InputFile @file="onFileChange">
5353
<div text="neutral-600 dark:neutral-400" min-w-46 flex justify-center px-4 py-2>
@@ -71,18 +71,21 @@ async function onFileChange(file?: File) {
7171
/>
7272
</div>
7373
</div>
74-
<div v-if="readPhase === ReadPhase.Ready && data" h-full w-full flex justify-center>
74+
<div
75+
v-if="readPhase === ReadPhase.Ready && data"
76+
h-full w-full flex justify-center
77+
>
7578
<Generate
7679
:max-scans-per-second="throttledFps"
7780
:data="data"
7881
:filename="filename"
7982
:content-type="contentType"
80-
h-full w-full
83+
w-full
8184
/>
8285
</div>
8386
<InputFile
8487
v-else
85-
min-h="[calc(100vh-290px)] sm:[calc(100vh-240px)]" h-full w-full
88+
h-full w-full
8689
text="neutral-600 dark:neutral-400"
8790
@file="onFileChange"
8891
/>

app/pages/scan.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const throttledFps = useDebounce(fps, 500)
55
</script>
66

77
<template>
8-
<div px-4 pt-4 space-y-4 min-h="[calc(100vh-160px)]">
8+
<div px-4 pt-4 space-y-4>
99
<div w-full inline-flex flex-row items-center>
1010
<span min-w-40>
1111
<span pr-2 text-zinc-400>Ideal scans</span>

0 commit comments

Comments
 (0)