From 171b6f924acc7d7696f4f850a704af0baf616b87 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Thu, 11 Jul 2024 18:06:41 +0200 Subject: [PATCH] feat: custom SVG icons for connections, closes #663 --- src/main/ipc-handlers/application.ts | 4 +- src/renderer/components/BaseIcon.vue | 27 +++++- .../components/ModalAllConnections.vue | 4 + .../components/ModalConnectionAppearance.vue | 92 ++++++++++++++++--- .../components/ModalSettingsDataExport.vue | 5 +- .../components/ModalSettingsDataImport.vue | 3 +- .../components/SettingBarConnections.vue | 1 + .../SettingBarConnectionsFolder.vue | 1 + src/renderer/components/WorkspaceTabQuery.vue | 4 +- src/renderer/i18n/en-US.ts | 4 +- src/renderer/ipc-api/Application.ts | 4 +- src/renderer/stores/connections.ts | 42 ++++++++- 12 files changed, 165 insertions(+), 26 deletions(-) diff --git a/src/main/ipc-handlers/application.ts b/src/main/ipc-handlers/application.ts index 1cba4057..ad0ec84e 100644 --- a/src/main/ipc-handlers/application.ts +++ b/src/main/ipc-handlers/application.ts @@ -87,10 +87,10 @@ export default () => { shortCutRegister.unregister(); }); - ipcMain.handle('read-file', (event, filePath) => { + ipcMain.handle('read-file', (event, { filePath, encoding }) => { if (!validateSender(event.senderFrame)) return { status: 'error', response: 'Unauthorized process' }; try { - const content = fs.readFileSync(filePath, 'utf-8'); + const content = fs.readFileSync(filePath, encoding); return content; } catch (error) { diff --git a/src/renderer/components/BaseIcon.vue b/src/renderer/components/BaseIcon.vue index 2ab80780..53c83d4b 100644 --- a/src/renderer/components/BaseIcon.vue +++ b/src/renderer/components/BaseIcon.vue @@ -1,11 +1,19 @@