show language selector in welcome tab

This commit is contained in:
Eugene Pankov 2022-01-18 22:12:19 +01:00
parent 5d22c15a78
commit 5ef36896c5
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
2 changed files with 13 additions and 1 deletions

View File

@ -6,6 +6,16 @@
.text-center.mb-5(translate) Thank you for downloading Tabby!
.form-line
.header
.title(translate) Language
select.form-control([(ngModel)]='config.store.language', (ngModelChange)='config.save()')
option([ngValue]='null', translate) Automatic
option(
[value]='lang.code',
*ngFor='let lang of locale.allLanguages'
) {{lang.name|translate}}
.form-line
.header
.title(translate) Enable analytics

View File

@ -3,6 +3,7 @@ import { Component } from '@angular/core'
import { TranslateService } from '@ngx-translate/core'
import { BaseTabComponent } from './baseTab.component'
import { ConfigService } from '../services/config.service'
import { LocaleService } from '../services/locale.service'
import { HostWindowService } from '../api/hostWindow'
/** @hidden */
@ -17,6 +18,7 @@ export class WelcomeTabComponent extends BaseTabComponent {
constructor (
private hostWindow: HostWindowService,
public config: ConfigService,
public locale: LocaleService,
translate: TranslateService,
) {
super()
@ -30,6 +32,6 @@ export class WelcomeTabComponent extends BaseTabComponent {
this.config.store.hotkeys['toggle-window'] = []
}
await this.config.save()
this.hostWindow.reload()
this.destroy()
}
}