aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-13 10:14:03 +0200
committerChocobozzz <me@florianbigard.com>2022-06-13 11:23:36 +0200
commit93c728a25a87cf6dae5fc49d42d6af52ff7f7ff2 (patch)
treed9c658b4ac3467109a7f58b141d64a190f30cbaf /client/src/app/shared/shared-forms
parentc2faa073d113f410275021ed4de4b60fef118c13 (diff)
downloadPeerTube-93c728a25a87cf6dae5fc49d42d6af52ff7f7ff2.tar.gz
PeerTube-93c728a25a87cf6dae5fc49d42d6af52ff7f7ff2.tar.zst
PeerTube-93c728a25a87cf6dae5fc49d42d6af52ff7f7ff2.zip
Replace all glyphicon icons
Diffstat (limited to 'client/src/app/shared/shared-forms')
-rw-r--r--client/src/app/shared/shared-forms/advanced-input-filter.component.html2
-rw-r--r--client/src/app/shared/shared-forms/input-text.component.html5
-rw-r--r--client/src/app/shared/shared-forms/input-text.component.scss4
-rw-r--r--client/src/app/shared/shared-forms/input-text.component.ts7
4 files changed, 12 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-forms/advanced-input-filter.component.html b/client/src/app/shared/shared-forms/advanced-input-filter.component.html
index 1d6b3df7e..e4f318385 100644
--- a/client/src/app/shared/shared-forms/advanced-input-filter.component.html
+++ b/client/src/app/shared/shared-forms/advanced-input-filter.component.html
@@ -25,5 +25,5 @@
25 (keyup)="onInputSearch($event)" 25 (keyup)="onInputSearch($event)"
26 > 26 >
27 27
28 <a class="glyphicon glyphicon-remove-sign form-control-clear" title="Clear filter" i18n-title (click)="onResetTableFilter()"></a> 28 <my-global-icon iconName="cross" role="button" class="form-control-clear" title="Clear filter" i18n-title (click)="onResetTableFilter()"></my-global-icon>
29</div> 29</div>
diff --git a/client/src/app/shared/shared-forms/input-text.component.html b/client/src/app/shared/shared-forms/input-text.component.html
index f7f9ce403..669b5f32e 100644
--- a/client/src/app/shared/shared-forms/input-text.component.html
+++ b/client/src/app/shared/shared-forms/input-text.component.html
@@ -5,8 +5,9 @@
5 #input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control" 5 #input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control"
6 /> 6 />
7 7
8 <button *ngIf="withToggle" (click)="toggle()" type="button" class="btn btn-outline-secondary eye-button" [title]="toggleTitle"> 8 <button *ngIf="withToggle" (click)="toggle()" type="button" class="btn btn-outline-secondary" [title]="toggleTitle">
9 <span class="glyphicon glyphicon-eye-{{ show ? 'open' : 'close' }}"></span> 9 <my-global-icon *ngIf="show" iconName="sensitive"></my-global-icon>
10 <my-global-icon *ngIf="!show" iconName="unsensitive"></my-global-icon>
10 </button> 11 </button>
11 12
12 <button 13 <button
diff --git a/client/src/app/shared/shared-forms/input-text.component.scss b/client/src/app/shared/shared-forms/input-text.component.scss
index cc1646a69..253793196 100644
--- a/client/src/app/shared/shared-forms/input-text.component.scss
+++ b/client/src/app/shared/shared-forms/input-text.component.scss
@@ -9,10 +9,8 @@ input {
9 9
10.btn { 10.btn {
11 font-size: 15px; 11 font-size: 15px;
12}
13 12
14my-global-icon { 13 @include button-with-icon(18px);
15 width: 18px;
16} 14}
17 15
18.copy-text { 16.copy-text {
diff --git a/client/src/app/shared/shared-forms/input-text.component.ts b/client/src/app/shared/shared-forms/input-text.component.ts
index ed4637c17..d9722e6c6 100644
--- a/client/src/app/shared/shared-forms/input-text.component.ts
+++ b/client/src/app/shared/shared-forms/input-text.component.ts
@@ -1,6 +1,7 @@
1import { Component, forwardRef, Input } from '@angular/core' 1import { Component, forwardRef, Input } from '@angular/core'
2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' 2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
3import { Notifier } from '@app/core' 3import { Notifier } from '@app/core'
4import { GlobalIconName } from '../shared-icons'
4 5
5@Component({ 6@Component({
6 selector: 'my-input-text', 7 selector: 'my-input-text',
@@ -47,6 +48,12 @@ export class InputTextComponent implements ControlValueAccessor {
47 this.notifier.success($localize`Copied`) 48 this.notifier.success($localize`Copied`)
48 } 49 }
49 50
51 getEyeIcon (): GlobalIconName {
52 if (this.show) return 'sensitive'
53
54 return 'unsensitive'
55 }
56
50 propagateChange = (_: any) => { /* empty */ } 57 propagateChange = (_: any) => { /* empty */ }
51 58
52 writeValue (value: string) { 59 writeValue (value: string) {