aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/modal/custom-modal.component.html
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-04-15 15:35:41 +0200
committerGitHub <noreply@github.com>2020-04-15 15:35:41 +0200
commit437e8e06eb32ffe21111f0946115aae0e4c33381 (patch)
treec221f0c41b4d29de00f4a3318393c32a83b02fe5 /client/src/app/modal/custom-modal.component.html
parent45c14ae1b2884e75c6341117489ea39ae0e1a3bc (diff)
downloadPeerTube-437e8e06eb32ffe21111f0946115aae0e4c33381.tar.gz
PeerTube-437e8e06eb32ffe21111f0946115aae0e4c33381.tar.zst
PeerTube-437e8e06eb32ffe21111f0946115aae0e4c33381.zip
Add custom modal to plugin helpers (#2631)
* Add custom modal component * Add custom modal to app and plugins helpers * Fixes custom modal component * Add doc for custom modal * Fix newline end of file html and scss files * Move my-custom-modal component outside component for UserLoggedIn modals * Move initializeCustomModal to ngAfterViewInit() * Wrap events and conditionnals * Replace ng-show with ngIf* * Add modalRef to open only one modal + onCloseClick * Refacto + Fix access methods of custom modal * Fix methods names custom-modal.component * Fix implement AfterViewInit & no default boolean Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'client/src/app/modal/custom-modal.component.html')
-rw-r--r--client/src/app/modal/custom-modal.component.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/client/src/app/modal/custom-modal.component.html b/client/src/app/modal/custom-modal.component.html
new file mode 100644
index 000000000..06ecc2743
--- /dev/null
+++ b/client/src/app/modal/custom-modal.component.html
@@ -0,0 +1,20 @@
1<ng-template #modal let-hide="close">
2 <div class="modal-header">
3 <h4 class="modal-title">{{title}}</h4>
4 <my-global-icon *ngIf="close" iconName="cross" aria-label="Close" role="button" (click)="onCloseClick()"></my-global-icon>
5 </div>
6
7 <div class="modal-body" [innerHTML]="content"></div>
8
9 <div *ngIf="hasCancel() || hasConfirm()" class="modal-footer inputs">
10 <input
11 *ngIf="hasCancel()" type="button" role="button" value="{{cancel.value}}" class="action-button action-button-cancel"
12 (click)="onCancelClick()" (key.enter)="onCancelClick()"
13 >
14
15 <input
16 *ngIf="hasConfirm()" type="button" role="button" value="{{confirm.value}}" class="action-button action-button-confirm"
17 (click)="onConfirmClick()" (key.enter)="onConfirmClick()"
18 >
19 </div>
20</ng-template>