Simple Managment webapp [LLM]

This commit is contained in:
2025-12-03 18:34:13 +01:00
parent c860ef9c30
commit 308d6bbba0
11 changed files with 216 additions and 131 deletions

View File

@@ -168,10 +168,11 @@
<label
nz-checkbox
[nzChecked]="isPermissionChecked(opt.value)"
[nzDisabled]="opt.value !== 'A' && isPermissionChecked('A')"
(nzCheckedChange)="onPermissionChange(opt.value, $event)"
>
<nz-tag [nzColor]="getPermissionColor(opt.value)">{{ opt.value }}</nz-tag>
{{ opt.label }}
<span class="perm-label">{{ opt.label }}</span>
<span class="perm-desc">- {{ opt.description }}</span>
</label>
}

View File

@@ -60,7 +60,17 @@
label {
display: flex;
align-items: center;
gap: 4px;
margin-left: 0;
}
nz-tag {
width: 32px;
text-align: center;
margin-right: 8px;
}
.perm-label {
min-width: 100px;
}
.perm-desc {

View File

@@ -184,7 +184,10 @@ export class KeyListComponent implements OnInit {
onPermissionChange(perm: TokenPermission, checked: boolean): void {
if (checked) {
if (!this.newKeyPermissions.includes(perm)) {
if (perm === 'A') {
// Admin selected - clear other permissions
this.newKeyPermissions = ['A'];
} else if (!this.newKeyPermissions.includes(perm)) {
this.newKeyPermissions = [...this.newKeyPermissions, perm];
}
} else {