diff --git a/artifacts/teaboy-os/public/opengraph.jpg b/artifacts/teaboy-os/public/opengraph.jpg index e444e8e2..556ad323 100644 Binary files a/artifacts/teaboy-os/public/opengraph.jpg and b/artifacts/teaboy-os/public/opengraph.jpg differ diff --git a/artifacts/teaboy-os/src/components/clock.tsx b/artifacts/teaboy-os/src/components/clock.tsx index 3e75c212..80691144 100644 --- a/artifacts/teaboy-os/src/components/clock.tsx +++ b/artifacts/teaboy-os/src/components/clock.tsx @@ -438,14 +438,14 @@ function homeClockPosKey(userId: number | string | null | undefined): string { } function readHomeClockPosition(userId: number | string | null | undefined): number { - if (typeof window === "undefined") return 0; + if (typeof window === "undefined") return -1; try { const v = window.localStorage.getItem(homeClockPosKey(userId)); - if (v === null) return 0; + if (v === null) return -1; const n = Number(v); - return Number.isFinite(n) && n >= 0 ? Math.floor(n) : 0; + return Number.isFinite(n) && n >= 0 ? Math.floor(n) : -1; } catch { - return 0; + return -1; } } diff --git a/artifacts/teaboy-os/src/pages/home.tsx b/artifacts/teaboy-os/src/pages/home.tsx index 9384b3fa..134a947b 100644 --- a/artifacts/teaboy-os/src/pages/home.tsx +++ b/artifacts/teaboy-os/src/pages/home.tsx @@ -217,7 +217,7 @@ function SortableClockTile({ onPointerCancel={onPointerUp} >
{ const appIds = (orderedApps ?? []).map((a) => `app-${a.id}`); if (!homeClockVisible) return appIds; - const safePos = Math.min(Math.max(clockPos, 0), appIds.length); + const defaultPos = lang === "ar" ? appIds.length : 0; + const resolvedPos = clockPos < 0 ? defaultPos : clockPos; + const safePos = Math.min(Math.max(resolvedPos, 0), appIds.length); const out: string[] = [...appIds]; out.splice(safePos, 0, CLOCK_TILE_ID); return out; - }, [orderedApps, clockPos, homeClockVisible]); + }, [orderedApps, clockPos, homeClockVisible, lang]); const sortableIds = combinedIds; const handleDragEnd = (event: DragEndEvent) => { @@ -521,13 +523,13 @@ export default function HomePage() { {/* Apps Grid */}
-
+

{t("home.myApps")}

{orderedApps && orderedApps.length > 0 && ( - {formatNumber(orderedApps.length, lang)} + ยท {formatNumber(orderedApps.length, lang)} )}