Refactor: Remove server state files and update server log handling
- Deleted server-stopped, server.log, and server.pid files to clean up unused state. - Updated game-page-client.tsx to enhance button accessibility with cursor-pointer class. - Modified not-found.tsx, page.tsx, and profile/page.tsx for consistent cursor-pointer usage on links. - Adjusted search/page.tsx and components/auth/*.tsx for improved button interactions with cursor-pointer. - Refined navbar.tsx for better user experience with cursor-pointer on navigation links. - Updated settings-security-tab.tsx for passkey management API endpoints and improved error handling. - Enhanced saved-games components for better user interaction with cursor-pointer on buttons. - General code cleanup and consistency improvements across various components.
This commit is contained in:
@@ -47,7 +47,7 @@ export function SettingsSecurityTab() {
|
||||
let cancelled = false
|
||||
Promise.all([
|
||||
fetch("/api/user/me/auth-methods", { credentials: "include" }).then(r => r.ok ? r.json() : null).catch(() => null),
|
||||
fetch("/api/auth/passkey/list-user-passkeys", { credentials: "include" }).then(r => r.ok ? r.json() : []).catch(() => []),
|
||||
fetch("/api/auth/passkey/list", { credentials: "include" }).then(r => r.ok ? r.json() : []).catch(() => []),
|
||||
]).then(([methodsData, passkeyData]) => {
|
||||
if (cancelled) return
|
||||
if (methodsData) setAuthMethods(methodsData)
|
||||
@@ -65,7 +65,7 @@ export function SettingsSecurityTab() {
|
||||
}
|
||||
|
||||
const refreshPasskeys = async () => {
|
||||
const res = await fetch("/api/auth/passkey/list-user-passkeys", { credentials: "include" })
|
||||
const res = await fetch("/api/auth/passkey/list", { credentials: "include" })
|
||||
if (res.ok) {
|
||||
const data = await res.json()
|
||||
setPasskeys(Array.isArray(data) ? data : [])
|
||||
@@ -146,7 +146,7 @@ export function SettingsSecurityTab() {
|
||||
|
||||
setIsDeletingPasskey(id)
|
||||
try {
|
||||
const res = await fetch("/api/auth/passkey/delete-passkey", {
|
||||
const res = await fetch("/api/user/me/passkey/delete", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ id }),
|
||||
@@ -176,7 +176,7 @@ export function SettingsSecurityTab() {
|
||||
const handleRenamePasskey = async (id: string) => {
|
||||
setIsUpdatingPasskey(true)
|
||||
try {
|
||||
const res = await fetch("/api/auth/passkey/update-passkey", {
|
||||
const res = await fetch("/api/user/me/passkey/update", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ id, name: editingName }),
|
||||
@@ -347,7 +347,7 @@ export function SettingsSecurityTab() {
|
||||
<button
|
||||
onClick={() => handleRenamePasskey(pk.id)}
|
||||
disabled={isUpdatingPasskey}
|
||||
className="p-1 rounded hover:bg-green-500/10 text-green-400 transition-colors"
|
||||
className="p-1 rounded hover:bg-green-500/10 text-green-400 transition-colors cursor-pointer disabled:cursor-not-allowed"
|
||||
>
|
||||
{isUpdatingPasskey ? (
|
||||
<Loader2 className="h-3.5 w-3.5 animate-spin" />
|
||||
@@ -357,7 +357,7 @@ export function SettingsSecurityTab() {
|
||||
</button>
|
||||
<button
|
||||
onClick={cancelEditingPasskey}
|
||||
className="p-1 rounded hover:bg-red-500/10 text-red-400 transition-colors"
|
||||
className="p-1 rounded hover:bg-red-500/10 text-red-400 transition-colors cursor-pointer"
|
||||
>
|
||||
<X className="h-3.5 w-3.5" />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user