diff --git a/client/src/app/shared/images/global-icon.component.ts b/client/src/app/shared/images/global-icon.component.ts
index 17186cff4..806aca347 100644
--- a/client/src/app/shared/images/global-icon.component.ts
+++ b/client/src/app/shared/images/global-icon.component.ts
@@ -1,5 +1,6 @@
import { ChangeDetectionStrategy, Component, ElementRef, Input, OnInit } from '@angular/core'
import { HooksService } from '@app/core/plugins/hooks.service'
+import { I18n } from '@ngx-translate/i18n-polyfill'
const icons = {
'add': require('!!raw-loader?!../../../assets/images/global/add.svg'),
@@ -70,8 +71,7 @@ export class GlobalIconComponent implements OnInit {
) { }
async ngOnInit () {
- const nativeElement = this.el.nativeElement
-
+ const nativeElement = this.el.nativeElement as HTMLElement
nativeElement.innerHTML = await this.hooks.wrapFun(
this.getSVGContent.bind(this),
{ name: this.iconName },
diff --git a/client/src/app/shared/video/video-thumbnail.component.html b/client/src/app/shared/video/video-thumbnail.component.html
index 7e71a390b..b63085b81 100644
--- a/client/src/app/shared/video/video-thumbnail.component.html
+++ b/client/src/app/shared/video/video-thumbnail.component.html
@@ -1,8 +1,8 @@
-
+
diff --git a/client/src/sass/primeng-custom.scss b/client/src/sass/primeng-custom.scss
index 9aa4d980c..238cb8454 100644
--- a/client/src/sass/primeng-custom.scss
+++ b/client/src/sass/primeng-custom.scss
@@ -8,6 +8,7 @@
font-family: 'Glyphicons Halflings';
text-decoration: none !important;
color: var(--mainForegroundColor) !important;
+ font-display: swap;
}
my-edit-button,
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index e59505614..1d8a08ed0 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -26,7 +26,9 @@ export class ClientHtml {
}
static async getDefaultHTMLPage (req: express.Request, res: express.Response, paramLang?: string) {
- const html = await ClientHtml.getIndexHTML(req, res, paramLang)
+ const html = paramLang
+ ? await ClientHtml.getIndexHTML(req, res, paramLang)
+ : await ClientHtml.getIndexHTML(req, res)
let customHtml = ClientHtml.addTitleTag(html)
customHtml = ClientHtml.addDescriptionTag(customHtml)
@@ -98,6 +100,7 @@ export class ClientHtml {
let html = buffer.toString()
+ if (paramLang) html = ClientHtml.addHtmlLang(html, paramLang)
html = ClientHtml.addCustomCSS(html)
html = await ClientHtml.addAsyncPluginCSS(html)
@@ -106,7 +109,7 @@ export class ClientHtml {
return html
}
- private static getIndexPath (req: express.Request, res: express.Response, paramLang?: string) {
+ private static getIndexPath (req: express.Request, res: express.Response, paramLang: string) {
let lang: string
// Check param lang validity
@@ -129,6 +132,10 @@ export class ClientHtml {
return join(__dirname, '../../../client/dist/' + buildFileLocale(lang) + '/index.html')
}
+ private static addHtmlLang (htmlStringPage: string, paramLang: string) {
+ return htmlStringPage.replace('', ``)
+ }
+
private static addTitleTag (htmlStringPage: string, title?: string) {
let text = title || CONFIG.INSTANCE.NAME
if (title) text += ` - ${CONFIG.INSTANCE.NAME}`