Disabled add button for mods in level list #264

This commit is contained in:
Sven Heidemann 2023-03-27 19:33:22 +02:00
parent 75ad07477a
commit 3bca3f86eb
6 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "kdb-web", "name": "kdb-web",
"version": "1.0.0", "version": "1.1.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"update-version": "ts-node-esm update-version.ts", "update-version": "ts-node-esm update-version.ts",

View File

@ -160,7 +160,7 @@
<td> <td>
<div class="btn-wrapper"> <div class="btn-wrapper">
<app-history-btn [history]="autoRoleRule.history" translationKey="view.server.auto_roles.rules.header"></app-history-btn> <app-history-btn *ngIf="!isEditingNew" [history] ="autoRoleRule.history" translationKey="view.server.auto_roles.rules.header"></app-history-btn>
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil" (click)="onRowEditInit(dt, autoRoleRule, ri)"></button> <button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil" (click)="onRowEditInit(dt, autoRoleRule, ri)"></button>
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash" <button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"
(click)="deleteAutoRoleRule(autoRoleRule)"></button> (click)="deleteAutoRoleRule(autoRoleRule)"></button>

View File

@ -193,7 +193,7 @@
<div class="btn-wrapper"> <div class="btn-wrapper">
<!-- <button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"--> <!-- <button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"-->
<!-- (click)="onRowEditInit(dt, autoRole, ri)"></button>--> <!-- (click)="onRowEditInit(dt, autoRole, ri)"></button>-->
<app-history-btn [history]="autoRole.history" translationKey="view.server.auto_roles.header"></app-history-btn> <app-history-btn *ngIf="!isEditingNew" [history] ="autoRole.history" translationKey="view.server.auto_roles.header"></app-history-btn>
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-sliders-h" [routerLink]="[autoRole.id, 'rules']"></button> <button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-sliders-h" [routerLink]="[autoRole.id, 'rules']"></button>
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash" <button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"
(click)="deleteAutoRole(autoRole)"></button> (click)="deleteAutoRole(autoRole)"></button>

View File

@ -18,7 +18,7 @@
<div class="table-caption-btn-wrapper btn-wrapper"> <div class="table-caption-btn-wrapper btn-wrapper">
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn" <button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
icon="pi pi-user-plus" (click)="addLevel(dt)" [disabled]="isEditingNew"> icon="pi pi-user-plus" (click)="addLevel(dt)" [disabled]="isEditingNew || user?.isModerator && !user?.isAdmin">
</button> </button>
<button pButton label="{{'common.reset_filters' | translate}}" icon="pi pi-undo" <button pButton label="{{'common.reset_filters' | translate}}" icon="pi pi-undo"
class="icon-btn btn" (click)="resetFilters()"> class="icon-btn btn" (click)="resetFilters()">
@ -184,7 +184,7 @@
</td> </td>
<td> <td>
<div class="btn-wrapper"> <div class="btn-wrapper">
<app-history-btn [history]="level.history" translationKey="view.server.levels.header"></app-history-btn> <app-history-btn *ngIf="!isEditingNew" [history] ="level.history" translationKey="view.server.levels.header"></app-history-btn>
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil" <button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
(click)="onRowEditInit(dt, level, ri)" [disabled]="!user || user.isModerator && !user.isAdmin"></button> (click)="onRowEditInit(dt, level, ri)" [disabled]="!user || user.isModerator && !user.isAdmin"></button>
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash" <button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"

View File

@ -224,7 +224,7 @@
</td> </td>
<td> <td>
<div class="btn-wrapper"> <div class="btn-wrapper">
<app-history-btn [history]="member.history" translationKey="view.server.members.header"></app-history-btn> <app-history-btn *ngIf="!isEditingNew" [history] ="member.history" translationKey="view.server.members.header"></app-history-btn>
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil" <button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
(click)="onRowEditInit(dt, member, ri)"></button> (click)="onRowEditInit(dt, member, ri)"></button>
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-user" <button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-user"

View File

@ -4,7 +4,7 @@
"ImprintURL": "https://www.sh-edraft.de/Impressum", "ImprintURL": "https://www.sh-edraft.de/Impressum",
"WebVersion": { "WebVersion": {
"Major": "1", "Major": "1",
"Minor": "0", "Minor": "1",
"Micro": "0" "Micro": "0"
}, },
"Themes": [ "Themes": [