fix: improve server stats / rbac

This commit is contained in:
LukeGus
2025-12-21 03:09:55 -06:00
parent bfda81f9c2
commit 28729e3de2
14 changed files with 494 additions and 131 deletions

View File

@@ -285,13 +285,13 @@ export function HostSharingTab({
return (
<div className="space-y-6">
{/* Credential Authentication Warning */}
{hostData?.authType === "Credential" && (
{/* Credential Requirement Warning */}
{!hostData?.credentialId && (
<Alert variant="destructive">
<AlertCircle className="h-4 w-4" />
<AlertTitle>{t("rbac.credentialSharingWarning")}</AlertTitle>
<AlertTitle>{t("rbac.credentialRequired")}</AlertTitle>
<AlertDescription>
{t("rbac.credentialSharingWarningDescription")}
{t("rbac.credentialRequiredDescription")}
</AlertDescription>
</Alert>
)}
@@ -464,7 +464,12 @@ export function HostSharingTab({
/>
</div>
<Button type="button" onClick={handleShare} className="w-full">
<Button
type="button"
onClick={handleShare}
className="w-full"
disabled={!hostData?.credentialId}
>
<Plus className="h-4 w-4 mr-2" />
{t("rbac.share")}
</Button>