app version is added
This commit is contained in:
parent
9561dcbe80
commit
34e8db65b4
|
@ -397,6 +397,13 @@ ipcMain.on(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ipcMain.on(
|
||||||
|
MessengerChannel.GetVersionInfo,
|
||||||
|
(event: IpcMainEvent, ...args: any[]) => {
|
||||||
|
event.returnValue = app.getVersion();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
ipcMain.on(
|
ipcMain.on(
|
||||||
MessengerChannel.ChangeAutoLaunch,
|
MessengerChannel.ChangeAutoLaunch,
|
||||||
(event: IpcMainEvent, ...args: any[]) => {
|
(event: IpcMainEvent, ...args: any[]) => {
|
||||||
|
|
|
@ -306,6 +306,12 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<mat-divider></mat-divider>
|
<mat-divider></mat-divider>
|
||||||
|
<div class="setting">
|
||||||
|
<button mat-menu-item [matMenuTriggerFor]="informationMenu">
|
||||||
|
{{ 'information.label' | translate }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<mat-divider></mat-divider>
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
<button mat-menu-item (click)="onClickLogout()">
|
<button mat-menu-item (click)="onClickLogout()">
|
||||||
{{ 'accounts.logout' | translate }}
|
{{ 'accounts.logout' | translate }}
|
||||||
|
@ -414,3 +420,9 @@
|
||||||
</div>
|
</div>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
|
<mat-menu #informationMenu="matMenu">
|
||||||
|
<div mat-menu-item>
|
||||||
|
{{ 'information.version' | translate }}: {{ appVersion }}
|
||||||
|
</div>
|
||||||
|
</mat-menu>
|
||||||
|
|
|
@ -93,6 +93,8 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
||||||
webLinkBadgeMail = 0;
|
webLinkBadgeMail = 0;
|
||||||
webLinkBadgePayment = 0;
|
webLinkBadgePayment = 0;
|
||||||
|
|
||||||
|
appVersion: string;
|
||||||
|
|
||||||
WebLinkType = WebLinkType;
|
WebLinkType = WebLinkType;
|
||||||
StatusCode = StatusCode;
|
StatusCode = StatusCode;
|
||||||
|
|
||||||
|
@ -167,6 +169,10 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
||||||
);
|
);
|
||||||
|
|
||||||
this.zoom = appUserInfo.zoom;
|
this.zoom = appUserInfo.zoom;
|
||||||
|
|
||||||
|
this.nativeService.getVersionInfo().then(ver => {
|
||||||
|
this.appVersion = ver;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
|
|
|
@ -67,6 +67,10 @@
|
||||||
"failToChangeProfileImage": "Failed to change profile image."
|
"failToChangeProfileImage": "Failed to change profile image."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"information": {
|
||||||
|
"label": "Information",
|
||||||
|
"version": "Version"
|
||||||
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"label": "Settings",
|
"label": "Settings",
|
||||||
"typeGenernal": "Genernal",
|
"typeGenernal": "Genernal",
|
||||||
|
|
|
@ -67,6 +67,10 @@
|
||||||
"failToChangeProfileImage": "프로필 이미지 변경에 실패 하였습니다."
|
"failToChangeProfileImage": "프로필 이미지 변경에 실패 하였습니다."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"information": {
|
||||||
|
"label": "정보",
|
||||||
|
"version": "버전"
|
||||||
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"label": "설정",
|
"label": "설정",
|
||||||
"typeGenernal": "일반",
|
"typeGenernal": "일반",
|
||||||
|
|
|
@ -78,6 +78,12 @@ export class BrowserNativeService extends NativeService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getVersionInfo(): Promise<string> {
|
||||||
|
return new Promise<any>((resolve, reject) => {
|
||||||
|
resolve('');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
changeAutoLaunch(autoLaunch: boolean): Promise<boolean> {
|
changeAutoLaunch(autoLaunch: boolean): Promise<boolean> {
|
||||||
return new Promise<boolean>((resolve, reject) => {
|
return new Promise<boolean>((resolve, reject) => {
|
||||||
resolve(true);
|
resolve(true);
|
||||||
|
|
|
@ -90,6 +90,16 @@ export class ElectronNativeService implements NativeService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getVersionInfo(): Promise<string> {
|
||||||
|
return new Promise<string>((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
resolve(this.ipcRenderer.sendSync(MessengerChannel.GetVersionInfo));
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
changeStatus(): Observable<StatusCode> {
|
changeStatus(): Observable<StatusCode> {
|
||||||
if (!this.changeStatusSubject) {
|
if (!this.changeStatusSubject) {
|
||||||
this.changeStatusSubject = new Subject<StatusCode>();
|
this.changeStatusSubject = new Subject<StatusCode>();
|
||||||
|
|
|
@ -5,7 +5,8 @@ export enum MessengerChannel {
|
||||||
ChangeAutoLaunch = 'UCAP::messenger::changeAutoLaunch',
|
ChangeAutoLaunch = 'UCAP::messenger::changeAutoLaunch',
|
||||||
ChangeStartupHideWindow = 'UCAP::messenger::changeStartupHideWindow',
|
ChangeStartupHideWindow = 'UCAP::messenger::changeStartupHideWindow',
|
||||||
ChangeDownloadPath = 'UCAP::messenger::changeDownloadPath',
|
ChangeDownloadPath = 'UCAP::messenger::changeDownloadPath',
|
||||||
GetNetworkInfo = 'UCAP::messenger::getNetworkInfo'
|
GetNetworkInfo = 'UCAP::messenger::getNetworkInfo',
|
||||||
|
GetVersionInfo = 'UCAP::messenger::getVersionInfo'
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ChatChannel {
|
export enum ChatChannel {
|
||||||
|
|
|
@ -25,6 +25,7 @@ export abstract class NativeService {
|
||||||
abstract showSetting(): Observable<void>;
|
abstract showSetting(): Observable<void>;
|
||||||
|
|
||||||
abstract getNetworkInfo(): Promise<any>;
|
abstract getNetworkInfo(): Promise<any>;
|
||||||
|
abstract getVersionInfo(): Promise<string>;
|
||||||
|
|
||||||
abstract changeAutoLaunch(autoLaunch: boolean): Promise<boolean>;
|
abstract changeAutoLaunch(autoLaunch: boolean): Promise<boolean>;
|
||||||
abstract changeStartupHideWindow(
|
abstract changeStartupHideWindow(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user