add title bar

This commit is contained in:
2025-06-14 02:19:07 +08:00
parent 056448ac00
commit 02e11efcba
2 changed files with 23 additions and 10 deletions

6
public/template.json Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "Sakanana的手机",
"author": "0nepeop1e",
"link": "https://x.com/0nepeop1e",
"description": "长得像Sakanana的手机"
}

View File

@@ -3,7 +3,9 @@
import {
BatteryFullIcon,
HomeIcon,
MessageCircleIcon,
SendHorizontalIcon,
SignalIcon,
Tally4Icon,
TriangleIcon,
WifiIcon
@@ -24,7 +26,7 @@
const s = str.toString();
const diff = char - s.length;
if (diff <= 0) return s;
return s + '0'.repeat(diff);
return '0'.repeat(diff) + s;
}
$effect(() => {
@@ -54,14 +56,19 @@
<div
class="w-full h-full flex flex-col border-3 border-screen-border rounded-10 overflow-hidden bg-background relative"
>
<div
class="bg-status/80 gap-4 shadow-md backdrop-blur-md flex flex-row py-2 px-18 text-16 font-bold text-status-text absolute top-0 -left-10 -right-10"
>
<div class="bg-status shadow-md text-16 font-bold text-status-text -mx-10">
<div class="py-2 px-18 flex flex-row gap-4">
<span>{pad(hour, 2)}:{pad(minute, 2)}</span>
<WifiIcon class="h-full w-auto ml-auto" />
<BatteryFullIcon class="h-full w-auto" />
<WifiIcon class="ml-auto" />
<SignalIcon />
<BatteryFullIcon />
<span>100%</span>
</div>
<div class="px-24 py-8 font-bold text-24 gap-6 flex flex-row items-center">
<MessageCircleIcon />
聊天室
</div>
</div>
<div class="grow flex flex-col-reverse px-15 h-0 overflow-hidden">
{#each render_chats as chat (chat)}
<RenderComment {chat} />