diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-29 10:41:48 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-29 10:41:48 +0100 |
commit | 29aedac8dcfc98ff67680d91d6f0f848e86fa4db (patch) | |
tree | ea72e501d88f34b566f0ddd231110d5766fcdfeb /client/src/app/+admin/plugins/plugin-search/plugin-search.component.html | |
parent | 087fc5dadec95061c05bd0b6c86197a32ec4f23c (diff) | |
download | PeerTube-29aedac8dcfc98ff67680d91d6f0f848e86fa4db.tar.gz PeerTube-29aedac8dcfc98ff67680d91d6f0f848e86fa4db.tar.zst PeerTube-29aedac8dcfc98ff67680d91d6f0f848e86fa4db.zip |
Refactor plugin card
Diffstat (limited to 'client/src/app/+admin/plugins/plugin-search/plugin-search.component.html')
-rw-r--r-- | client/src/app/+admin/plugins/plugin-search/plugin-search.component.html | 52 |
1 files changed, 18 insertions, 34 deletions
diff --git a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html index a0d228702..14f28f7ef 100644 --- a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html +++ b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.html | |||
@@ -30,45 +30,29 @@ | |||
30 | </div> | 30 | </div> |
31 | 31 | ||
32 | <div class="plugins" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> | 32 | <div class="plugins" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> |
33 | <div class="card plugin" *ngFor="let plugin of plugins"> | 33 | <ng-container *ngFor="let plugin of plugins" > |
34 | <div class="card-body"> | 34 | <my-plugin-card [plugin]="plugin" [version]="plugin.latestVersion" [pluginType]="pluginType"> |
35 | <div class="first-row"> | 35 | <div ngProjectAs="badges"> |
36 | <span class="plugin-name">{{ plugin.name }}</span> | 36 | <span i18n *ngIf="plugin.installed" class="badge badge-success">Installed</span> |
37 | |||
38 | <span class="plugin-version">{{ plugin.latestVersion }}</span> | ||
39 | |||
40 | <a class="plugin-icon" target="_blank" rel="noopener noreferrer" [href]="plugin.homepage" i18n-title title="Plugin homepage (new window)"> | ||
41 | <my-global-icon iconName="home"></my-global-icon> | ||
42 | </a> | ||
43 | |||
44 | <a class="plugin-icon" target="_blank" rel="noopener noreferrer" [href]="getPluginOrThemeHref(plugin.name)" i18n-title title="Plugin npm package (new window)"> | ||
45 | <my-global-icon iconName="npm"></my-global-icon> | ||
46 | </a> | ||
47 | |||
48 | <span *ngIf="plugin.installed" class="badge badge-success">Installed</span> | ||
49 | |||
50 | 37 | ||
51 | <span *ngIf="plugin.official" class="badge badge-primary" i18n i18n-title title="This plugin is developed by Framasoft"> | 38 | <span *ngIf="plugin.official" class="badge badge-primary" i18n i18n-title title="This plugin is developed by Framasoft"> |
52 | Official | 39 | Official |
53 | </span> | 40 | </span> |
54 | |||
55 | <div class="buttons"> | ||
56 | <my-edit-button | ||
57 | *ngIf="plugin.installed === true && !isThemeSearch()" [routerLink]="getShowRouterLink(plugin)" | ||
58 | label="Settings" i18n-label [responsiveLabel]="true" | ||
59 | ></my-edit-button> | ||
60 | |||
61 | <my-button | ||
62 | class="update-button" *ngIf="plugin.installed === false" (click)="install(plugin)" | ||
63 | [loading]="isInstalling(plugin)" label="Install" [responsiveLabel]="true" | ||
64 | icon="cloud-download" [attr.disabled]="isInstalling(plugin)" | ||
65 | ></my-button> | ||
66 | </div> | ||
67 | </div> | 41 | </div> |
68 | 42 | ||
69 | <div class="second-row"> | 43 | <div ngProjectAs="buttons"> |
70 | <div class="description">{{ plugin.description }}</div> | 44 | <my-edit-button |
45 | *ngIf="plugin.installed === true && !isThemeSearch()" [routerLink]="getShowRouterLink(plugin)" | ||
46 | label="Settings" i18n-label [responsiveLabel]="true" | ||
47 | ></my-edit-button> | ||
48 | |||
49 | <my-button | ||
50 | class="update-button" *ngIf="plugin.installed === false" (click)="install(plugin)" | ||
51 | [loading]="isInstalling(plugin)" label="Install" [responsiveLabel]="true" | ||
52 | icon="cloud-download" [attr.disabled]="isInstalling(plugin)" | ||
53 | ></my-button> | ||
71 | </div> | 54 | </div> |
72 | </div> | 55 | |
73 | </div> | 56 | </my-plugin-card> |
57 | </ng-container> | ||
74 | </div> | 58 | </div> |