mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-21 19:25:56 +00:00
Tester suggestions: account management, install size and download volume, password show button, addon explanation
- Players page: list of the server's accounts with password change, access level (player/moderator/GM/administrator) and rename (a rename also sets a new password because the login verifier depends on the name; refused while logged in). Companion and console accounts are never listed. - Install screen: size of the server from the signed package list (unpacked, download, peak) and the drive check uses it. - Install progress shows downloaded / total volume and speed. - Own show/hide button on password fields (the browser's one disappeared after leaving the field). - Settings: one sentence on what the companion addon does. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2c0bb2bac3
commit
a4c1080575
17 files changed
+692
-14
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import * as React from "react";
|
||||
import { Eye, EyeOff } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useT } from "@/i18n";
|
||||
|
||||
/**
|
||||
* A password field with its own show/hide button. The browser's built-in one only exists while the field is focused and
|
||||
* comes back only after the field is emptied, so people could not look at a password they had already typed.
|
||||
*/
|
||||
export const PasswordInput = React.forwardRef<HTMLInputElement, Omit<React.InputHTMLAttributes<HTMLInputElement>, "type">>(
|
||||
({ className, ...props }, ref) => {
|
||||
const t = useT();
|
||||
const [shown, setShown] = React.useState(false);
|
||||
return (
|
||||
<div className="relative inline-block">
|
||||
<input ref={ref} type={shown ? "text" : "password"} className={cn(className, "pr-11 [&::-ms-reveal]:hidden")} {...props} />
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShown((v) => !v)}
|
||||
aria-label={shown ? t("pw.hide") : t("pw.show")}
|
||||
aria-pressed={shown}
|
||||
title={shown ? t("pw.hide") : t("pw.show")}
|
||||
className="absolute inset-y-0 right-0 flex w-10 cursor-pointer items-center justify-center text-muted hover:text-ink"
|
||||
>
|
||||
{shown ? <EyeOff className="h-4 w-4" aria-hidden /> : <Eye className="h-4 w-4" aria-hidden />}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
);
|
||||
PasswordInput.displayName = "PasswordInput";
|
||||
Reference in new issue
Block a user