diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-12 11:39:58 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | b5f919ac8eb2a1c20e26582fdfd377d687710d8f (patch) | |
tree | 5ec28be6f750f54bba560803ddba681103c2d82e /client/src/app/shared/buttons | |
parent | 8d2be0ed7bb87283a1ec98609df6b82d83db706a (diff) | |
download | PeerTube-b5f919ac8eb2a1c20e26582fdfd377d687710d8f.tar.gz PeerTube-b5f919ac8eb2a1c20e26582fdfd377d687710d8f.tar.zst PeerTube-b5f919ac8eb2a1c20e26582fdfd377d687710d8f.zip |
WIP plugins: update plugin
Diffstat (limited to 'client/src/app/shared/buttons')
-rw-r--r-- | client/src/app/shared/buttons/button.component.html | 4 | ||||
-rw-r--r-- | client/src/app/shared/buttons/button.component.scss | 6 | ||||
-rw-r--r-- | client/src/app/shared/buttons/button.component.ts | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/client/src/app/shared/buttons/button.component.html b/client/src/app/shared/buttons/button.component.html index b6df67102..d2b0eb81a 100644 --- a/client/src/app/shared/buttons/button.component.html +++ b/client/src/app/shared/buttons/button.component.html | |||
@@ -1,4 +1,6 @@ | |||
1 | <span class="action-button" [ngClass]="className" [title]="getTitle()"> | 1 | <span class="action-button" [ngClass]="className" [title]="getTitle()"> |
2 | <my-global-icon [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> | ||
4 | |||
3 | <span class="button-label">{{ label }}</span> | 5 | <span class="button-label">{{ label }}</span> |
4 | </span> | 6 | </span> |
diff --git a/client/src/app/shared/buttons/button.component.scss b/client/src/app/shared/buttons/button.component.scss index 99d7f51c1..4cc2b0573 100644 --- a/client/src/app/shared/buttons/button.component.scss +++ b/client/src/app/shared/buttons/button.component.scss | |||
@@ -1,6 +1,12 @@ | |||
1 | @import '_variables'; | 1 | @import '_variables'; |
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | 3 | ||
4 | my-small-loader /deep/ .root { | ||
5 | display: inline-block; | ||
6 | margin: 0 3px 0 0; | ||
7 | width: 20px; | ||
8 | } | ||
9 | |||
4 | .action-button { | 10 | .action-button { |
5 | @include peertube-button-link; | 11 | @include peertube-button-link; |
6 | @include button-with-icon(21px, 0, -2px); | 12 | @include button-with-icon(21px, 0, -2px); |
diff --git a/client/src/app/shared/buttons/button.component.ts b/client/src/app/shared/buttons/button.component.ts index cf334e8d5..cac5ad210 100644 --- a/client/src/app/shared/buttons/button.component.ts +++ b/client/src/app/shared/buttons/button.component.ts | |||
@@ -12,6 +12,7 @@ export class ButtonComponent { | |||
12 | @Input() className = 'grey-button' | 12 | @Input() className = 'grey-button' |
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 | 16 | ||
16 | getTitle () { | 17 | getTitle () { |
17 | return this.title || this.label | 18 | return this.title || this.label |