diff options
author | Chocobozzz <me@florianbigard.com> | 2023-02-15 15:53:40 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-02-15 16:08:32 +0100 |
commit | f6cf8e8d8e9bc61dac266886c873613bb715936d (patch) | |
tree | e5fb73f19ff933f8d816faf0755a8085b085605c /client/src/app/shared/shared-instance | |
parent | 343d1395df2e07ea9eb3540724c9fd689e617cb8 (diff) | |
download | PeerTube-f6cf8e8d8e9bc61dac266886c873613bb715936d.tar.gz PeerTube-f6cf8e8d8e9bc61dac266886c873613bb715936d.tar.zst PeerTube-f6cf8e8d8e9bc61dac266886c873613bb715936d.zip |
Fix stats anchor link
Diffstat (limited to 'client/src/app/shared/shared-instance')
5 files changed, 2 insertions, 171 deletions
diff --git a/client/src/app/shared/shared-instance/index.ts b/client/src/app/shared/shared-instance/index.ts index d7172f7b6..d8a69afe0 100644 --- a/client/src/app/shared/shared-instance/index.ts +++ b/client/src/app/shared/shared-instance/index.ts | |||
@@ -2,6 +2,5 @@ export * from './feature-boolean.component' | |||
2 | export * from './instance-about-accordion.component' | 2 | export * from './instance-about-accordion.component' |
3 | export * from './instance-features-table.component' | 3 | export * from './instance-features-table.component' |
4 | export * from './instance-follow.service' | 4 | export * from './instance-follow.service' |
5 | export * from './instance-statistics.component' | ||
6 | export * from './instance.service' | 5 | export * from './instance.service' |
7 | export * from './shared-instance.module' | 6 | export * from './shared-instance.module' |
diff --git a/client/src/app/shared/shared-instance/instance-statistics.component.html b/client/src/app/shared/shared-instance/instance-statistics.component.html deleted file mode 100644 index 68b209990..000000000 --- a/client/src/app/shared/shared-instance/instance-statistics.component.html +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | <p i18n *ngIf="null === serverStats">Loading instance statistics...</p> | ||
2 | |||
3 | <section *ngIf="null !== serverStats"> | ||
4 | <h3 i18n>By users on this instance</h3> | ||
5 | |||
6 | <div class="row"> | ||
7 | <div class="col-6 col-lg-4 col-xl-3"> | ||
8 | <div class="card stat"> | ||
9 | <div class="card-body"> | ||
10 | <p class="stat-value">{{ serverStats.totalUsers | number }}</p> | ||
11 | <p class="stat-label" i18n>users</p> | ||
12 | </div> | ||
13 | <my-global-icon iconName="user"></my-global-icon> | ||
14 | </div> | ||
15 | </div> | ||
16 | |||
17 | <div class="col-6 col-lg-4 col-xl-3"> | ||
18 | <div class="card stat"> | ||
19 | <div class="card-body"> | ||
20 | <p class="stat-value">{{ serverStats.totalLocalVideos | number }}</p> | ||
21 | <p class="stat-label" i18n>videos</p> | ||
22 | </div> | ||
23 | <my-global-icon iconName="film"></my-global-icon> | ||
24 | </div> | ||
25 | </div> | ||
26 | |||
27 | <div class="col-6 col-lg-4 col-xl-3"> | ||
28 | <div class="card stat"> | ||
29 | <div class="card-body"> | ||
30 | <p class="stat-value">{{ serverStats.totalLocalVideoViews | number }}</p> | ||
31 | <p class="stat-label" i18n>views</p> | ||
32 | </div> | ||
33 | <my-global-icon iconName="eye-open"></my-global-icon> | ||
34 | </div> | ||
35 | </div> | ||
36 | |||
37 | <div class="col-6 col-lg-4 col-xl-3"> | ||
38 | <div class="card stat"> | ||
39 | <div class="card-body"> | ||
40 | <p class="stat-value">{{ serverStats.totalLocalVideoComments | number }}</p> | ||
41 | <p class="stat-label" i18n>comments</p> | ||
42 | </div> | ||
43 | <my-global-icon iconName="message-circle"></my-global-icon> | ||
44 | </div> | ||
45 | </div> | ||
46 | |||
47 | <div class="col-6 col-lg-4 col-xl-3"> | ||
48 | <div class="card stat"> | ||
49 | <div class="card-body"> | ||
50 | <p class="stat-value">{{ serverStats.totalLocalVideoFilesSize | bytes:1 }}</p> | ||
51 | <p class="stat-label" i18n>hosted video</p> | ||
52 | </div> | ||
53 | <my-global-icon iconName="home"></my-global-icon> | ||
54 | </div> | ||
55 | </div> | ||
56 | </div> | ||
57 | |||
58 | <h3 i18n>In this instance federation</h3> | ||
59 | |||
60 | <div class="row"> | ||
61 | <div class="col-6 col-lg-4 col-xl-3"> | ||
62 | <div class="card stat"> | ||
63 | <div class="card-body"> | ||
64 | <p class="stat-value">{{ serverStats.totalVideos | number }}</p> | ||
65 | <p class="stat-label" i18n>videos</p> | ||
66 | </div> | ||
67 | <my-global-icon iconName="film"></my-global-icon> | ||
68 | </div> | ||
69 | </div> | ||
70 | |||
71 | <div class="col-6 col-lg-4 col-xl-3"> | ||
72 | <div class="card stat"> | ||
73 | <div class="card-body"> | ||
74 | <p class="stat-value">{{ serverStats.totalVideoComments | number }}</p> | ||
75 | <p class="stat-label" i18n>comments</p> | ||
76 | </div> | ||
77 | <my-global-icon iconName="message-circle"></my-global-icon> | ||
78 | </div> | ||
79 | </div> | ||
80 | |||
81 | <div class="col-6 col-lg-4 col-xl-3"> | ||
82 | <div class="card stat"> | ||
83 | <div class="card-body"> | ||
84 | <p class="stat-value">{{ serverStats.totalInstanceFollowers | number }}</p> | ||
85 | <p class="stat-label" i18n>followers</p> | ||
86 | </div> | ||
87 | <my-global-icon iconName="share"></my-global-icon> | ||
88 | </div> | ||
89 | </div> | ||
90 | |||
91 | <div class="col-6 col-lg-4 col-xl-3"> | ||
92 | <div class="card stat"> | ||
93 | <div class="card-body"> | ||
94 | <p class="stat-value">{{ serverStats.totalInstanceFollowing | number }}</p> | ||
95 | <p class="stat-label" i18n>following</p> | ||
96 | </div> | ||
97 | <my-global-icon iconName="globe"></my-global-icon> | ||
98 | </div> | ||
99 | </div> | ||
100 | </div> | ||
101 | </section> | ||
diff --git a/client/src/app/shared/shared-instance/instance-statistics.component.scss b/client/src/app/shared/shared-instance/instance-statistics.component.scss deleted file mode 100644 index e1d489d28..000000000 --- a/client/src/app/shared/shared-instance/instance-statistics.component.scss +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | @use '_variables' as *; | ||
2 | @use '_mixins' as *; | ||
3 | |||
4 | h3 { | ||
5 | font-size: 1.25rem; | ||
6 | } | ||
7 | |||
8 | .stat { | ||
9 | text-align: center; | ||
10 | margin-bottom: 1em; | ||
11 | overflow: hidden; | ||
12 | |||
13 | .stat-value { | ||
14 | font-size: 2.25em; | ||
15 | line-height: 1em; | ||
16 | margin: 0; | ||
17 | } | ||
18 | |||
19 | .stat-label { | ||
20 | font-size: 1.15em; | ||
21 | margin: 0; | ||
22 | } | ||
23 | |||
24 | .card-body { | ||
25 | z-index: 2; | ||
26 | } | ||
27 | } | ||
28 | |||
29 | my-global-icon { | ||
30 | opacity: 0.12; | ||
31 | position: absolute; | ||
32 | left: 16px; | ||
33 | top: -24px; | ||
34 | width: 110px; | ||
35 | |||
36 | &.icon-bottom { | ||
37 | top: 4px; | ||
38 | } | ||
39 | } | ||
diff --git a/client/src/app/shared/shared-instance/instance-statistics.component.ts b/client/src/app/shared/shared-instance/instance-statistics.component.ts deleted file mode 100644 index 0618efe69..000000000 --- a/client/src/app/shared/shared-instance/instance-statistics.component.ts +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | ||
2 | import { ServerStats } from '@shared/models/server' | ||
3 | import { ServerService } from '@app/core' | ||
4 | |||
5 | @Component({ | ||
6 | selector: 'my-instance-statistics', | ||
7 | templateUrl: './instance-statistics.component.html', | ||
8 | styleUrls: [ './instance-statistics.component.scss' ] | ||
9 | }) | ||
10 | export class InstanceStatisticsComponent implements OnInit { | ||
11 | serverStats: ServerStats = null | ||
12 | |||
13 | constructor ( | ||
14 | private serverService: ServerService | ||
15 | ) { | ||
16 | } | ||
17 | |||
18 | ngOnInit () { | ||
19 | this.serverService.getServerStats() | ||
20 | .subscribe(res => { | ||
21 | this.serverStats = res | ||
22 | }) | ||
23 | } | ||
24 | } | ||
diff --git a/client/src/app/shared/shared-instance/shared-instance.module.ts b/client/src/app/shared/shared-instance/shared-instance.module.ts index dfce88e11..4ce98eafe 100644 --- a/client/src/app/shared/shared-instance/shared-instance.module.ts +++ b/client/src/app/shared/shared-instance/shared-instance.module.ts | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
3 | import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap' | 2 | import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap' |
4 | import { SharedGlobalIconModule } from '../shared-icons' | 3 | import { SharedGlobalIconModule } from '../shared-icons' |
@@ -7,7 +6,6 @@ import { FeatureBooleanComponent } from './feature-boolean.component' | |||
7 | import { InstanceAboutAccordionComponent } from './instance-about-accordion.component' | 6 | import { InstanceAboutAccordionComponent } from './instance-about-accordion.component' |
8 | import { InstanceFeaturesTableComponent } from './instance-features-table.component' | 7 | import { InstanceFeaturesTableComponent } from './instance-features-table.component' |
9 | import { InstanceFollowService } from './instance-follow.service' | 8 | import { InstanceFollowService } from './instance-follow.service' |
10 | import { InstanceStatisticsComponent } from './instance-statistics.component' | ||
11 | import { InstanceService } from './instance.service' | 9 | import { InstanceService } from './instance.service' |
12 | 10 | ||
13 | @NgModule({ | 11 | @NgModule({ |
@@ -20,15 +18,13 @@ import { InstanceService } from './instance.service' | |||
20 | declarations: [ | 18 | declarations: [ |
21 | FeatureBooleanComponent, | 19 | FeatureBooleanComponent, |
22 | InstanceAboutAccordionComponent, | 20 | InstanceAboutAccordionComponent, |
23 | InstanceFeaturesTableComponent, | 21 | InstanceFeaturesTableComponent |
24 | InstanceStatisticsComponent | ||
25 | ], | 22 | ], |
26 | 23 | ||
27 | exports: [ | 24 | exports: [ |
28 | FeatureBooleanComponent, | 25 | FeatureBooleanComponent, |
29 | InstanceAboutAccordionComponent, | 26 | InstanceAboutAccordionComponent, |
30 | InstanceFeaturesTableComponent, | 27 | InstanceFeaturesTableComponent |
31 | InstanceStatisticsComponent | ||
32 | ], | 28 | ], |
33 | 29 | ||
34 | providers: [ | 30 | providers: [ |