This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
/
dapp-list.html
110 lines (99 loc) · 4.52 KB
/
dapp-list.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!--
Copyright (C) 2018-present evan GmbH.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License, version 3,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see http://www.gnu.org/licenses/ or
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from
the following URL: https://evan.network/license/
-->
<dashboard-top-buttons class="on-small-move-down">
<ion-searchbar
*ngIf="showSearch"
placeholder="{{ '_dappdapps.filter_items' | translate }}"
[(ngModel)]="filterString"
(ionInput)="filter($event)">
</ion-searchbar>
<button ion-button icon-only round
*ngIf="utils.isLG"
(click)="showSearch = !showSearch; ref.detectChanges()">
<ion-icon name="search"></ion-icon>
</button>
<button ion-button icon-only round routerLink="./dapp-add">
<ion-icon name="add"></ion-icon>
</button>
</dashboard-top-buttons>
<evan-loading *ngIf="loading" delayLoading="500"></evan-loading>
<ion-list class="evan-grid" *ngIf="!loading">
<ion-searchbar
placeholder="{{ '_dappdapps.filter_items' | translate }}"
[(ngModel)]="filterString"
(ionInput)="filter($event)">
</ion-searchbar>
<evan-empty-dapp
*ngIf="dappKeys.length === 0"
[text]="filterString ? ('_dappdapps.nothing-found' | translate:{ filter: filterString }) : '_dappdapps.empty-bookmarks'"
ensAddress="favorites">
</evan-empty-dapp>
<ion-item-sliding *ngFor="let dapp of dappKeys" #sliding>
<ion-item color="light">
<ion-avatar class="clickable" item-start
[style.background-color]="dapps[dapp].primaryColor"
(click)="openDApp(dapp)">
<div class="evan-avatar-wrapper"
[style.background-color]="dapps[dapp].secondaryColor">
<ng-container *ngIf="dapps[dapp].imgSquare">
<img *oneTime [src]="_DomSanitizer.bypassSecurityTrustUrl(dapps[dapp].imgSquare)" />
</ng-container>
</div>
</ion-avatar>
<ion-label class="clickable" (click)="openDApp(dapp)">
<h2 *ngIf="!dapps[dapp].translated.name">{{ '_dappdapps.no_title' | translate }}</h2>
<h2 *ngIf="dapps[dapp].translated.name">{{ dapps[dapp].translated.name }}</h2>
<h3>{{ dapps[dapp].translated.description }}</h3>
</ion-label>
<div item-content>
<button ion-button clear round icon-only (click)="openDApp(dapp)">
<ion-icon name="arrow-forward" color="light"></ion-icon>
</button>
<div *ngIf="utils.isMD" class="evan-popover top-right">
<button ion-button clear (click)="togglePopover(dapp)">
<ion-icon name="more" color="light" *ngIf="showItemPopover !== dapp"></ion-icon>
<ion-icon name="close" color="light" *ngIf="showItemPopover === dapp"></ion-icon>
</button>
<ng-container *ngIf="showItemPopover === dapp">
<div class="backdrop" (click)="showItemPopover = false; ref.detectChanges()"></div>
<ion-list class="popover-content" [@opacityTransition]>
<ion-item class="clickable" (click)="copyDAppUrl(dapp); showItemPopover = false; ref.detectChanges()">
<ion-icon name="copy" item-end></ion-icon>
{{ '_dappdapps.copy-url' | translate }}
</ion-item>
<ion-item class="clickable" (click)="removeDApp(dapp); showItemPopover = false; ref.detectChanges()">
<ion-icon name="trash" item-end></ion-icon>
{{ '_dappdapps.remove' | translate }}
</ion-item>
</ion-list>
</ng-container>
</div>
</div>
</ion-item>
<ion-item-options side="left">
<button ion-button color="danger" (click)="removeDApp(dapp, sliding)">
<ion-icon name="trash"></ion-icon>
{{ '_dappdapps.remove' | translate }}
</button>
</ion-item-options>
<ion-item-options side="right">
<button ion-button color="primary" (click)="copyDAppUrl(dapp)">
<ion-icon name="copy" color="light"></ion-icon>
{{ '_dappdapps.copy-url' | translate }}
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>