Skip to content

Commit 96f8c78

Browse files
committed
feat(ui): better mode switch on mobile
Signed-off-by: Neko Ayaka <[email protected]>
1 parent ae16a24 commit 96f8c78

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

app/layouts/default.vue

+40-4
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,59 @@
22
<div h-full w-full flex flex-col>
33
<header flex flex-col gap-4 px-4 pb-4 pt-4>
44
<nav flex items-center>
5-
<div w-40 flex items-center gap-2 text-4xl>
5+
<div w-40 flex="~" items-center gap-2 text-4xl>
66
<img src="/logo.svg" alt="Qrs" size-1em>
77
<h1>
88
Qrs
99
</h1>
1010
</div>
11-
<div h-full flex flex-1 justify-center gap-8 text-lg>
11+
<div
12+
class="flex sm:hidden"
13+
left="50%" bottom="40px" translate-x="-50%"
14+
bg="neutral-100 dark:neutral-900"
15+
absolute flex-1 justify-center gap-2
16+
rounded-full
17+
p-2
18+
text-sm
19+
>
20+
<NuxtLink
21+
to="/"
22+
active-class="!op100 bg-neutral-700 dark:bg-neutral-300 !text-neutral-100 !dark:text-neutral-900"
23+
rounded-full px-3 py-2
24+
op70 hover="text-blue"
25+
flex="~ items-center gap-1"
26+
transition="all ease-in-out" duration-300
27+
>
28+
<span i-carbon-upload inline-block />
29+
Send
30+
</NuxtLink>
31+
<NuxtLink
32+
to="/scan"
33+
active-class="!op100 bg-neutral-700 dark:bg-neutral-300 !text-neutral-100 !dark:text-neutral-900"
34+
rounded-full px-3 py-2
35+
op70 hover="text-blue"
36+
flex="~ items-center gap-1"
37+
transition="all ease-in-out" duration-300
38+
>
39+
<span i-carbon-download inline-block />
40+
Receive
41+
</NuxtLink>
42+
</div>
43+
<div
44+
class="hidden sm:flex"
45+
flex-1 justify-center gap-8
46+
text-lg
47+
>
1248
<NuxtLink op70 hover="text-blue" duration-300 transition="all ease-in-out" to="/" active-class="!op100" flex="~ items-center gap-1">
1349
<span i-carbon-upload inline-block />
14-
Transfer
50+
Send
1551
</NuxtLink>
1652
<NuxtLink op70 hover="text-blue" duration-300 transition="all ease-in-out" to="/scan" active-class="!op100" flex="~ items-center gap-1">
1753
<span i-carbon-download inline-block />
1854
Receive
1955
</NuxtLink>
2056
</div>
21-
<div w-40 flex justify-end text-2xl>
57+
<div w-40 flex="~ <sm:1" justify-end text-2xl>
2258
<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">
2359
<span i-carbon:logo-github inline-block />
2460
</a>

app/pages/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function onFileChange(file?: File) {
6565
<InputSlide
6666
v-model="throttledFps"
6767
:min="1"
68-
:max="120"
68+
:max="60"
6969
smooth
7070
w-full flex-1
7171
/>

0 commit comments

Comments
 (0)