aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-20 12:14:57 +0100
committerChocobozzz <me@florianbigard.com>2023-02-20 12:14:57 +0100
commita6f214d462c19b061bbbbb08acc1411bf3bf2445 (patch)
tree0f6451667818ffe340924f4f24c338e0f55a159d /client/src
parent3ebb2987c2b6338e6f9d49a2723731f2fc77b924 (diff)
downloadPeerTube-a6f214d462c19b061bbbbb08acc1411bf3bf2445.tar.gz
PeerTube-a6f214d462c19b061bbbbb08acc1411bf3bf2445.tar.zst
PeerTube-a6f214d462c19b061bbbbb08acc1411bf3bf2445.zip
Fix reset zoom button
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.html4
-rw-r--r--client/src/app/shared/shared-main/buttons/button.component.ts12
2 files changed, 12 insertions, 4 deletions
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 bf0fb3916..20c982744 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.html
+++ b/client/src/app/shared/shared-main/buttons/button.component.html
@@ -1,6 +1,6 @@
1<div *ngIf="!routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" tabindex="0"> 1<button *ngIf="!routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title">
2 <ng-container *ngTemplateOutlet="content"></ng-container> 2 <ng-container *ngTemplateOutlet="content"></ng-container>
3</div> 3</button>
4 4
5<a *ngIf="routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" [routerLink]="routerLink"> 5<a *ngIf="routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" [routerLink]="routerLink">
6 <ng-container *ngTemplateOutlet="content"></ng-container> 6 <ng-container *ngTemplateOutlet="content"></ng-container>
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 1761938ee..63a59cbe1 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/button.component.ts
@@ -1,4 +1,4 @@
1import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core' 1import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit } from '@angular/core'
2import { GlobalIconName } from '@app/shared/shared-icons' 2import { GlobalIconName } from '@app/shared/shared-icons'
3 3
4@Component({ 4@Component({
@@ -8,7 +8,7 @@ import { GlobalIconName } from '@app/shared/shared-icons'
8 changeDetection: ChangeDetectionStrategy.OnPush 8 changeDetection: ChangeDetectionStrategy.OnPush
9}) 9})
10 10
11export class ButtonComponent implements OnChanges { 11export class ButtonComponent implements OnInit, OnChanges {
12 @Input() label = '' 12 @Input() label = ''
13 @Input() className = 'grey-button' 13 @Input() className = 'grey-button'
14 @Input() icon: GlobalIconName = undefined 14 @Input() icon: GlobalIconName = undefined
@@ -20,7 +20,15 @@ export class ButtonComponent implements OnChanges {
20 20
21 classes: { [id: string]: boolean } = {} 21 classes: { [id: string]: boolean } = {}
22 22
23 ngOnInit () {
24 this.buildClasses()
25 }
26
23 ngOnChanges () { 27 ngOnChanges () {
28 this.buildClasses()
29 }
30
31 private buildClasses () {
24 this.classes = { 32 this.classes = {
25 [this.className]: true, 33 [this.className]: true,
26 disabled: this.disabled, 34 disabled: this.disabled,