From ebddfb20c5eff5d183923e3ca534e4aab43da790 Mon Sep 17 00:00:00 2001 From: richard-loafle <44828666+richard-loafle@users.noreply.github.com> Date: Fri, 7 Feb 2020 13:33:30 +0900 Subject: [PATCH 1/7] bug fixed --- .../src/app/AppWindow.ts | 30 ++++++++++++++++--- .../src/app/app-routing.module.ts | 10 +++---- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts index 84964c7b..e905272b 100644 --- a/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts +++ b/electron-projects/ucap-webmessenger-electron/src/app/AppWindow.ts @@ -5,6 +5,8 @@ import { app, BrowserWindow, screen, ipcMain, IpcMainEvent } from 'electron'; import windowStateKeeper from 'electron-window-state'; import { EventEmitter } from 'events'; +import log from 'electron-log'; + import { registerWindowStateChangedEvents } from '../lib/window-state'; import { ElectronAppChannel, @@ -164,10 +166,30 @@ export class AppWindow { } ); - this.window.webContents.on(ElectronWebContentsChannel.DidFailLoad, () => { - this.window.webContents.openDevTools(); - this.window.show(); - }); + this.window.webContents.on( + ElectronWebContentsChannel.DidFailLoad, + ( + event: Event, + errorCode: number, + errorDescription: string, + validatedURL: string, + isMainFrame: boolean + ) => { + if ('ERR_FILE_NOT_FOUND' === errorDescription) { + this.load(); + return; + } + log.error( + ElectronWebContentsChannel.DidFailLoad, + event, + errorCode, + errorDescription, + validatedURL, + isMainFrame + ); + this.window.webContents.openDevTools(); + } + ); registerWindowStateChangedEvents(this.window); diff --git a/projects/ucap-webmessenger-app/src/app/app-routing.module.ts b/projects/ucap-webmessenger-app/src/app/app-routing.module.ts index 99fef86b..e27fc322 100644 --- a/projects/ucap-webmessenger-app/src/app/app-routing.module.ts +++ b/projects/ucap-webmessenger-app/src/app/app-routing.module.ts @@ -10,26 +10,26 @@ const routes: Routes = [ import('./pages/messenger/messenger.page.module').then( m => m.AppMessengerPageModule ), - canActivate: [AppAuthGuard], + canActivate: [AppAuthGuard] }, { path: 'account', loadChildren: () => import('./pages/account/account.page.module').then( m => m.AppAccountPageModule - ), + ) }, { path: 'template', loadChildren: () => import('./pages/template/template.page.module').then( m => m.AppTemplatePageModule - ), - }, + ) + } ]; @NgModule({ imports: [RouterModule.forRoot(routes, { enableTracing: false })], - exports: [RouterModule], + exports: [RouterModule] }) export class AppRoutingModule {} From aea898dea77f7c2f20fe0b21e6a36e5c2370e390 Mon Sep 17 00:00:00 2001 From: khk Date: Fri, 7 Feb 2020 14:13:56 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=EB=8C=80=ED=99=94=EB=B0=A9=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EB=B3=80=EA=B2=BD,=20=EB=8F=99=EC=98=81=EC=83=81?= =?UTF-8?q?=20=EB=AF=B8=EC=A7=80=EC=9B=90=20=EA=B0=80=EC=9D=B4=EC=9D=B4?= =?UTF-8?q?=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/messages.component.html | 2 +- .../right-drawer/album-box.component.html | 7 +- .../right-drawer/album-box.component.scss | 13 ++++ .../src/assets/scss/global/_default.scss | 13 +++- .../src/lib/components/search.component.html | 72 +++---------------- .../src/lib/components/search.component.scss | 26 ++++--- .../src/assets/scss/partials/_forms.scss | 12 +++- 7 files changed, 65 insertions(+), 80 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html index 04d87cf1..27f3229a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html @@ -154,7 +154,7 @@ > -