chore: lint & permissions fix

This commit is contained in:
Dreamgineer
2026-02-03 20:48:32 +07:00 Unverified
parent d193f3e2e1
commit d08776a4f4
64 changed files with 34 additions and 20 deletions
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
+4 -1
View File
@@ -1,6 +1,9 @@
"use client"; "use client";
export function genId({ name }: { name: string; id: string }) { export function genId({ name }: { name: string; id: string }) {
const generated = name.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, ""); const generated = name
.toLowerCase()
.replace(/[^a-z0-9]+/g, "_")
.replace(/^_|_$/g, "");
return { id: generated }; return { id: generated };
} }
View File
View File
View File
+8 -3
View File
@@ -1,14 +1,19 @@
"use client"; "use client";
export function genId({ name, prefix }: { name: string; prefix: string }) { export function genId({ name, prefix }: { name: string; prefix: string }) {
console.log(name, prefix) console.log(name, prefix);
const generated = name.toLowerCase().replace(/[^a-z0-9]+/g, "") + (name.length ? rot13(prefix) : ""); const generated =
name.toLowerCase().replace(/[^a-z0-9]+/g, "") +
(name.length ? rot13(prefix) : "");
return { id: generated }; return { id: generated };
} }
function rot13(str: string) { function rot13(str: string) {
const shift = 13; const shift = 13;
let res = ""; let res = "";
for (const c of str) res += String.fromCharCode(((c.toLowerCase().charCodeAt(0) - 97 + shift) % 26) + 97) for (const c of str)
res += String.fromCharCode(
((c.toLowerCase().charCodeAt(0) - 97 + shift) % 26) + 97,
);
return res; return res;
} }
View File
View File
+4 -1
View File
@@ -1,6 +1,9 @@
"use client"; "use client";
export function genId({ name }: { name: string; id: string }) { export function genId({ name }: { name: string; id: string }) {
const generated = name.toLowerCase().slice(0, 3).replace(/[^a-z0-9]+/g, ""); const generated = name
.toLowerCase()
.slice(0, 3)
.replace(/[^a-z0-9]+/g, "");
return { id: generated }; return { id: generated };
} }
View File
Regular → Executable
View File
Regular → Executable
View File
+1 -3
View File
@@ -158,9 +158,7 @@ export function CharacterChooser({
</Button> </Button>
</AlertDialogTrigger> </AlertDialogTrigger>
<AlertDialogContent> <AlertDialogContent>
<AlertDialogTitle> <AlertDialogTitle>วิธีแก้ไขตัวละครไม่ขึ้น</AlertDialogTitle>
วิธีแก้ไขตัวละครไม่ขึ้น
</AlertDialogTitle>
<div className="gap-1 flex flex-col"> <div className="gap-1 flex flex-col">
<center> <center>
ในเกม เปิด<b>เมนูเกม</b>แล้วไปที่ <b>แก้ไขข้อมูลส่วนตัว</b> ในเกม เปิด<b>เมนูเกม</b>แล้วไปที่ <b>แก้ไขข้อมูลส่วนตัว</b>
Regular → Executable
View File
Regular → Executable
View File
View File
Regular → Executable
View File
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Regular → Executable
View File
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
+6 -1
View File
@@ -436,5 +436,10 @@ export function FormAction({
} }
export function FormRow({ className, ...props }: React.ComponentProps<"div">) { export function FormRow({ className, ...props }: React.ComponentProps<"div">) {
return <div className={cn("flex gap-2 flex-wrap items-end", className)} {...props} />; return (
<div
className={cn("flex gap-2 flex-wrap items-end", className)}
{...props}
/>
);
} }
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+8 -8
View File
@@ -1,9 +1,9 @@
"use client"; "use client"
import type * as React from "react"; import * as React from "react"
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"; import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils"
function ScrollArea({ function ScrollArea({
className, className,
@@ -25,7 +25,7 @@ function ScrollArea({
<ScrollBar /> <ScrollBar />
<ScrollAreaPrimitive.Corner /> <ScrollAreaPrimitive.Corner />
</ScrollAreaPrimitive.Root> </ScrollAreaPrimitive.Root>
); )
} }
function ScrollBar({ function ScrollBar({
@@ -43,7 +43,7 @@ function ScrollBar({
"h-full w-2.5 border-l border-l-transparent", "h-full w-2.5 border-l border-l-transparent",
orientation === "horizontal" && orientation === "horizontal" &&
"h-2.5 flex-col border-t border-t-transparent", "h-2.5 flex-col border-t border-t-transparent",
className, className
)} )}
{...props} {...props}
> >
@@ -52,7 +52,7 @@ function ScrollBar({
className="bg-border relative flex-1 rounded-full" className="bg-border relative flex-1 rounded-full"
/> />
</ScrollAreaPrimitive.ScrollAreaScrollbar> </ScrollAreaPrimitive.ScrollAreaScrollbar>
); )
} }
export { ScrollArea, ScrollBar }; export { ScrollArea, ScrollBar }
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Generated Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+1 -1
View File
@@ -306,7 +306,7 @@ export async function actionLog(text: string, details?: unknown) {
try { try {
revalidatePath("/admin/log"); revalidatePath("/admin/log");
} catch { } } catch {}
if (res) ps.publish(res, { topic: "log" }); if (res) ps.publish(res, { topic: "log" });
} }
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Regular → Executable
View File
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 622 KiB

After

Width:  |  Height:  |  Size: 622 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 938 KiB

After

Width:  |  Height:  |  Size: 938 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File