aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-24 15:27:15 +0200
committerChocobozzz <me@florianbigard.com>2023-05-24 15:27:15 +0200
commitd0fbc9fd0a29c37f3ff9b99030351e90b276fe7d (patch)
treefa29fcfd704cbc56c7bc3e3e1c15d84ea0f4dc61 /client/src/app/shared/shared-main
parent25ea1d85e155382367d11036617848fe69a1e6a4 (diff)
downloadPeerTube-d0fbc9fd0a29c37f3ff9b99030351e90b276fe7d.tar.gz
PeerTube-d0fbc9fd0a29c37f3ff9b99030351e90b276fe7d.tar.zst
PeerTube-d0fbc9fd0a29c37f3ff9b99030351e90b276fe7d.zip
Fix lint
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/angular/number-formatter.pipe.ts2
-rw-r--r--client/src/app/shared/shared-main/buttons/action-dropdown.component.html2
-rw-r--r--client/src/app/shared/shared-main/buttons/action-dropdown.component.ts2
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.ts2
-rw-r--r--client/src/app/shared/shared-main/date/date-toggle.component.html3
-rw-r--r--client/src/app/shared/shared-main/loaders/loader.component.ts4
-rw-r--r--client/src/app/shared/shared-main/users/user-notifications.component.html1
-rw-r--r--client/src/app/shared/shared-main/users/user-quota.component.html6
8 files changed, 14 insertions, 8 deletions
diff --git a/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts b/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts
index e0cb475fc..00cfbc692 100644
--- a/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts
+++ b/client/src/app/shared/shared-main/angular/number-formatter.pipe.ts
@@ -17,7 +17,7 @@ export class NumberFormatterPipe implements PipeTransform {
17 return +f 17 return +f
18 } 18 }
19 19
20 private dictionary: Array<{ max: number, type: string }> = [ 20 private dictionary: { max: number, type: string }[] = [
21 { max: 1000, type: '' }, 21 { max: 1000, type: '' },
22 { max: 1000000, type: 'K' }, 22 { max: 1000000, type: 'K' },
23 { max: 1000000000, type: 'M' } 23 { max: 1000000000, type: 'M' }
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.html b/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
index bbfab7b37..d4aa9f380 100644
--- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
+++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.html
@@ -40,7 +40,7 @@
40 40
41 <h6 41 <h6
42 *ngIf="!action.linkBuilder && action.isHeader && areActionsDisplayed(actions, entry)" [ngClass]="{ 'with-icon': !!action.iconName }" 42 *ngIf="!action.linkBuilder && action.isHeader && areActionsDisplayed(actions, entry)" [ngClass]="{ 'with-icon': !!action.iconName }"
43 class="dropdown-header" [title]="action.title || ''" (click)="action.handler(entry)" (keyup.enter)="action.handler(entry)" 43 class="dropdown-header" [title]="action.title || ''"
44 > 44 >
45 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container> 45 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container>
46 </h6> 46 </h6>
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
index e39fbd66d..7d24ff4ae 100644
--- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
+++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
@@ -55,7 +55,7 @@ export class ActionDropdownComponent<T> {
55 return {} 55 return {}
56 } 56 }
57 57
58 areActionsDisplayed (actions: Array<DropdownAction<T> | DropdownAction<T>[]>, entry: T): boolean { 58 areActionsDisplayed (actions: (DropdownAction<T> | DropdownAction<T>[])[], entry: T): boolean {
59 return actions.some(a => { 59 return actions.some(a => {
60 if (Array.isArray(a)) return this.areActionsDisplayed(a, entry) 60 if (Array.isArray(a)) return this.areActionsDisplayed(a, entry)
61 61
diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts
index 63a59cbe1..e3a830891 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/button.component.ts
@@ -31,7 +31,7 @@ export class ButtonComponent implements OnInit, OnChanges {
31 private buildClasses () { 31 private buildClasses () {
32 this.classes = { 32 this.classes = {
33 [this.className]: true, 33 [this.className]: true,
34 disabled: this.disabled, 34 'disabled': this.disabled,
35 'icon-only': !this.label, 35 'icon-only': !this.label,
36 'has-icon': !!this.icon, 36 'has-icon': !!this.icon,
37 'responsive-label': this.responsiveLabel 37 'responsive-label': this.responsiveLabel
diff --git a/client/src/app/shared/shared-main/date/date-toggle.component.html b/client/src/app/shared/shared-main/date/date-toggle.component.html
index 14b6e7d7a..5277ae0e8 100644
--- a/client/src/app/shared/shared-main/date/date-toggle.component.html
+++ b/client/src/app/shared/shared-main/date/date-toggle.component.html
@@ -1,7 +1,10 @@
1<span 1<span
2 class="date-toggle" 2 class="date-toggle"
3 [title]="getTitle()" 3 [title]="getTitle()"
4 role="button"
5 tabindex="0"
4 (click)="toggle()" 6 (click)="toggle()"
7 (keyup.enter)="toggle()"
5> 8>
6 {{ getContent() }} 9 {{ getContent() }}
7</span> 10</span>
diff --git a/client/src/app/shared/shared-main/loaders/loader.component.ts b/client/src/app/shared/shared-main/loaders/loader.component.ts
index bd038f8b5..be9e130e7 100644
--- a/client/src/app/shared/shared-main/loaders/loader.component.ts
+++ b/client/src/app/shared/shared-main/loaders/loader.component.ts
@@ -10,8 +10,8 @@ export class LoaderComponent {
10 10
11 private readonly sizes = { 11 private readonly sizes = {
12 sm: { 12 sm: {
13 width: '1rem', 13 'width': '1rem',
14 height: '1rem', 14 'height': '1rem',
15 'border-width': '0.15rem' 15 'border-width': '0.15rem'
16 }, 16 },
17 xl: { 17 xl: {
diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.html b/client/src/app/shared/shared-main/users/user-notifications.component.html
index a51e08292..351e4dc3f 100644
--- a/client/src/app/shared/shared-main/users/user-notifications.component.html
+++ b/client/src/app/shared/shared-main/users/user-notifications.component.html
@@ -1,6 +1,7 @@
1<div *ngIf="componentPagination.totalItems === 0" class="no-notification" i18n>You don't have notifications.</div> 1<div *ngIf="componentPagination.totalItems === 0" class="no-notification" i18n>You don't have notifications.</div>
2 2
3<div class="notifications" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> 3<div class="notifications" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()">
4 <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->
4 <div *ngFor="let notification of notifications" class="notification" [ngClass]="{ unread: !notification.read }" (click)="markAsRead(notification)"> 5 <div *ngFor="let notification of notifications" class="notification" [ngClass]="{ unread: !notification.read }" (click)="markAsRead(notification)">
5 6
6 <ng-container [ngSwitch]="notification.type"> 7 <ng-container [ngSwitch]="notification.type">
diff --git a/client/src/app/shared/shared-main/users/user-quota.component.html b/client/src/app/shared/shared-main/users/user-quota.component.html
index 0e0d38c2a..ac9085bb3 100644
--- a/client/src/app/shared/shared-main/users/user-quota.component.html
+++ b/client/src/app/shared/shared-main/users/user-quota.component.html
@@ -1,6 +1,7 @@
1<div class="user-quota mb-3"> 1<div class="user-quota mb-3">
2 <div> 2 <div>
3 <label class="user-quota-title" tabindex="0" i18n>Total video quota</label> 3 <div class="mb-2 fw-bold" i18n>Total video quota</div>
4
4 <div class="progress" tabindex="0" [ngbTooltip]="titleVideoQuota()"> 5 <div class="progress" tabindex="0" [ngbTooltip]="titleVideoQuota()">
5 <div class="progress-bar" tabindex="0" role="progressbar" [style]="{ width: userVideoQuotaPercentage + '%' }" 6 <div class="progress-bar" tabindex="0" role="progressbar" [style]="{ width: userVideoQuotaPercentage + '%' }"
6 [attr.aria-valuenow]="userVideoQuotaUsed" aria-valuemin="0" [attr.aria-valuemax]="user.videoQuota"></div> 7 [attr.aria-valuenow]="userVideoQuotaUsed" aria-valuemin="0" [attr.aria-valuemax]="user.videoQuota"></div>
@@ -10,7 +11,8 @@
10 </div> 11 </div>
11 12
12 <div *ngIf="hasDailyQuota()" class="mt-3"> 13 <div *ngIf="hasDailyQuota()" class="mt-3">
13 <label class="user-quota-title" tabindex="0" i18n>Daily video quota</label> 14 <div class="mb-2 fw-bold" i18n>Daily video quota</div>
15
14 <div class="progress" tabindex="0" [ngbTooltip]="titleVideoQuotaDaily()"> 16 <div class="progress" tabindex="0" [ngbTooltip]="titleVideoQuotaDaily()">
15 <div class="progress-bar" role="progressbar" [style]="{ width: userVideoQuotaDailyPercentage + '%' }" 17 <div class="progress-bar" role="progressbar" [style]="{ width: userVideoQuotaDailyPercentage + '%' }"
16 [attr.aria-valuenow]="userVideoQuotaUsedDaily" aria-valuemin="0" [attr.aria-valuemax]="user.videoQuotaDaily"></div> 18 [attr.aria-valuenow]="userVideoQuotaUsedDaily" aria-valuemin="0" [attr.aria-valuemax]="user.videoQuotaDaily"></div>