Spaces:
Running
Running
Sync DemoService aaf51080bfba7b9090345607cc2ecdaaed3592fa
Browse files- .gitattributes +4 -0
- main/app/lobby/page.tsx +60 -221
- main/public/lobby-backgrounds/ATTRIBUTION.md +12 -0
- main/public/lobby-backgrounds/cloudy-illustration.png +3 -0
- main/public/lobby-backgrounds/rainy-illustration.png +3 -0
- main/public/lobby-backgrounds/snowy-illustration.png +3 -0
- main/public/lobby-backgrounds/sunny-illustration.png +3 -0
.gitattributes
CHANGED
|
@@ -45,3 +45,7 @@ main/public/placeholders/logo.png filter=lfs diff=lfs merge=lfs -text
|
|
| 45 |
router/ai/public/uploads/cat-1771408253056.PNG filter=lfs diff=lfs merge=lfs -text
|
| 46 |
router/ai/public/uploads/hanok-1771408154562.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
router/ai/public/uploads/hanok-1771408560236.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
router/ai/public/uploads/cat-1771408253056.PNG filter=lfs diff=lfs merge=lfs -text
|
| 46 |
router/ai/public/uploads/hanok-1771408154562.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
router/ai/public/uploads/hanok-1771408560236.png filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
main/public/lobby-backgrounds/cloudy-illustration.png filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
main/public/lobby-backgrounds/rainy-illustration.png filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
main/public/lobby-backgrounds/snowy-illustration.png filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
main/public/lobby-backgrounds/sunny-illustration.png filter=lfs diff=lfs merge=lfs -text
|
main/app/lobby/page.tsx
CHANGED
|
@@ -75,37 +75,22 @@ const WEATHER_ICON_TONE: Record<WeatherCondition, string> = {
|
|
| 75 |
snowy: "text-[#5BA8D8]",
|
| 76 |
};
|
| 77 |
|
| 78 |
-
const WEATHER_SCENE: Record<
|
| 79 |
-
WeatherCondition,
|
| 80 |
-
{
|
| 81 |
-
pageBackground: string;
|
| 82 |
-
illustrationFill: string;
|
| 83 |
-
illustrationStroke: string;
|
| 84 |
-
}
|
| 85 |
-
> = {
|
| 86 |
sunny: {
|
| 87 |
-
|
| 88 |
-
"
|
| 89 |
-
illustrationFill: "#DDF4FF",
|
| 90 |
-
illustrationStroke: "#4FB7D8",
|
| 91 |
},
|
| 92 |
rainy: {
|
| 93 |
-
|
| 94 |
-
"
|
| 95 |
-
illustrationFill: "#DCEFFC",
|
| 96 |
-
illustrationStroke: "#5D8FB8",
|
| 97 |
},
|
| 98 |
cloudy: {
|
| 99 |
-
|
| 100 |
-
"
|
| 101 |
-
illustrationFill: "#E5EEEC",
|
| 102 |
-
illustrationStroke: "#8EA0A8",
|
| 103 |
},
|
| 104 |
snowy: {
|
| 105 |
-
|
| 106 |
-
"
|
| 107 |
-
illustrationFill: "#E7F6FF",
|
| 108 |
-
illustrationStroke: "#78BFE7",
|
| 109 |
},
|
| 110 |
};
|
| 111 |
|
|
@@ -120,63 +105,37 @@ const FALLBACK_COORDS = {
|
|
| 120 |
longitude: 126.978,
|
| 121 |
};
|
| 122 |
|
|
|
|
|
|
|
|
|
|
| 123 |
const INITIAL_WEATHER: WeatherState = {
|
| 124 |
-
condition: "cloudy",
|
| 125 |
-
status: "loading",
|
| 126 |
temperature: null,
|
| 127 |
};
|
| 128 |
|
| 129 |
-
function getWeatherRecommendation({
|
| 130 |
-
condition,
|
| 131 |
-
status,
|
| 132 |
-
temperature,
|
| 133 |
-
}: WeatherState): WeatherRecommendation {
|
| 134 |
if (status === "loading") {
|
| 135 |
-
return {
|
| 136 |
-
detail: "๋ ์จ ํ์ธ ์ค",
|
| 137 |
-
message: "์ค๋ ์ฝ์ค ํ์ธ ์ค์ด์์",
|
| 138 |
-
};
|
| 139 |
}
|
| 140 |
|
| 141 |
if (condition === "rainy") {
|
| 142 |
-
return {
|
| 143 |
-
detail: "์ ์ ๊ธธ ์ฃผ์",
|
| 144 |
-
message: "์งง๊ณ ์์ ํ ์ฝ์ค๋ก ๊ฐ์",
|
| 145 |
-
};
|
| 146 |
}
|
| 147 |
|
| 148 |
if (condition === "snowy") {
|
| 149 |
-
return {
|
| 150 |
-
detail: "๋ฏธ๋๋ผ ์ฃผ์",
|
| 151 |
-
message: "์ค๋์ ์์ ์ด ๋จผ์ ์์",
|
| 152 |
-
};
|
| 153 |
}
|
| 154 |
|
| 155 |
if (temperature !== null && temperature >= 28) {
|
| 156 |
-
return {
|
| 157 |
-
detail: "๋์ ์ฃผ์",
|
| 158 |
-
message: "๊ทธ๋ ๋ง์ ์งง์ ์ฝ์ค๋ก",
|
| 159 |
-
};
|
| 160 |
}
|
| 161 |
|
| 162 |
if (temperature !== null && temperature <= 5) {
|
| 163 |
-
return {
|
| 164 |
-
detail: "์ฐจ๊ฐ์ด ๊ณต๊ธฐ",
|
| 165 |
-
message: "์ฒ์ฒํ ๋ชธ์ ๋ฐ์ฐ๋ฉฐ ๋ฐ์ด์",
|
| 166 |
-
};
|
| 167 |
-
}
|
| 168 |
-
|
| 169 |
-
if (condition === "sunny") {
|
| 170 |
-
return {
|
| 171 |
-
detail: "๋ฌ๋ํ๊ธฐ ์ข์ ๋ ",
|
| 172 |
-
message: "๊ฐ๋ณ๊ฒ ๋ชธ ํ๊ณ ์ถ๋ฐํด์",
|
| 173 |
-
};
|
| 174 |
}
|
| 175 |
|
| 176 |
-
return {
|
| 177 |
-
detail: "ํ๋ฆฐ ๋ ์ ์์ ์ ์ผ๋ก",
|
| 178 |
-
message: "ํ์ด์ค ์ก๊ธฐ ์ข์ ๋ ์ด์์",
|
| 179 |
-
};
|
| 180 |
}
|
| 181 |
|
| 182 |
function getCurrentPosition(): Promise<GeolocationPosition> {
|
|
@@ -350,26 +309,6 @@ function RecordIcon({ className = "" }: IconProps) {
|
|
| 350 |
);
|
| 351 |
}
|
| 352 |
|
| 353 |
-
function ClockIcon({ className = "" }: IconProps) {
|
| 354 |
-
return (
|
| 355 |
-
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2.2" aria-hidden="true">
|
| 356 |
-
<circle cx="12" cy="12" r="9" />
|
| 357 |
-
<path d="M12 7v5l3 2" />
|
| 358 |
-
</svg>
|
| 359 |
-
);
|
| 360 |
-
}
|
| 361 |
-
|
| 362 |
-
function RouteIcon({ className = "" }: IconProps) {
|
| 363 |
-
return (
|
| 364 |
-
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2.2" aria-hidden="true">
|
| 365 |
-
<circle cx="6" cy="18" r="2.5" />
|
| 366 |
-
<circle cx="18" cy="6" r="2.5" />
|
| 367 |
-
<path d="M8.2 16.2c3.5-4.4 4.1 1.8 7.6-2.6" />
|
| 368 |
-
<path d="M16.2 7.8c-3.5 4.4-4.1-1.8-7.6 2.6" />
|
| 369 |
-
</svg>
|
| 370 |
-
);
|
| 371 |
-
}
|
| 372 |
-
|
| 373 |
function ShareIcon({ className = "" }: IconProps) {
|
| 374 |
return (
|
| 375 |
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2.2" aria-hidden="true">
|
|
@@ -435,83 +374,6 @@ function WeatherIcon({
|
|
| 435 |
return <SunIcon className={className} />;
|
| 436 |
}
|
| 437 |
|
| 438 |
-
function LobbyBackgroundIllustration({
|
| 439 |
-
fill,
|
| 440 |
-
stroke,
|
| 441 |
-
}: {
|
| 442 |
-
fill: string;
|
| 443 |
-
stroke: string;
|
| 444 |
-
}) {
|
| 445 |
-
return (
|
| 446 |
-
<div className="pointer-events-none absolute left-1/2 top-[74px] z-0 h-[520px] w-[620px] -translate-x-[43%] opacity-100">
|
| 447 |
-
<svg viewBox="0 0 560 430" fill="none" aria-hidden="true" className="h-full w-full">
|
| 448 |
-
<path
|
| 449 |
-
d="M52 302C102 252 145 247 194 273C246 301 290 272 338 230C389 185 434 188 508 223"
|
| 450 |
-
stroke={stroke}
|
| 451 |
-
strokeWidth="18"
|
| 452 |
-
strokeLinecap="round"
|
| 453 |
-
opacity="0.16"
|
| 454 |
-
/>
|
| 455 |
-
<path
|
| 456 |
-
d="M72 317C126 269 164 274 209 296C258 320 303 290 350 247C397 204 439 209 500 239"
|
| 457 |
-
stroke={stroke}
|
| 458 |
-
strokeWidth="4"
|
| 459 |
-
strokeLinecap="round"
|
| 460 |
-
strokeDasharray="10 14"
|
| 461 |
-
opacity="0.34"
|
| 462 |
-
/>
|
| 463 |
-
<path
|
| 464 |
-
d="M63 337C145 313 216 324 288 340C362 356 428 347 511 314V430H63V337Z"
|
| 465 |
-
fill={fill}
|
| 466 |
-
opacity="0.46"
|
| 467 |
-
/>
|
| 468 |
-
<path
|
| 469 |
-
d="M353 160C371 152 388 157 400 172C413 188 429 191 448 181"
|
| 470 |
-
stroke={stroke}
|
| 471 |
-
strokeWidth="15"
|
| 472 |
-
strokeLinecap="round"
|
| 473 |
-
opacity="0.17"
|
| 474 |
-
/>
|
| 475 |
-
<path
|
| 476 |
-
d="M402 130C409 130 415 124 415 116C415 109 409 103 402 103C394 103 388 109 388 116C388 124 394 130 402 130Z"
|
| 477 |
-
fill={stroke}
|
| 478 |
-
opacity="0.32"
|
| 479 |
-
/>
|
| 480 |
-
<path
|
| 481 |
-
d="M392 146L375 179L398 195L386 230"
|
| 482 |
-
stroke={stroke}
|
| 483 |
-
strokeWidth="13"
|
| 484 |
-
strokeLinecap="round"
|
| 485 |
-
strokeLinejoin="round"
|
| 486 |
-
opacity="0.28"
|
| 487 |
-
/>
|
| 488 |
-
<path
|
| 489 |
-
d="M395 151L426 162L446 143"
|
| 490 |
-
stroke={stroke}
|
| 491 |
-
strokeWidth="12"
|
| 492 |
-
strokeLinecap="round"
|
| 493 |
-
strokeLinejoin="round"
|
| 494 |
-
opacity="0.26"
|
| 495 |
-
/>
|
| 496 |
-
<path
|
| 497 |
-
d="M382 230L350 257"
|
| 498 |
-
stroke={stroke}
|
| 499 |
-
strokeWidth="12"
|
| 500 |
-
strokeLinecap="round"
|
| 501 |
-
opacity="0.24"
|
| 502 |
-
/>
|
| 503 |
-
<path
|
| 504 |
-
d="M399 195L432 226"
|
| 505 |
-
stroke={stroke}
|
| 506 |
-
strokeWidth="12"
|
| 507 |
-
strokeLinecap="round"
|
| 508 |
-
opacity="0.24"
|
| 509 |
-
/>
|
| 510 |
-
</svg>
|
| 511 |
-
</div>
|
| 512 |
-
);
|
| 513 |
-
}
|
| 514 |
-
|
| 515 |
export default function Page() {
|
| 516 |
const router = useRouter();
|
| 517 |
const [displayName, setDisplayName] = useState("๋ฌ๋");
|
|
@@ -532,6 +394,15 @@ export default function Page() {
|
|
| 532 |
: `${weather.label}${weatherState.temperature !== null ? ` ${weatherState.temperature}ยฐ` : ""}`;
|
| 533 |
|
| 534 |
useEffect(() => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 535 |
let isMounted = true;
|
| 536 |
|
| 537 |
const loadWeather = async () => {
|
|
@@ -765,110 +636,78 @@ export default function Page() {
|
|
| 765 |
|
| 766 |
return (
|
| 767 |
<main
|
| 768 |
-
className="rts-page relative
|
| 769 |
style={{
|
| 770 |
-
|
|
|
|
| 771 |
backgroundRepeat: "no-repeat",
|
|
|
|
| 772 |
}}
|
| 773 |
>
|
| 774 |
-
<
|
| 775 |
-
|
| 776 |
-
stroke={weatherScene.illustrationStroke}
|
| 777 |
-
/>
|
| 778 |
-
|
| 779 |
-
<section className="relative z-10 mx-auto flex min-h-screen w-full max-w-[430px] flex-col gap-4 px-4 pb-8 pt-5 lg:grid lg:min-h-0 lg:max-w-[1120px] lg:grid-cols-[minmax(0,1.25fr)_minmax(320px,0.75fr)] lg:items-start lg:gap-5 lg:px-8 lg:py-8">
|
| 780 |
-
<div className="lg:col-span-2">
|
| 781 |
<WearableConnectionStatus />
|
| 782 |
</div>
|
| 783 |
|
| 784 |
-
<section className="relative overflow-hidden rounded-[22px] border border-white/
|
| 785 |
-
<div className="
|
| 786 |
<div className="min-w-0">
|
| 787 |
-
<p className="rts-heading text-[15px] font-medium leading-6 text-[#
|
| 788 |
-
์๋
ํ์ธ์, <span className="text-[#
|
| 789 |
-
</p>
|
| 790 |
-
<p className="mt-2 text-sm font-semibold leading-5 text-[#748093]">
|
| 791 |
-
์ค๋๋ ์ข์ ๋ฌ๋ ๋์ธ์!
|
| 792 |
</p>
|
|
|
|
| 793 |
{weatherState.status === "fallback" && (
|
| 794 |
-
<p className="mt-1 text-xs text-[#
|
| 795 |
)}
|
| 796 |
</div>
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
<
|
| 800 |
-
condition={weatherState.condition}
|
| 801 |
-
className={`h-5 w-5 ${WEATHER_ICON_TONE[weatherState.condition]}`}
|
| 802 |
-
/>
|
| 803 |
-
<span className="rts-heading whitespace-nowrap text-sm font-medium text-[#111827]">
|
| 804 |
-
{weatherLabel}
|
| 805 |
-
</span>
|
| 806 |
</div>
|
| 807 |
</div>
|
| 808 |
|
| 809 |
-
<article className="
|
| 810 |
-
<
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
</p>
|
| 814 |
-
<h1 className="mt-2 text-2xl font-bold leading-snug text-[#111827]">
|
| 815 |
-
{weatherRecommendation.message}
|
| 816 |
-
</h1>
|
| 817 |
-
</div>
|
| 818 |
-
|
| 819 |
-
<div className="relative z-10 mt-4 flex flex-wrap gap-2">
|
| 820 |
-
<span className="inline-flex items-center gap-1.5 rounded-full bg-[#F5F7F6] px-3 py-2 text-xs font-semibold text-[#4B5563]">
|
| 821 |
-
<RouteIcon className="h-3.5 w-3.5" />
|
| 822 |
-
๊ธฐ๋ณธ ์ฝ์ค
|
| 823 |
-
</span>
|
| 824 |
-
<span className="inline-flex items-center gap-1.5 rounded-full bg-[#F5F7F6] px-3 py-2 text-xs font-semibold text-[#4B5563]">
|
| 825 |
-
<ClockIcon className="h-3.5 w-3.5" />
|
| 826 |
-
์งง์ ๋ฌ๋
|
| 827 |
-
</span>
|
| 828 |
-
</div>
|
| 829 |
-
|
| 830 |
<button
|
| 831 |
type="button"
|
| 832 |
onClick={handleStartRouteSearch}
|
| 833 |
-
className="
|
| 834 |
>
|
| 835 |
-
|
| 836 |
<ArrowRightIcon className="h-5 w-5" />
|
| 837 |
</button>
|
| 838 |
</article>
|
| 839 |
</section>
|
| 840 |
|
| 841 |
-
<
|
|
|
|
| 842 |
<div className="grid grid-cols-3 gap-2">
|
| 843 |
-
{QUICK_ACTIONS.map((action
|
| 844 |
const Icon = action.icon;
|
| 845 |
-
const tones = [
|
| 846 |
-
"bg-[#F0FAF5] text-[#159965]",
|
| 847 |
-
"bg-[#EFF6FF] text-[#2563D9]",
|
| 848 |
-
"bg-[#F5F0FF] text-[#5E36B4]",
|
| 849 |
-
];
|
| 850 |
|
| 851 |
return (
|
| 852 |
<button
|
| 853 |
key={action.href}
|
| 854 |
type="button"
|
| 855 |
onClick={() => router.push(action.href)}
|
| 856 |
-
className="flex min-h-[
|
| 857 |
aria-label={action.label}
|
| 858 |
>
|
| 859 |
-
<span className=
|
| 860 |
<Icon className="h-5 w-5" />
|
| 861 |
</span>
|
| 862 |
-
<span className="text-[11px] font-semibold text-[#
|
| 863 |
{action.label}
|
| 864 |
</span>
|
| 865 |
</button>
|
| 866 |
);
|
| 867 |
})}
|
| 868 |
</div>
|
| 869 |
-
</
|
| 870 |
|
| 871 |
-
<section className="rounded-[18px] border border-white/
|
| 872 |
<div className="flex items-center justify-between">
|
| 873 |
<h2 className="text-base font-bold text-[#111827]">์ต๊ทผ ๋ฃจํธ</h2>
|
| 874 |
<button
|
|
@@ -880,7 +719,7 @@ export default function Page() {
|
|
| 880 |
</button>
|
| 881 |
</div>
|
| 882 |
|
| 883 |
-
<div className="mt-3 grid gap-3
|
| 884 |
{isRecentLoading &&
|
| 885 |
Array.from({ length: RECENT_ROUTE_LIMIT }).map((_, index) => (
|
| 886 |
<article
|
|
|
|
| 75 |
snowy: "text-[#5BA8D8]",
|
| 76 |
};
|
| 77 |
|
| 78 |
+
const WEATHER_SCENE: Record<WeatherCondition, { background: string }> = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
sunny: {
|
| 80 |
+
background:
|
| 81 |
+
"linear-gradient(180deg, rgba(244, 249, 235, 0.48) 0%, rgba(248, 250, 243, 0.74) 52%, rgba(255, 255, 255, 0.91) 100%), url('/lobby-backgrounds/sunny-illustration.png')",
|
|
|
|
|
|
|
| 82 |
},
|
| 83 |
rainy: {
|
| 84 |
+
background:
|
| 85 |
+
"linear-gradient(180deg, rgba(224, 235, 243, 0.50) 0%, rgba(240, 246, 248, 0.76) 52%, rgba(255, 255, 255, 0.92) 100%), url('/lobby-backgrounds/rainy-illustration.png')",
|
|
|
|
|
|
|
| 86 |
},
|
| 87 |
cloudy: {
|
| 88 |
+
background:
|
| 89 |
+
"linear-gradient(180deg, rgba(237, 240, 235, 0.52) 0%, rgba(247, 248, 244, 0.78) 52%, rgba(255, 255, 255, 0.92) 100%), url('/lobby-backgrounds/cloudy-illustration.png')",
|
|
|
|
|
|
|
| 90 |
},
|
| 91 |
snowy: {
|
| 92 |
+
background:
|
| 93 |
+
"linear-gradient(180deg, rgba(230, 241, 250, 0.48) 0%, rgba(246, 250, 253, 0.78) 52%, rgba(255, 255, 255, 0.93) 100%), url('/lobby-backgrounds/snowy-illustration.png')",
|
|
|
|
|
|
|
| 94 |
},
|
| 95 |
};
|
| 96 |
|
|
|
|
| 105 |
longitude: 126.978,
|
| 106 |
};
|
| 107 |
|
| 108 |
+
// Set a weather condition here only when previewing a specific lobby scene.
|
| 109 |
+
const LOBBY_WEATHER_PREVIEW: WeatherCondition | null = null;
|
| 110 |
+
|
| 111 |
const INITIAL_WEATHER: WeatherState = {
|
| 112 |
+
condition: LOBBY_WEATHER_PREVIEW ?? "cloudy",
|
| 113 |
+
status: LOBBY_WEATHER_PREVIEW ? "ready" : "loading",
|
| 114 |
temperature: null,
|
| 115 |
};
|
| 116 |
|
| 117 |
+
function getWeatherRecommendation({ condition, status, temperature }: WeatherState): WeatherRecommendation {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
if (status === "loading") {
|
| 119 |
+
return { detail: "๋ ์จ ํ์ธ ์ค", message: "์ค๋ ๋ฌ๋ฆด ์ฝ์ค๋ฅผ ์ฐพ์๋ณผ๊น์?" };
|
|
|
|
|
|
|
|
|
|
| 120 |
}
|
| 121 |
|
| 122 |
if (condition === "rainy") {
|
| 123 |
+
return { detail: "์ ์ ๋
ธ๋ฉด์ ์ฃผ์", message: "์งง๊ณ ์์ ํ ์ฝ์ค๋ฅผ ์ถ์ฒํด์" };
|
|
|
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
|
| 126 |
if (condition === "snowy") {
|
| 127 |
+
return { detail: "๋ฏธ๋๋ผ์ ์ฃผ์", message: "์ค๋์ ์ปจ๋์
์ ๋ง์ถฐ ๋ฌ๋ ค์" };
|
|
|
|
|
|
|
|
|
|
| 128 |
}
|
| 129 |
|
| 130 |
if (temperature !== null && temperature >= 28) {
|
| 131 |
+
return { detail: "๋์์ ์ฃผ์", message: "๊ทธ๋์ด ์๋ ์ฝ์ค๋ฅผ ์ฐพ์๋ณผ๊น์?" };
|
|
|
|
|
|
|
|
|
|
| 132 |
}
|
| 133 |
|
| 134 |
if (temperature !== null && temperature <= 5) {
|
| 135 |
+
return { detail: "์ฐจ๊ฐ์ด ๊ณต๊ธฐ", message: "๊ฐ๋ณ๊ฒ ๋ชธ์ ํ๊ณ ์์ํด์" };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
}
|
| 137 |
|
| 138 |
+
return { detail: "์ค๋์ ๋ฌ๋", message: "๋ด ์ฃผ๋ณ์์ ๋ฌ๋ฆด ๊ธธ์ ์ฐพ์๋ณผ๊น์?" };
|
|
|
|
|
|
|
|
|
|
| 139 |
}
|
| 140 |
|
| 141 |
function getCurrentPosition(): Promise<GeolocationPosition> {
|
|
|
|
| 309 |
);
|
| 310 |
}
|
| 311 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
function ShareIcon({ className = "" }: IconProps) {
|
| 313 |
return (
|
| 314 |
<svg className={className} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2.2" aria-hidden="true">
|
|
|
|
| 374 |
return <SunIcon className={className} />;
|
| 375 |
}
|
| 376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 377 |
export default function Page() {
|
| 378 |
const router = useRouter();
|
| 379 |
const [displayName, setDisplayName] = useState("๋ฌ๋");
|
|
|
|
| 394 |
: `${weather.label}${weatherState.temperature !== null ? ` ${weatherState.temperature}ยฐ` : ""}`;
|
| 395 |
|
| 396 |
useEffect(() => {
|
| 397 |
+
if (LOBBY_WEATHER_PREVIEW) {
|
| 398 |
+
setWeatherState({
|
| 399 |
+
condition: LOBBY_WEATHER_PREVIEW,
|
| 400 |
+
status: "ready",
|
| 401 |
+
temperature: null,
|
| 402 |
+
});
|
| 403 |
+
return;
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
let isMounted = true;
|
| 407 |
|
| 408 |
const loadWeather = async () => {
|
|
|
|
| 636 |
|
| 637 |
return (
|
| 638 |
<main
|
| 639 |
+
className="rts-page relative bg-[#F7F8F6]"
|
| 640 |
style={{
|
| 641 |
+
backgroundImage: weatherScene.background,
|
| 642 |
+
backgroundPosition: "center top",
|
| 643 |
backgroundRepeat: "no-repeat",
|
| 644 |
+
backgroundSize: "cover",
|
| 645 |
}}
|
| 646 |
>
|
| 647 |
+
<section className="relative mx-auto flex min-h-screen w-full max-w-[430px] flex-col gap-4 px-4 pb-8 pt-5">
|
| 648 |
+
<div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 649 |
<WearableConnectionStatus />
|
| 650 |
</div>
|
| 651 |
|
| 652 |
+
<section className="relative overflow-hidden rounded-[22px] border border-white/75 bg-white/74 p-4 shadow-[0_12px_28px_rgba(27,54,42,0.12)] backdrop-blur-md">
|
| 653 |
+
<div className="flex items-start justify-between gap-4">
|
| 654 |
<div className="min-w-0">
|
| 655 |
+
<p className="rts-heading text-[15px] font-medium leading-6 text-[#16211B]">
|
| 656 |
+
์๋
ํ์ธ์, <span className="text-[#22724D]">{displayName}๋</span>
|
|
|
|
|
|
|
|
|
|
| 657 |
</p>
|
| 658 |
+
<p className="mt-2 text-sm font-semibold leading-5 text-[#63736A]">์ค๋ ๋ฌ๋ฆด ์ค๋น๋ ๋์๋์?</p>
|
| 659 |
{weatherState.status === "fallback" && (
|
| 660 |
+
<p className="mt-1 text-xs text-[#63736A]">ํ์ฌ ์์น ๋ฏธํ์ธ ยท ์์ธ ๊ธฐ์ค ๋ ์จ</p>
|
| 661 |
)}
|
| 662 |
</div>
|
| 663 |
+
<div className="flex h-11 shrink-0 items-center gap-2 rounded-full border border-white/90 bg-white/80 px-3 shadow-sm">
|
| 664 |
+
<WeatherIcon condition={weatherState.condition} className={`h-5 w-5 ${WEATHER_ICON_TONE[weatherState.condition]}`} />
|
| 665 |
+
<span className="rts-heading whitespace-nowrap text-sm font-medium text-[#16211B]">{weatherLabel}</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 666 |
</div>
|
| 667 |
</div>
|
| 668 |
|
| 669 |
+
<article className="mt-6 rounded-[18px] border border-white/85 bg-white/78 p-4 shadow-[0_8px_24px_rgba(27,54,42,0.08)] backdrop-blur-sm">
|
| 670 |
+
<p className="rts-heading text-xs font-medium text-[#197146]">{weatherRecommendation.detail}</p>
|
| 671 |
+
<h1 className="mt-2 text-2xl font-bold leading-snug text-[#16211B]">{weatherRecommendation.message}</h1>
|
| 672 |
+
<p className="mt-3 text-sm leading-5 text-[#63736A]">์ํ๋ ๋๋ฌผ ๋ชจ์๊ณผ ๊ฑฐ๋ฆฌ๋ฅผ ๊ณ ๋ฅด๋ฉด ๋ด ์ฃผ๋ณ์ ๊ธธ์ ์ฐพ์๋๋ ค์.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 673 |
<button
|
| 674 |
type="button"
|
| 675 |
onClick={handleStartRouteSearch}
|
| 676 |
+
className="mt-5 flex h-14 w-full items-center justify-center gap-2 rounded-xl bg-[#163A2B] px-5 text-base font-bold text-white transition hover:bg-[#224E3B] active:scale-[0.98]"
|
| 677 |
>
|
| 678 |
+
์ฝ์ค ๋ง๋ค๊ธฐ
|
| 679 |
<ArrowRightIcon className="h-5 w-5" />
|
| 680 |
</button>
|
| 681 |
</article>
|
| 682 |
</section>
|
| 683 |
|
| 684 |
+
<section aria-labelledby="quick-actions-title" className="rounded-[18px] border border-white/75 bg-white/74 p-4 shadow-sm backdrop-blur-md">
|
| 685 |
+
<h2 id="quick-actions-title" className="mb-3 text-base font-bold text-[#16211B]">๋ฐ๋ก๊ฐ๊ธฐ</h2>
|
| 686 |
<div className="grid grid-cols-3 gap-2">
|
| 687 |
+
{QUICK_ACTIONS.map((action) => {
|
| 688 |
const Icon = action.icon;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 689 |
|
| 690 |
return (
|
| 691 |
<button
|
| 692 |
key={action.href}
|
| 693 |
type="button"
|
| 694 |
onClick={() => router.push(action.href)}
|
| 695 |
+
className="flex min-h-[82px] flex-col items-center justify-center gap-2 rounded-xl bg-white/72 transition hover:bg-white active:scale-[0.98]"
|
| 696 |
aria-label={action.label}
|
| 697 |
>
|
| 698 |
+
<span className="flex h-8 w-8 items-center justify-center text-[#276448]">
|
| 699 |
<Icon className="h-5 w-5" />
|
| 700 |
</span>
|
| 701 |
+
<span className="text-[11px] font-semibold text-[#3D4A42]">
|
| 702 |
{action.label}
|
| 703 |
</span>
|
| 704 |
</button>
|
| 705 |
);
|
| 706 |
})}
|
| 707 |
</div>
|
| 708 |
+
</section>
|
| 709 |
|
| 710 |
+
<section className="rounded-[18px] border border-white/75 bg-white/74 p-4 shadow-sm backdrop-blur-md">
|
| 711 |
<div className="flex items-center justify-between">
|
| 712 |
<h2 className="text-base font-bold text-[#111827]">์ต๊ทผ ๋ฃจํธ</h2>
|
| 713 |
<button
|
|
|
|
| 719 |
</button>
|
| 720 |
</div>
|
| 721 |
|
| 722 |
+
<div className="mt-3 grid gap-3">
|
| 723 |
{isRecentLoading &&
|
| 724 |
Array.from({ length: RECENT_ROUTE_LIMIT }).map((_, index) => (
|
| 725 |
<article
|
main/public/lobby-backgrounds/ATTRIBUTION.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Lobby weather background
|
| 2 |
+
|
| 3 |
+
These are original generated illustrations used only as weather-sensitive
|
| 4 |
+
backgrounds for the Run The Shape lobby. No third-party photo or stock asset is
|
| 5 |
+
used.
|
| 6 |
+
|
| 7 |
+
| Local file | Weather | Visual cue |
|
| 8 |
+
| --- | --- | --- |
|
| 9 |
+
| `sunny-illustration.png` | Sunny | Sunlit lakeside path |
|
| 10 |
+
| `rainy-illustration.png` | Rainy | Wet path, rain, and puddles |
|
| 11 |
+
| `cloudy-illustration.png` | Cloudy | High soft clouds and drifting leaves |
|
| 12 |
+
| `snowy-illustration.png` | Snowy | Snowfall and a snow-covered path |
|
main/public/lobby-backgrounds/cloudy-illustration.png
ADDED
|
Git LFS Details
|
main/public/lobby-backgrounds/rainy-illustration.png
ADDED
|
Git LFS Details
|
main/public/lobby-backgrounds/snowy-illustration.png
ADDED
|
Git LFS Details
|
main/public/lobby-backgrounds/sunny-illustration.png
ADDED
|
Git LFS Details
|