aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/users
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-04-13 17:03:01 +0200
committerRigel Kent <sendmemail@rigelk.eu>2020-04-13 18:03:21 +0200
commit2bc9bd08cd121bdffbf56a0241c4decfb77bfdd5 (patch)
tree46ec5dab14adfd7e317fdc1c29d62fed89982f98 /client/src/app/+admin/users
parent92e4ca0d95f61994626233866c57b5b078ef9c5a (diff)
downloadPeerTube-2bc9bd08cd121bdffbf56a0241c4decfb77bfdd5.tar.gz
PeerTube-2bc9bd08cd121bdffbf56a0241c4decfb77bfdd5.tar.zst
PeerTube-2bc9bd08cd121bdffbf56a0241c4decfb77bfdd5.zip
Improving select displays, focus box-shadows for paginators, instructions for index url
Diffstat (limited to 'client/src/app/+admin/users')
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.component.html4
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.ts13
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.html2
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.scss5
4 files changed, 18 insertions, 6 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.html
index 51db100e9..5303d6096 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.component.html
+++ b/client/src/app/+admin/users/user-edit/user-edit.component.html
@@ -139,7 +139,7 @@
139 <label i18n for="videoQuota">Video quota</label> 139 <label i18n for="videoQuota">Video quota</label>
140 <div class="peertube-select-container"> 140 <div class="peertube-select-container">
141 <select id="videoQuota" formControlName="videoQuota" class="form-control"> 141 <select id="videoQuota" formControlName="videoQuota" class="form-control">
142 <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> 142 <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value" [disabled]="videoQuotaOption.disabled">
143 {{ videoQuotaOption.label }} 143 {{ videoQuotaOption.label }}
144 </option> 144 </option>
145 </select> 145 </select>
@@ -155,7 +155,7 @@
155 <label i18n for="videoQuotaDaily">Daily video quota</label> 155 <label i18n for="videoQuotaDaily">Daily video quota</label>
156 <div class="peertube-select-container"> 156 <div class="peertube-select-container">
157 <select id="videoQuotaDaily" formControlName="videoQuotaDaily" class="form-control"> 157 <select id="videoQuotaDaily" formControlName="videoQuotaDaily" class="form-control">
158 <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value"> 158 <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value" [disabled]="videoQuotaDailyOption.disabled">
159 {{ videoQuotaDailyOption.label }} 159 {{ videoQuotaDailyOption.label }}
160 </option> 160 </option>
161 </select> 161 </select>
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts
index a23cd9033..18ca5805f 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.ts
+++ b/client/src/app/+admin/users/user-edit/user-edit.ts
@@ -8,8 +8,8 @@ import { User } from '@app/shared/users/user.model'
8import { ScreenService } from '@app/shared/misc/screen.service' 8import { ScreenService } from '@app/shared/misc/screen.service'
9 9
10export abstract class UserEdit extends FormReactive implements OnInit { 10export abstract class UserEdit extends FormReactive implements OnInit {
11 videoQuotaOptions: { value: string, label: string }[] = [] 11 videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = []
12 videoQuotaDailyOptions: { value: string, label: string }[] = [] 12 videoQuotaDailyOptions: { value: string, label: string, disabled?: boolean }[] = []
13 username: string 13 username: string
14 user: User 14 user: User
15 15
@@ -94,9 +94,14 @@ export abstract class UserEdit extends FormReactive implements OnInit {
94 protected buildQuotaOptions () { 94 protected buildQuotaOptions () {
95 // These are used by a HTML select, so convert key into strings 95 // These are used by a HTML select, so convert key into strings
96 this.videoQuotaOptions = this.configService 96 this.videoQuotaOptions = this.configService
97 .videoQuotaOptions.map(q => ({ value: q.value.toString(), label: q.label })) 97 .videoQuotaOptions.map(q => ({ value: q.value?.toString(), label: q.label, disabled: q.disabled }))
98 98
99 this.videoQuotaDailyOptions = this.configService 99 this.videoQuotaDailyOptions = this.configService
100 .videoQuotaDailyOptions.map(q => ({ value: q.value.toString(), label: q.label })) 100 .videoQuotaDailyOptions.map(q => ({ value: q.value?.toString(), label: q.label, disabled: q.disabled }))
101
102 console.log(
103 this.videoQuotaOptions,
104 this.videoQuotaDailyOptions
105 )
101 } 106 }
102} 107}
diff --git a/client/src/app/+admin/users/user-list/user-list.component.html b/client/src/app/+admin/users/user-list/user-list.component.html
index 249883efc..15bdb6398 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.html
+++ b/client/src/app/+admin/users/user-list/user-list.component.html
@@ -11,6 +11,8 @@
11 [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage" 11 [value]="users" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
12 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" 12 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
13 [(selection)]="selectedUsers" 13 [(selection)]="selectedUsers"
14 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
15 currentPageReportTemplate="Showing {first} to {last} of {totalRecords} users"
14> 16>
15 <ng-template pTemplate="caption"> 17 <ng-template pTemplate="caption">
16 <div class="caption"> 18 <div class="caption">
diff --git a/client/src/app/+admin/users/user-list/user-list.component.scss b/client/src/app/+admin/users/user-list/user-list.component.scss
index 5274be01c..40f08027f 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.scss
+++ b/client/src/app/+admin/users/user-list/user-list.component.scss
@@ -24,3 +24,8 @@ tr.banned {
24 @include peertube-input-text(250px); 24 @include peertube-input-text(250px);
25 } 25 }
26} 26}
27
28p-tableCheckbox {
29 position: relative;
30 top: -2.5px;
31}