diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-06-02 17:53:32 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-04 09:05:44 +0200 |
commit | 81fe3c67c5d70e69aa2d965a41afd7331cd4fb76 (patch) | |
tree | 1c2e81d9e609a71f87aa5c29172200b6b283a66f /client/src/app | |
parent | 140ea386dea49220f4cdd5b67027e8d30eee1b06 (diff) | |
download | PeerTube-81fe3c67c5d70e69aa2d965a41afd7331cd4fb76.tar.gz PeerTube-81fe3c67c5d70e69aa2d965a41afd7331cd4fb76.tar.zst PeerTube-81fe3c67c5d70e69aa2d965a41afd7331cd4fb76.zip |
fix duplicate id in svg, empty alt in base email
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/+about/about-peertube/about-peertube.component.html | 4 | ||||
-rw-r--r-- | client/src/app/app.component.ts | 15 | ||||
-rw-r--r-- | client/src/app/modal/instance-config-warning-modal.component.html | 6 |
3 files changed, 9 insertions, 16 deletions
diff --git a/client/src/app/+about/about-peertube/about-peertube.component.html b/client/src/app/+about/about-peertube/about-peertube.component.html index e5a8b2097..1dbad3096 100644 --- a/client/src/app/+about/about-peertube/about-peertube.component.html +++ b/client/src/app/+about/about-peertube/about-peertube.component.html | |||
@@ -3,11 +3,11 @@ | |||
3 | What is PeerTube? | 3 | What is PeerTube? |
4 | </h1> | 4 | </h1> |
5 | 5 | ||
6 | <img class="mascot" width="121px" height="147px" src="/client/assets/images/mascot/default.png" alt="mascot"/> | 6 | <img class="mascot" width="121px" height="147px" src="/client/assets/images/mascot/default.svg" alt="mascot"/> |
7 | 7 | ||
8 | <div class="description"> | 8 | <div class="description"> |
9 | <p i18n> | 9 | <p i18n> |
10 | PeerTube is a self hosted federated (ActivityPub) video streaming platform using P2P directly in the web browser. | 10 | PeerTube is a self-hosted ActivityPub-federated video streaming platform using P2P directly in your web browser. |
11 | </p> | 11 | </p> |
12 | 12 | ||
13 | <p i18n> | 13 | <p i18n> |
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index aba91aad2..c77dc97de 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Component, OnInit, ViewChild, AfterViewInit, Inject } from '@angular/core' | 1 | import { Component, OnInit, ViewChild, AfterViewInit, Inject, LOCALE_ID } from '@angular/core' |
2 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' | 2 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' |
3 | import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular/router' | 3 | import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular/router' |
4 | import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' | 4 | import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' |
@@ -43,6 +43,7 @@ export class AppComponent implements OnInit, AfterViewInit { | |||
43 | 43 | ||
44 | constructor ( | 44 | constructor ( |
45 | @Inject(DOCUMENT) private document: Document, | 45 | @Inject(DOCUMENT) private document: Document, |
46 | @Inject(LOCALE_ID) private localeId: string, | ||
46 | private i18n: I18n, | 47 | private i18n: I18n, |
47 | private viewportScroller: ViewportScroller, | 48 | private viewportScroller: ViewportScroller, |
48 | private router: Router, | 49 | private router: Router, |
@@ -97,6 +98,8 @@ export class AppComponent implements OnInit, AfterViewInit { | |||
97 | this.location.onPopState(() => this.modalService.dismissAll(POP_STATE_MODAL_DISMISS)) | 98 | this.location.onPopState(() => this.modalService.dismissAll(POP_STATE_MODAL_DISMISS)) |
98 | 99 | ||
99 | this.openModalsIfNeeded() | 100 | this.openModalsIfNeeded() |
101 | |||
102 | this.document.documentElement.lang = getShortLocale(this.localeId) | ||
100 | } | 103 | } |
101 | 104 | ||
102 | ngAfterViewInit () { | 105 | ngAfterViewInit () { |
@@ -171,16 +174,6 @@ export class AppComponent implements OnInit, AfterViewInit { | |||
171 | filter(pathname => !pathname || pathname === '/' || is18nPath(pathname)) | 174 | filter(pathname => !pathname || pathname === '/' || is18nPath(pathname)) |
172 | ).subscribe(() => this.redirectService.redirectToHomepage(true)) | 175 | ).subscribe(() => this.redirectService.redirectToHomepage(true)) |
173 | 176 | ||
174 | navigationEndEvent.pipe( | ||
175 | map(() => window.location.pathname), | ||
176 | ).subscribe(pathname => { | ||
177 | if (is18nPath(pathname)) { | ||
178 | this.document.documentElement.lang = getShortLocale(pathname.split('/')[1]) | ||
179 | } else { | ||
180 | this.document.documentElement.lang = 'en' | ||
181 | } | ||
182 | }) | ||
183 | |||
184 | navigationEndEvent.subscribe(e => { | 177 | navigationEndEvent.subscribe(e => { |
185 | this.hooks.runAction('action:router.navigation-end', 'common', { path: e.url }) | 178 | this.hooks.runAction('action:router.navigation-end', 'common', { path: e.url }) |
186 | }) | 179 | }) |
diff --git a/client/src/app/modal/instance-config-warning-modal.component.html b/client/src/app/modal/instance-config-warning-modal.component.html index 44c994bc8..5a8290cda 100644 --- a/client/src/app/modal/instance-config-warning-modal.component.html +++ b/client/src/app/modal/instance-config-warning-modal.component.html | |||
@@ -5,7 +5,7 @@ | |||
5 | </div> | 5 | </div> |
6 | 6 | ||
7 | <div class="modal-body"> | 7 | <div class="modal-body"> |
8 | <img class="mascot" src="/client/assets/images/mascot/oh.png" alt="mascot" /> | 8 | <img class="mascot" src="/client/assets/images/mascot/oh.svg" alt="mascot" /> |
9 | 9 | ||
10 | <p i18n>Hello dear administrator. You enabled user registration on your instance but you did not configure the following fields:</p> | 10 | <p i18n>Hello dear administrator. You enabled user registration on your instance but you did not configure the following fields:</p> |
11 | 11 | ||
@@ -22,8 +22,8 @@ | |||
22 | </ul> | 22 | </ul> |
23 | 23 | ||
24 | <p i18n> | 24 | <p i18n> |
25 | Please consider to configure these fields to help people to choose <strong>the appropriate instance</strong>. | 25 | Please consider configuring these fields to help people to choose <strong>the appropriate instance</strong>. |
26 | Without them, your instance may not be referenced on <a target="_blank" rel="noopener noreferrer" href="https://joinpeertube.org">JoinPeerTube website</a>. | 26 | Without them, your instance may not be referenced on the <a target="_blank" rel="noopener noreferrer" href="https://joinpeertube.org">JoinPeerTube website</a>. |
27 | </p> | 27 | </p> |
28 | 28 | ||
29 | <div class="configure-instance"> | 29 | <div class="configure-instance"> |