mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-10 04:07:35 +02:00
Adding URL base to language selector. #548
This commit is contained in:
parent
9b56331f50
commit
a4cdbc9b1c
@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
</button>
|
</button>
|
||||||
<div *dropdownMenu class="dropdown-menu" aria-labelledby="language">
|
<div *dropdownMenu class="dropdown-menu" aria-labelledby="language">
|
||||||
<a *ngFor="let lang of languages" class="dropdown-item" href="/{{lang}}">{{lang}}</a>
|
<a *ngFor="let lang of languages" class="dropdown-item" href="{{urlBase}}/{{lang}}">{{lang}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Component, Input } from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import { Config } from '../../../../common/config/public/Config';
|
import {Config} from '../../../../common/config/public/Config';
|
||||||
import { CookieNames } from '../../../../common/CookieNames';
|
import {CookieNames} from '../../../../common/CookieNames';
|
||||||
import { CookieService } from 'ngx-cookie-service';
|
import {CookieService} from 'ngx-cookie-service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-language',
|
selector: 'app-language',
|
||||||
@ -12,6 +12,7 @@ export class LanguageComponent {
|
|||||||
@Input() isDark: boolean;
|
@Input() isDark: boolean;
|
||||||
languages: string[] = [];
|
languages: string[] = [];
|
||||||
current: string = null;
|
current: string = null;
|
||||||
|
urlBase = Config.Client.urlBase;
|
||||||
|
|
||||||
constructor(private cookieService: CookieService) {
|
constructor(private cookieService: CookieService) {
|
||||||
this.languages = Config.Client.languages.sort();
|
this.languages = Config.Client.languages.sort();
|
||||||
|
Loading…
Reference in New Issue
Block a user