diff options
author | Rigel Kent <par@rigelk.eu> | 2018-09-25 15:42:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 15:42:58 +0200 |
commit | 660d11e91e1643927028d2d6870a911f569b34d8 (patch) | |
tree | 455a39a397667eaa175a87d4b62b46406e75711a /client/src/app/shared/user-subscription/subscribe-button.component.html | |
parent | ba6a98b8fad8214338e0d0919eac3439e90569fe (diff) | |
download | PeerTube-660d11e91e1643927028d2d6870a911f569b34d8.tar.gz PeerTube-660d11e91e1643927028d2d6870a911f569b34d8.tar.zst PeerTube-660d11e91e1643927028d2d6870a911f569b34d8.zip |
refactor subscribe button and comment-add for visitor-interact UX (#1100)
* refactor subscribe button for visitor-subscribe UX
* refactor comment-add for visitor-interact UX
Diffstat (limited to 'client/src/app/shared/user-subscription/subscribe-button.component.html')
-rw-r--r-- | client/src/app/shared/user-subscription/subscribe-button.component.html | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.html b/client/src/app/shared/user-subscription/subscribe-button.component.html index 34c024c17..b62fb7dfa 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.html +++ b/client/src/app/shared/user-subscription/subscribe-button.component.html | |||
@@ -1,15 +1,45 @@ | |||
1 | <span i18n *ngIf="subscribed === false" class="subscribe-button" [ngClass]="size" role="button" (click)="subscribe()"> | 1 | <div class="btn-group-subscribe btn-group" |
2 | <span>Subscribe</span> | 2 | [ngClass]="{'subscribe-button': subscribed !== true, 'unsubscribe-button': subscribed === true}"> |
3 | <span *ngIf="displayFollowers && videoChannel.followersCount !== 0" class="followers-count"> | 3 | <button *ngIf="subscribed === false && isUserLoggedIn()" type="button" |
4 | {{ videoChannel.followersCount | myNumberFormatter }} | 4 | class="btn btn-sm" role="button" |
5 | </span> | 5 | (click)="subscribe()" i18n> |
6 | </span> | 6 | <span> |
7 | 7 | Subscribe | |
8 | <span *ngIf="subscribed === true" class="unsubscribe-button" [ngClass]="size" role="button" (click)="unsubscribe()"> | 8 | </span> |
9 | <span class="subscribed" i18n>Subscribed</span> | 9 | <span *ngIf="displayFollowers && videoChannel.followersCount !== 0" class="followers-count"> |
10 | <span class="unsubscribe" i18n>Unsubscribe</span> | 10 | {{ videoChannel.followersCount | myNumberFormatter }} |
11 | 11 | </span> | |
12 | <span *ngIf="displayFollowers && videoChannel.followersCount !== 0" class="followers-count"> | 12 | </button> |
13 | {{ videoChannel.followersCount | myNumberFormatter }} | 13 | <button *ngIf="subscribed === true" type="button" |
14 | </span> | 14 | class="btn btn-sm" role="button" |
15 | </span> | 15 | (click)="unsubscribe()" i18n>Unsubscribe</button> |
16 | |||
17 | <div class="btn-group" ngbDropdown autoClose="outside" | ||
18 | placement="bottom-right" role="group" | ||
19 | aria-label="Multiple ways to subscribe to the current channel"> | ||
20 | <button class="btn btn-sm dropdown-toggle-split" ngbDropdownToggle> | ||
21 | <span *ngIf="!isUserLoggedIn()"> | ||
22 | Subscribe | ||
23 | </span> | ||
24 | <span *ngIf="displayFollowers && videoChannel.followersCount !== 0" class="followers-count"> | ||
25 | {{ videoChannel.followersCount | myNumberFormatter }} | ||
26 | </span> | ||
27 | </button> | ||
28 | <div class="dropdown-menu" ngbDropdownMenu> | ||
29 | |||
30 | <h6 class="dropdown-header" i18n>Using an ActivityPub-compatible account</h6> | ||
31 | <button class="dropdown-item" (click)="subscribe()" | ||
32 | *ngIf="subscribed === false"> | ||
33 | <span *ngIf="!isUserLoggedIn()" i18n>Subscribe with an account on {{ videoChannel.host }}</span> | ||
34 | <span *ngIf="isUserLoggedIn()" i18n>Subscribe with your local account</span> | ||
35 | </button> | ||
36 | <button class="dropdown-item" i18n>Subscribe with a remote account:</button> | ||
37 | <my-remote-subscribe showHelp="true" account="{{ uriAccount }}"></my-remote-subscribe> | ||
38 | <div class="dropdown-divider"></div> | ||
39 | |||
40 | <h6 class="dropdown-header" i18n>Using a syndication feed</h6> | ||
41 | <button (click)="rssOpen()" class="dropdown-item" i18n>Subscribe via RSS</button> | ||
42 | |||
43 | </div> | ||
44 | </div> | ||
45 | </div> \ No newline at end of file | ||