From d3a4864f470f6bcc1ea67fc87d4910e893d2fa4c Mon Sep 17 00:00:00 2001 From: jliddev Date: Fri, 12 Mar 2021 15:04:32 -0600 Subject: [PATCH] Fix grid related bugs Stop using deprecated table restore code for sorting Tweak cell padding for my addons Add more standard logging Add timing and response code logging for http calls --- wowup-electron/ipc-events.ts | 6 ++ .../addon-providers/wowup-addon-provider.ts | 2 +- .../cell-wrap-text.component.html | 2 +- .../components/footer/footer.component.html | 2 +- .../my-addons-addon-cell.component.html | 4 +- .../my-addons-addon-cell.component.scss | 4 +- .../default-headers.interceptor.ts | 26 +++-- .../pages/my-addons/my-addons.component.html | 2 +- .../pages/my-addons/my-addons.component.ts | 99 +++++++++++-------- .../src/app/services/addons/addon.service.ts | 57 ++++++----- .../services/wowup-api/wowup-api.service.ts | 3 +- .../app/services/wowup/wowup-addon.service.ts | 2 - .../src/app/services/wowup/wowup.service.ts | 51 +++++----- 13 files changed, 152 insertions(+), 108 deletions(-) diff --git a/wowup-electron/ipc-events.ts b/wowup-electron/ipc-events.ts index 2bf19153..81803dc8 100644 --- a/wowup-electron/ipc-events.ts +++ b/wowup-electron/ipc-events.ts @@ -116,6 +116,7 @@ export function initializeIpcHandlers(window: BrowserWindow): void { handle( IPC_CREATE_DIRECTORY_CHANNEL, async (evt, directoryPath: string): Promise => { + log.info(`[CreateDirectory] '${directoryPath}'`); await fs.ensureDir(directoryPath); return true; } @@ -304,12 +305,14 @@ export function initializeIpcHandlers(window: BrowserWindow): void { handle( IPC_COPY_FILE_CHANNEL, async (evt, arg: CopyFileRequest): Promise => { + log.info(`[FileCopy] '${arg.sourceFilePath}' -> '${arg.destinationFilePath}'`); await fs.copy(arg.sourceFilePath, arg.destinationFilePath); return true; } ); handle(IPC_DELETE_DIRECTORY_CHANNEL, async (evt, filePath: string) => { + log.info(`[FileRemove] ${filePath}`); await fs.remove(filePath); return true; @@ -361,11 +364,13 @@ export function initializeIpcHandlers(window: BrowserWindow): void { }); handle(IPC_RESTART_APP, () => { + log.info(`[RestartApp]`); app.relaunch(); app.quit(); }); handle(IPC_QUIT_APP, () => { + log.info(`[QuitApp]`); app.quit(); }); @@ -391,6 +396,7 @@ export function initializeIpcHandlers(window: BrowserWindow): void { async function handleDownloadFile(arg: DownloadRequest) { try { const savePath = path.join(arg.outputFolder, arg.fileName); + log.info(`[DownloadFile] '${arg.url}' -> '${savePath}'`); const { data, headers } = await axios({ url: arg.url, diff --git a/wowup-electron/src/app/addon-providers/wowup-addon-provider.ts b/wowup-electron/src/app/addon-providers/wowup-addon-provider.ts index 1a3c48ee..7dfd0888 100644 --- a/wowup-electron/src/app/addon-providers/wowup-addon-provider.ts +++ b/wowup-electron/src/app/addon-providers/wowup-addon-provider.ts @@ -172,7 +172,7 @@ export class WowUpAddonProvider extends AddonProvider { console.timeEnd("WowUpScan"); const fingerprints = scanResults.map((result) => result.fingerprint); - console.log("fingerprintRequest", JSON.stringify(fingerprints)); + console.log("[WowUpFingerprints]", JSON.stringify(fingerprints)); const fingerprintResponse = await this.getAddonsByFingerprints(fingerprints); for (const scanResult of scanResults) { diff --git a/wowup-electron/src/app/components/cell-wrap-text/cell-wrap-text.component.html b/wowup-electron/src/app/components/cell-wrap-text/cell-wrap-text.component.html index ae68fcc6..7e4e0eef 100644 --- a/wowup-electron/src/app/components/cell-wrap-text/cell-wrap-text.component.html +++ b/wowup-electron/src/app/components/cell-wrap-text/cell-wrap-text.component.html @@ -1,3 +1,3 @@ -
+
{{params.value}}
\ No newline at end of file diff --git a/wowup-electron/src/app/components/footer/footer.component.html b/wowup-electron/src/app/components/footer/footer.component.html index 161f18c9..459a8242 100644 --- a/wowup-electron/src/app/components/footer/footer.component.html +++ b/wowup-electron/src/app/components/footer/footer.component.html @@ -1,4 +1,4 @@ -