Skip to content

Commit ec87abe

Browse files
committed
fix cursor
1 parent 9d22dea commit ec87abe

6 files changed

Lines changed: 43 additions & 8 deletions

File tree

src/components/tailwind/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export const Button = forwardRef(function Button(
195195
) : (
196196
<Headless.Button
197197
{...props}
198-
className={clsx(classes, "cursor-default")}
198+
className={clsx(classes, "cursor-pointer")}
199199
ref={ref}
200200
>
201201
<TouchTarget>{children}</TouchTarget>

src/components/tailwind/combobox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function ComboboxOption<T>({
164164
{...props}
165165
className={clsx(
166166
// Basic layout
167-
"group/option grid w-full cursor-default grid-cols-[1fr_--spacing(5)] items-baseline gap-x-2 rounded-lg py-2.5 pr-2 pl-3.5 sm:grid-cols-[1fr_--spacing(4)] sm:py-1.5 sm:pr-2 sm:pl-3",
167+
"group/option grid w-full cursor-pointer grid-cols-[1fr_--spacing(5)] items-baseline gap-x-2 rounded-lg py-2.5 pr-2 pl-3.5 sm:grid-cols-[1fr_--spacing(4)] sm:py-1.5 sm:pr-2 sm:pl-3",
168168
// Typography
169169
"text-base/6 text-zinc-950 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]",
170170
// Focus

src/components/tailwind/listbox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export function ListboxOption<T>({
127127
>) {
128128
let sharedClasses = clsx(
129129
// Base
130-
"flex min-w-0 items-center",
130+
"cursor-pointer flex min-w-0 items-center",
131131
// Icons
132132
"*:data-[slot=icon]:size-5 *:data-[slot=icon]:shrink-0 sm:*:data-[slot=icon]:size-4",
133133
"*:data-[slot=icon]:text-zinc-500 group-data-focus/option:*:data-[slot=icon]:text-white dark:*:data-[slot=icon]:text-zinc-400",
@@ -149,7 +149,7 @@ export function ListboxOption<T>({
149149
<div
150150
className={clsx(
151151
// Basic layout
152-
"group/option grid cursor-default grid-cols-[--spacing(5)_1fr] items-baseline gap-x-2 rounded-lg py-2.5 pr-3.5 pl-2 sm:grid-cols-[--spacing(4)_1fr] sm:py-1.5 sm:pr-3 sm:pl-1.5",
152+
"group/option grid cursor-pointer grid-cols-[--spacing(5)_1fr] items-baseline gap-x-2 rounded-lg py-2.5 pr-3.5 pl-2 sm:grid-cols-[--spacing(4)_1fr] sm:py-1.5 sm:pr-3 sm:pl-1.5",
153153
// Typography
154154
"text-base/6 text-zinc-950 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]",
155155
// Focus

src/components/tailwind/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const NavbarItem = forwardRef(function NavbarItem(
112112
) : (
113113
<Headless.Button
114114
{...props}
115-
className={clsx("cursor-default", classes)}
115+
className={clsx("cursor-pointer", classes)}
116116
data-current={current ? "true" : undefined}
117117
ref={ref}
118118
>

src/components/tailwind/switch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export function Switch({
154154
className={clsx(
155155
className,
156156
// Base styles
157-
"group relative isolate inline-flex h-6 w-10 cursor-default rounded-full p-[3px] sm:h-5 sm:w-8",
157+
"group relative isolate inline-flex h-6 w-10 cursor-pointer rounded-full p-[3px] sm:h-5 sm:w-8",
158158
// Transitions
159159
"transition duration-0 ease-in-out data-changing:duration-200",
160160
// Outline and background color in forced-colors mode so switch is still visible

src/pages/Administration.tsx

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export default function Administration() {
6363
const connected = !!serverUrl && !!info && !statusLoading && !statusError;
6464
const [reindexing, setReindexing] = useState(false);
6565
const [reindexError, setReindexError] = useState<string | null>(null);
66+
const [restarting, setRestarting] = useState(false);
67+
const [restartError, setRestartError] = useState<string | null>(null);
6668

6769
// State: show deleted users toggle
6870
const [showDeleted, setShowDeleted] = useState(false);
@@ -166,9 +168,42 @@ export default function Administration() {
166168
>
167169
{reindexing ? "Reindexing…" : "Reindex Games"}
168170
</Button>
169-
{reindexError && (
171+
<Button
172+
color="red"
173+
disabled={restarting}
174+
onClick={async () => {
175+
if (restarting) return;
176+
try {
177+
setRestartError(null);
178+
setRestarting(true);
179+
const base = serverUrl.replace(/\/+$/, "");
180+
181+
const res = await authFetch(
182+
`${base}/api/admin/web-ui/restart`,
183+
{
184+
method: "POST",
185+
},
186+
);
187+
if (!res.ok) {
188+
const txt = await res.text();
189+
throw new Error(txt || `Restart failed (${res.status})`);
190+
} else {
191+
window.location.reload();
192+
}
193+
} catch (e: any) {
194+
setRestartError(e.message || String(e));
195+
} finally {
196+
setRestarting(false);
197+
}
198+
}}
199+
title="Restart Web UI"
200+
className="items-center"
201+
>
202+
{restarting ? "Restarting..." : "Restart Web UI"}
203+
</Button>
204+
{restartError && (
170205
<div className="col-span-full text-xs text-red-500 bg-red-500/10 rounded-md px-3 py-2">
171-
{reindexError}
206+
{restartError}
172207
</div>
173208
)}
174209
</Card>

0 commit comments

Comments
 (0)