aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.component.html6
-rw-r--r--client/src/app/+admin/users/user-edit/user-edit.component.scss4
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss2
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-settings.component.html2
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-settings.component.scss4
-rw-r--r--client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html6
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html11
-rw-r--r--client/src/app/+videos/+video-edit/video-update.component.html8
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.html2
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.scss4
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.ts8
-rw-r--r--client/src/sass/include/_mixins.scss28
12 files changed, 59 insertions, 26 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 0454df7b7..417bbf618 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
@@ -37,13 +37,13 @@
37 </a> 37 </a>
38 </div> 38 </div>
39 <div> 39 <div>
40 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:' + user?.account.displayName }"> 40 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:&quot;' + user?.account.displayName + '&quot;' }">
41 <div class="dashboard-num">{{ user.videoAbusesCount }}</div> 41 <div class="dashboard-num">{{ user.videoAbusesCount }}</div>
42 <div class="dashboard-label" i18n>Incriminated in reports</div> 42 <div class="dashboard-label" i18n>Incriminated in reports</div>
43 </a> 43 </a>
44 </div> 44 </div>
45 <div> 45 <div>
46 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reporter:' + user?.account.displayName + ' state:accepted' }"> 46 <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reporter:&quot;' + user?.account.displayName + '&quot; state:accepted' }">
47 <div class="dashboard-num">{{ user.videoAbusesAcceptedCount }} / {{ user.videoAbusesCreatedCount }}</div> 47 <div class="dashboard-num">{{ user.videoAbusesAcceptedCount }} / {{ user.videoAbusesCreatedCount }}</div>
48 <div class="dashboard-label" i18n>Authored reports accepted</div> 48 <div class="dashboard-label" i18n>Authored reports accepted</div>
49 </a> 49 </a>
@@ -183,7 +183,7 @@
183<div *ngIf="!isCreation() && user" class="form-row mt-4"> <!-- danger zone grid --> 183<div *ngIf="!isCreation() && user" class="form-row mt-4"> <!-- danger zone grid -->
184 <div class="form-group col-12 col-lg-4 col-xl-3"> 184 <div class="form-group col-12 col-lg-4 col-xl-3">
185 <div class="anchor" id="danger"></div> <!-- danger zone anchor --> 185 <div class="anchor" id="danger"></div> <!-- danger zone anchor -->
186 <div i18n class="account-title">DANGER ZONE</div> 186 <div i18n class="account-title account-title-danger">DANGER ZONE</div>
187 </div> 187 </div>
188 188
189 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9" [ngClass]="{ 'form-row': isInBigView() }"> 189 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9" [ngClass]="{ 'form-row': isInBigView() }">
diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.scss b/client/src/app/+admin/users/user-edit/user-edit.component.scss
index d4c1b600e..a41f1f71c 100644
--- a/client/src/app/+admin/users/user-edit/user-edit.component.scss
+++ b/client/src/app/+admin/users/user-edit/user-edit.component.scss
@@ -8,6 +8,10 @@ label {
8 8
9.account-title { 9.account-title {
10 @include settings-big-title; 10 @include settings-big-title;
11
12 &.account-title-danger {
13 color: lighten($color: #c54130, $amount: 10);
14 }
11} 15}
12 16
13input:not([type=submit]) { 17input:not([type=submit]) {
diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss
index 7f7806732..fe78a57a4 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss
+++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss
@@ -6,7 +6,7 @@
6 6
7 button { 7 button {
8 @include peertube-button; 8 @include peertube-button;
9 @include grey-button; 9 @include danger-button;
10 @include disable-outline; 10 @include disable-outline;
11 } 11 }
12} \ No newline at end of file 12} \ No newline at end of file
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html
index 185f13275..eb7bb0d6f 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.html
+++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html
@@ -88,7 +88,7 @@
88 88
89<div class="form-row mt-5"> <!-- danger zone grid --> 89<div class="form-row mt-5"> <!-- danger zone grid -->
90 <div class="form-group col-12 col-lg-4 col-xl-3"> 90 <div class="form-group col-12 col-lg-4 col-xl-3">
91 <h2 i18n class="account-title">DANGER ZONE</h2> 91 <h2 i18n class="account-title account-title-danger">DANGER ZONE</h2>
92 </div> 92 </div>
93 93
94 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> 94 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss b/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss
index 3e1792e3e..1cdb1fab4 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss
+++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss
@@ -12,6 +12,10 @@
12 12
13.account-title { 13.account-title {
14 @include settings-big-title; 14 @include settings-big-title;
15
16 &.account-title-danger {
17 color: lighten($color: #c54130, $amount: 10);
18 }
15} 19}
16 20
17.progress { 21.progress {
diff --git a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html
index c029aabba..3e07550c1 100644
--- a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html
+++ b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html
@@ -1,7 +1,9 @@
1<h1 class="sr-only" i18n>Imports</h1> 1<h1 class="sr-only" i18n>Imports</h1>
2<p-table 2<p-table
3 [value]="videoImports" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" 3 [value]="videoImports" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
4 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" 4 [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
5 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
6 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} imports"
5 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows" 7 (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
6> 8>
7 <ng-template pTemplate="header"> 9 <ng-template pTemplate="header">
@@ -11,7 +13,7 @@
11 <th style="width: 55%" i18n>Video</th> 13 <th style="width: 55%" i18n>Video</th>
12 <th style="width: 150px" i18n>State</th> 14 <th style="width: 150px" i18n>State</th>
13 <th style="width: 150px" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th> 15 <th style="width: 150px" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
14 <th style="width: 60px"></th> 16 <th style="width: 70px"></th>
15 </tr> 17 </tr>
16 </ng-template> 18 </ng-template>
17 19
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
index 2c40892ee..8af1687e6 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.html
@@ -79,12 +79,9 @@
79 <div class="submit-container"> 79 <div class="submit-container">
80 <div i18n *ngIf="videoUploaded === false" class="message-submit">Publish will be available when upload is finished</div> 80 <div i18n *ngIf="videoUploaded === false" class="message-submit">Publish will be available when upload is finished</div>
81 81
82 <div class="submit-button" 82 <my-button className="orange-button" i18n-label label="Publish" icon="circle-tick"
83 (click)="updateSecondStep()" 83 (click)="updateSecondStep()" (keydown.enter)="updateSecondStep()"
84 [ngClass]="{ disabled: isPublishingButtonDisabled() }" 84 [disabled]="isPublishingButtonDisabled()"
85 > 85 ></my-button>
86 <my-global-icon iconName="circle-tick" aria-hidden="true"></my-global-icon>
87 <input [disabled]="isPublishingButtonDisabled()" type="button" i18n-value value="Publish" />
88 </div>
89 </div> 86 </div>
90</form> 87</form>
diff --git a/client/src/app/+videos/+video-edit/video-update.component.html b/client/src/app/+videos/+video-edit/video-update.component.html
index 1517d4991..6c1239395 100644
--- a/client/src/app/+videos/+video-edit/video-update.component.html
+++ b/client/src/app/+videos/+video-edit/video-update.component.html
@@ -13,10 +13,10 @@
13 ></my-video-edit> 13 ></my-video-edit>
14 14
15 <div class="submit-container"> 15 <div class="submit-container">
16 <div class="submit-button" (click)="update()" [ngClass]="{ disabled: !form.valid || isUpdatingVideo === true }"> 16 <my-button className="orange-button" i18n-label label="Update" icon="circle-tick"
17 <my-global-icon iconName="circle-tick" aria-hidden="true"></my-global-icon> 17 (click)="update()" (keydown.enter)="update()"
18 <input type="button" i18n-value value="Update" /> 18 [disabled]="!form.valid || isUpdatingVideo === true"
19 </div> 19 ></my-button>
20 </div> 20 </div>
21 </form> 21 </form>
22</div> 22</div>
diff --git a/client/src/app/shared/shared-main/buttons/button.component.html b/client/src/app/shared/shared-main/buttons/button.component.html
index d2b0eb81a..43e2ca614 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.html
+++ b/client/src/app/shared/shared-main/buttons/button.component.html
@@ -1,4 +1,4 @@
1<span class="action-button" [ngClass]="className" [title]="getTitle()"> 1<span class="action-button" [ngClass]="getClasses()" [title]="getTitle()">
2 <my-global-icon *ngIf="!loading" [iconName]="icon"></my-global-icon> 2 <my-global-icon *ngIf="!loading" [iconName]="icon"></my-global-icon>
3 <my-small-loader [loading]="loading"></my-small-loader> 3 <my-small-loader [loading]="loading"></my-small-loader>
4 4
diff --git a/client/src/app/shared/shared-main/buttons/button.component.scss b/client/src/app/shared/shared-main/buttons/button.component.scss
index 5b27af3f4..f37decdef 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.scss
+++ b/client/src/app/shared/shared-main/buttons/button.component.scss
@@ -9,9 +9,9 @@ my-small-loader ::ng-deep .root {
9 9
10.action-button { 10.action-button {
11 @include peertube-button-link; 11 @include peertube-button-link;
12 @include button-with-icon(21px, 0, -2px); 12 @include button-with-icon(21px, 0, -1px);
13 13
14 > :nth-child(2) { 14 > span:nth-child(2) {
15 margin-left: 5px; 15 margin-left: 5px;
16 } 16 }
17} 17}
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 e23b90945..1d2be0bf9 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/button.component.ts
@@ -13,8 +13,16 @@ export class ButtonComponent {
13 @Input() icon: GlobalIconName = undefined 13 @Input() icon: GlobalIconName = undefined
14 @Input() title: string = undefined 14 @Input() title: string = undefined
15 @Input() loading = false 15 @Input() loading = false
16 @Input() disabled = false
16 17
17 getTitle () { 18 getTitle () {
18 return this.title || this.label 19 return this.title || this.label
19 } 20 }
21
22 getClasses () {
23 return {
24 [this.className]: true,
25 disabled: this.disabled
26 }
27 }
20} 28}
diff --git a/client/src/sass/include/_mixins.scss b/client/src/sass/include/_mixins.scss
index ab9f982a2..003936bc3 100644
--- a/client/src/sass/include/_mixins.scss
+++ b/client/src/sass/include/_mixins.scss
@@ -175,11 +175,8 @@
175 175
176@mixin grey-button { 176@mixin grey-button {
177 @include button-focus($grey-button-outline-color); 177 @include button-focus($grey-button-outline-color);
178 178 background-color: $grey-background-color;
179 &, &:active, &:focus { 179 color: pvar(--greyForegroundColor);
180 background-color: $grey-background-color;
181 color: pvar(--greyForegroundColor);
182 }
183 180
184 &:hover, &:active, &:focus, &[disabled], &.disabled { 181 &:hover, &:active, &:focus, &[disabled], &.disabled {
185 color: pvar(--greyForegroundColor); 182 color: pvar(--greyForegroundColor);
@@ -195,6 +192,27 @@
195 } 192 }
196} 193}
197 194
195@mixin danger-button {
196 $color: lighten($color: #c54130, $amount: 10);
197 $text: #fff6f5;
198
199 @include button-focus(scale-color($color, $alpha: -95%));
200 background-color: $color;
201 color: $text;
202
203 &:hover, &:active, &:focus, &[disabled], &.disabled {
204 background-color: lighten($color: $color, $amount: 10);
205 }
206
207 &[disabled], &.disabled {
208 cursor: default;
209 }
210
211 my-global-icon {
212 @include apply-svg-color($text)
213 }
214}
215
198@mixin peertube-button { 216@mixin peertube-button {
199 border: none; 217 border: none;
200 font-weight: $font-semibold; 218 font-weight: $font-semibold;