Skip to content

Commit

Permalink
chore: merge dev to master (#244)
Browse files Browse the repository at this point in the history
* fix: 修复RemoteApp取不到Title的问题

* fix: 默认语言改成中文

Co-authored-by: OrangeM21 <[email protected]>
  • Loading branch information
ibuler and orangemio authored Aug 20, 2020
1 parent 6b2dabb commit 731fe43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/elements/content-tab/content-tab.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<li
[ngClass]="{'active': view.active,'disconnected': !view.connected, 'hidden': view.closed != false}"
[id]="view.id" (click)="setActive()" (dblclick)="view.editable=true;setActive()"
[title]="view.host.hostname"
[title]="view.host?.hostname"
>
<span *ngIf="view.nick && !view.editable" [title]="view.nick">{{view.nick | truncatechars:100 }}</span>
<input *ngIf="view.editable" [(ngModel)]="view.nick" (blur)="view.editable=false" (keyup.enter)="view.editable=false" autofocus="autofocus"/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class AppComponent {
// tslint:disable-next-line:use-life-cycle-interface
public async ngOnInit() {
// 语言初始化(若未设置语言, 则取浏览器语言)
const currentLanguage = await localStorage.getItem('currentLanguage') || this.translate.getBrowserCultureLang();
const currentLanguage = await localStorage.getItem('currentLanguage') || 'zh';
// 当在assets/i18n中找不到对应的语言翻译时,使用'zh-CN'作为默认语言
this.translate.setDefaultLang('zh');
this.translate.use(currentLanguage);
Expand Down

0 comments on commit 731fe43

Please sign in to comment.