aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/follows')
-rw-r--r--client/src/app/+admin/follows/following-add/following-add.component.html2
-rw-r--r--client/src/app/+admin/follows/follows.component.html12
-rw-r--r--client/src/app/+admin/follows/follows.component.scss6
-rw-r--r--client/src/app/+admin/follows/follows.component.ts8
4 files changed, 12 insertions, 16 deletions
diff --git a/client/src/app/+admin/follows/following-add/following-add.component.html b/client/src/app/+admin/follows/following-add/following-add.component.html
index 72635048c..e08decb3f 100644
--- a/client/src/app/+admin/follows/following-add/following-add.component.html
+++ b/client/src/app/+admin/follows/following-add/following-add.component.html
@@ -18,5 +18,5 @@
18 It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers. 18 It seems that you are not on a HTTPS server. Your webserver needs to have TLS activated in order to follow servers.
19 </div> 19 </div>
20 20
21 <input type="submit" i18n-value value="Add following" [disabled]="hostsError || !hostsString" class="btn btn-default"> 21 <input type="submit" i18n-value value="Add following" [disabled]="hostsError || !hostsString" class="btn btn-secondary">
22</form> 22</form>
diff --git a/client/src/app/+admin/follows/follows.component.html b/client/src/app/+admin/follows/follows.component.html
index a8258bf70..8eabb3392 100644
--- a/client/src/app/+admin/follows/follows.component.html
+++ b/client/src/app/+admin/follows/follows.component.html
@@ -1,13 +1,15 @@
1<div class="admin-sub-header"> 1<div class="admin-sub-header">
2 <div i18n class="form-sub-title">Manage follows</div> 2 <div i18n class="form-sub-title">Manage follows</div>
3 3
4 <tabset #followsMenuTabs> 4 <ngb-tabset #followsMenuTabs type="pills">
5 <tab *ngFor="let link of links"> 5
6 <ng-template tabHeading> 6 <ngb-tab *ngFor="let link of links">
7 <ng-template ngbTabTitle>
7 <a class="tab-link" [routerLink]="link.path">{{ link.title }}</a> 8 <a class="tab-link" [routerLink]="link.path">{{ link.title }}</a>
8 </ng-template> 9 </ng-template>
9 </tab> 10 </ngb-tab>
10 </tabset> 11
12 </ngb-tabset>
11</div> 13</div>
12 14
13<router-outlet></router-outlet> 15<router-outlet></router-outlet>
diff --git a/client/src/app/+admin/follows/follows.component.scss b/client/src/app/+admin/follows/follows.component.scss
index 08b3737f8..766d7853b 100644
--- a/client/src/app/+admin/follows/follows.component.scss
+++ b/client/src/app/+admin/follows/follows.component.scss
@@ -2,9 +2,3 @@
2 flex-grow: 0; 2 flex-grow: 0;
3 margin-right: 30px; 3 margin-right: 30px;
4} 4}
5
6/deep/ .tab-content {
7 height: 0;
8 min-height: 0;
9 padding: 0;
10}
diff --git a/client/src/app/+admin/follows/follows.component.ts b/client/src/app/+admin/follows/follows.component.ts
index f7af9826c..b6f7715b3 100644
--- a/client/src/app/+admin/follows/follows.component.ts
+++ b/client/src/app/+admin/follows/follows.component.ts
@@ -1,14 +1,14 @@
1import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core' 1import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core'
2import { NavigationEnd, Router } from '@angular/router' 2import { NavigationEnd, Router } from '@angular/router'
3import { TabsetComponent } from 'ngx-bootstrap/tabs'
4import { I18n } from '@ngx-translate/i18n-polyfill' 3import { I18n } from '@ngx-translate/i18n-polyfill'
4import { NgbTabset } from '@ng-bootstrap/ng-bootstrap'
5 5
6@Component({ 6@Component({
7 templateUrl: './follows.component.html', 7 templateUrl: './follows.component.html',
8 styleUrls: [ './follows.component.scss' ] 8 styleUrls: [ './follows.component.scss' ]
9}) 9})
10export class FollowsComponent implements OnInit, AfterViewInit { 10export class FollowsComponent implements OnInit, AfterViewInit {
11 @ViewChild('followsMenuTabs') followsMenuTabs: TabsetComponent 11 @ViewChild('followsMenuTabs') followsMenuTabs: NgbTabset
12 12
13 links: { path: string, title: string }[] = [] 13 links: { path: string, title: string }[] = []
14 14
@@ -53,8 +53,8 @@ export class FollowsComponent implements OnInit, AfterViewInit {
53 for (let i = 0; i < this.links.length; i++) { 53 for (let i = 0; i < this.links.length; i++) {
54 const path = this.links[i].path 54 const path = this.links[i].path
55 55
56 if (url.endsWith(path) === true && this.followsMenuTabs.tabs[i]) { 56 if (url.endsWith(path) === true) {
57 this.followsMenuTabs.tabs[i].active = true 57 this.followsMenuTabs.select(path)
58 return 58 return
59 } 59 }
60 } 60 }