diff --git a/components/public/public-navigation.tsx b/components/public/public-navigation.tsx
index 1290f25..f91417b 100644
--- a/components/public/public-navigation.tsx
+++ b/components/public/public-navigation.tsx
@@ -6,7 +6,6 @@ import { usePathname } from "next/navigation";
import { BookOpenIcon, MenuIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
-import { SiteInstallButton } from "@/components/site-install-button";
import {
Drawer,
DrawerClose,
@@ -35,7 +34,6 @@ export function PublicNavigation() {
{icon ? : null}{label}
)}
-
}>
diff --git a/components/public/rotation-help.tsx b/components/public/rotation-help.tsx
index 6d52af8..f9df22d 100644
--- a/components/public/rotation-help.tsx
+++ b/components/public/rotation-help.tsx
@@ -10,6 +10,7 @@ export function RotationHelp() {
- E / Q
- สกิลธาตุ / ท่าไม้ตาย
- N / C / P
- โจมตีปกติ / ชาร์จโจมตี / โจมตีพุ่งลง
+ - hP / lP
- โจมตีพุ่งลงจากที่สูง (High Plunge) / โจมตีพุ่งลงจากที่ต่ำ (Low Plunge)
- D / J
- แดช / กระโดดเพื่อยกเลิกแอนิเมชั่น
- hE / tE
- กดสกิลธาตุค้าง / แตะสกิลธาตุ
- C0 / R1
- กลุ่มดาวระดับ 0 / อาวุธขัดเกลาระดับ 1
diff --git a/components/public/structured-directory.tsx b/components/public/structured-directory.tsx
index 1e5d109..b9b9e3e 100644
--- a/components/public/structured-directory.tsx
+++ b/components/public/structured-directory.tsx
@@ -6,7 +6,7 @@ import Image from "@/components/ui/resilient-image";
import Link from "next/link";
import { useSearchParams } from "next/navigation";
import { SearchIcon, SlidersHorizontalIcon, StarIcon, UsersIcon, XIcon } from "lucide-react";
-import { useMemo, type ReactNode } from "react";
+import { useEffect, useMemo, type ReactNode } from "react";
import { ElementIcon } from "@/components/public/element-icon";
@@ -84,8 +84,22 @@ const sortOptions = [
{ value: "name-desc", label: "Z - A" },
] as const;
+const SORT_STORAGE_KEY = "buzz-sheet:directory-sort";
+
export function StructuredDirectory({ guides }: { guides: GuideCard[] }) {
const searchParams = useSearchParams();
+ useEffect(() => {
+ if (searchParams.has("sort")) return;
+ try {
+ const savedSort = window.localStorage.getItem(SORT_STORAGE_KEY);
+ if (!savedSort || !sortOptions.some((option) => option.value === savedSort) || savedSort === "manual") return;
+ const next = new URLSearchParams(searchParams.toString());
+ next.set("sort", savedSort);
+ window.history.replaceState(null, "", `?${next.toString()}`);
+ } catch {
+ // Sorting still works when browser storage is unavailable.
+ }
+ }, [searchParams]);
const query = searchParams.get("q") ?? "";
const presence = useVisitorPresence(null);
const elements = useMemo(() => [...new Set(guides.flatMap((guide) => guide.element ? [guide.element] : []))].sort(), [guides]);
@@ -121,8 +135,15 @@ export function StructuredDirectory({ guides }: { guides: GuideCard[] }) {
];
function setParam(name: string, value: string) {
+ if (name === "sort") {
+ try {
+ window.localStorage.setItem(SORT_STORAGE_KEY, value);
+ } catch {
+ // Keep the selection usable when browser storage is unavailable.
+ }
+ }
const next = new URLSearchParams(searchParams.toString());
- if (!value || value === "all" || (name === "sort" && value === "manual")) next.delete(name);
+ if (!value || value === "all") next.delete(name);
else next.set(name, value);
const suffix = next.toString();
window.history.replaceState(null, "", suffix ? `?${suffix}` : window.location.pathname);