aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-channels
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-02-04 16:44:53 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-02-13 16:35:24 +0100
commit9b8a7aa8ea128f7e197ff38ca9f86ffa53bbe110 (patch)
treef38e6f83a9d892a99f930c0a25b1a405e679cd4a /client/src/app/+video-channels
parentece3029bd99a76b3c48a1cc8c58914c5cf61f106 (diff)
downloadPeerTube-9b8a7aa8ea128f7e197ff38ca9f86ffa53bbe110.tar.gz
PeerTube-9b8a7aa8ea128f7e197ff38ca9f86ffa53bbe110.tar.zst
PeerTube-9b8a7aa8ea128f7e197ff38ca9f86ffa53bbe110.zip
Improve search typeahead performance and use native events
Diffstat (limited to 'client/src/app/+video-channels')
-rw-r--r--client/src/app/+video-channels/video-channels.component.html24
-rw-r--r--client/src/app/+video-channels/video-channels.component.scss20
2 files changed, 34 insertions, 10 deletions
diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html
index 735a8f2c8..1087de113 100644
--- a/client/src/app/+video-channels/video-channels.component.html
+++ b/client/src/app/+video-channels/video-channels.component.html
@@ -7,25 +7,29 @@
7 <div class="actor-info"> 7 <div class="actor-info">
8 <div class="actor-names"> 8 <div class="actor-names">
9 <div class="actor-display-name">{{ videoChannel.displayName }}</div> 9 <div class="actor-display-name">{{ videoChannel.displayName }}</div>
10 <div class="actor-name">{{ videoChannel.nameWithHost }} 10 <div class="actor-name">
11 <span>{{ videoChannel.nameWithHost }}</span>
11 <button [cdkCopyToClipboard]="videoChannel.nameWithHost" (click)="activateCopiedMessage()" 12 <button [cdkCopyToClipboard]="videoChannel.nameWithHost" (click)="activateCopiedMessage()"
12 class="btn btn-outline-secondary btn-sm copy-button" 13 class="btn btn-outline-secondary btn-sm copy-button"
13 > 14 >
14 <span class="glyphicon glyphicon-copy"></span> 15 <span class="glyphicon glyphicon-copy"></span>
15 </button> 16 </button>
16 </div> 17 </div>
18 </div>
17 19
18 <div class="right-buttons"> 20 <div class="right-buttons">
19 <a *ngIf="isChannelManageable" [routerLink]="[ '/my-account/video-channels/update', videoChannel.nameWithHost ]" class="btn btn-outline-tertiary mr-2" i18n>Manage</a> 21 <a *ngIf="isChannelManageable" [routerLink]="[ '/my-account/video-channels/update', videoChannel.nameWithHost ]" class="btn btn-outline-tertiary mr-2" i18n>Manage</a>
20 <my-subscribe-button #subscribeButton [videoChannels]="[videoChannel]"></my-subscribe-button> 22 <my-subscribe-button #subscribeButton [videoChannels]="[videoChannel]"></my-subscribe-button>
21 </div>
22 </div> 23 </div>
23 <div class="actor-followers" i18n>{videoChannel.followersCount, plural, =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}}</div>
24 24
25 <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Go the owner account page" class="actor-owner"> 25 <div class="actor-lower">
26 <span i18n>Created by {{ videoChannel.ownerBy }}</span> 26 <div class="actor-followers" i18n>{videoChannel.followersCount, plural, =1 {1 subscriber} other {{{ videoChannel.followersCount }} subscribers}}</div>
27 <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" /> 27
28 </a> 28 <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Go the owner account page" class="actor-owner">
29 <span i18n>Created by {{ videoChannel.ownerBy }}</span>
30 <img [src]="videoChannel.ownerAvatarUrl" alt="Owner account avatar" />
31 </a>
32 </div>
29 </div> 33 </div>
30 </div> 34 </div>
31 35
diff --git a/client/src/app/+video-channels/video-channels.component.scss b/client/src/app/+video-channels/video-channels.component.scss
index 50b69e7ac..aa26a7e7b 100644
--- a/client/src/app/+video-channels/video-channels.component.scss
+++ b/client/src/app/+video-channels/video-channels.component.scss
@@ -8,6 +8,23 @@
8 width: 100%; 8 width: 100%;
9 } 9 }
10 10
11 .actor-info {
12 display: grid !important;
13 grid-template-columns: 1fr auto;
14 grid-template-rows: 1fr auto / 1fr auto;
15 grid-template-areas: "name buttons"
16 "lower buttons";
17
18 @media screen and (max-width: #{map-get($grid-breakpoints, lg)}) {
19 grid-template-areas: "name name"
20 "lower buttons";
21 }
22 }
23
24 .actor-names {
25 grid-area: name;
26 }
27
11 .actor-name { 28 .actor-name {
12 flex-grow: 1; 29 flex-grow: 1;
13 30
@@ -25,6 +42,9 @@
25 margin-left: auto; 42 margin-left: auto;
26 margin-top: 20px; 43 margin-top: 20px;
27 44
45 grid-row: buttons-start / span buttons-end;
46 grid-column: buttons-start;
47
28 a { 48 a {
29 @include peertube-button-outline; 49 @include peertube-button-outline;
30 line-height: 1.8; 50 line-height: 1.8;