From 0d10a93bf89820ec34e815417cd93f7b55a8da5a Mon Sep 17 00:00:00 2001 From: Fabio Date: Thu, 18 Jun 2020 19:01:09 +0200 Subject: [PATCH] Improvements to query table --- CHANGELOG.md | 7 +++ build/icon.png | Bin 0 -> 12915 bytes package-lock.json | 5 ++ package.json | 4 +- src/common/libs/hexToBinary.js | 40 ++++++++++++ src/common/libs/utilities.js | 56 +++++++++++++++++ src/main/index.js | 9 +++ src/renderer/components/Workspace.vue | 1 + .../components/WorkspaceQueryTable.vue | 57 ++++++++++++++---- src/renderer/scss/_data-types.scss | 37 +++++++++--- 10 files changed, 194 insertions(+), 22 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 build/icon.png create mode 100644 src/common/libs/hexToBinary.js diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..00d5d9dd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +## [0.0.1-alpha]() - Coming Soon + +### Features + +- **Initial release:** diff --git a/build/icon.png b/build/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9ce8a7fa4e54da2c47fe5580ec244005f9ad6ad4 GIT binary patch literal 12915 zcmd6OWmH^G)91`ExVyvP1RdOAa0nVmNN~3hoCJr#A!vZ$fk6Yo-JM{;-8DgiyTkH- z-}iZUKkTz-zwO?0&$-?AR8?13|8946b=?R}bwz9p3Jd@MfUT?~rv(52pNl{M8p`v- zz@^aY`9ba`|ISU@(aO!;)Ws4YZQ*EU2~oB;wYJo6#%ZfEHRF|)L`b&#MxYHp{8*jh-?zZFn}syWG8+Sn?2 zxmap@slPV&vNIR4pqG+_hE=J?S~g8o_4|LlUj(|?O~aQ!bcJsXVM!_R@iEEGI$# zEP>0`)zF2GkX3h{x@u&EB_6AONVE)yFA0XW~pEq0N~nImXm(%v9Rxpo?@W*@v!KJ zw_`b<#AGh{LDFyeI!j8*-%LgoYFJj4Ko&BYa9R_O9x#ov(&=eNa9qf5bIjP}qc5ly zrjh7$y&rg*fs_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cn(dOxU^yC}cA?Z8yPSn46ThLB{2ZpmZK(uX#TIXNdho zai~Ttg>QYl6RxBO>cpJk^*&(-@y#Y1unZP&&spJcZ##?gfhg5=|KS_@c+s)95DNM$Ihk zSX!~sM-H&g(8Shs|GlOwke>ld@&FBRa_xD_zRn#qKH_u+wF6 zr4p|Jh6w}7?5WaU5m6^VB=CO#0-3D} literal 0 HcmV?d00001 diff --git a/package-lock.json b/package-lock.json index 8f10a602..68b99f96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8475,6 +8475,11 @@ "minimist": "^1.2.5" } }, + "moment": { + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.26.0.tgz", + "integrity": "sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", diff --git a/package.json b/package.json index 86f2d2be..8a99e09e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "dev": "cross-env NODE_ENV=development electron-webpack dev", "compile": "electron-webpack", "dist": "cross-env NODE_ENV=production npm run compile && electron-builder", - "dist:dir": "cross-env NODE_ENV=production npm run dist --dir -c.compression=store -c.mac.identity=null" + "dist:dir": "cross-env NODE_ENV=production npm run dist --dir -c.compression=store -c.mac.identity=null", + "publish": "build -p always" }, "author": "Fabio Di Stasio ", "build": { @@ -33,6 +34,7 @@ "electron-updater": "^4.3.1", "lodash": "^4.17.15", "material-design-icons": "^3.0.1", + "moment": "^2.26.0", "mssql": "^6.2.0", "mysql": "^2.18.1", "pg": "^8.2.1", diff --git a/src/common/libs/hexToBinary.js b/src/common/libs/hexToBinary.js new file mode 100644 index 00000000..38c59e5d --- /dev/null +++ b/src/common/libs/hexToBinary.js @@ -0,0 +1,40 @@ +'use strict'; + +const lookup = { + 0: '0000', + 1: '0001', + 2: '0010', + 3: '0011', + 4: '0100', + 5: '0101', + 6: '0110', + 7: '0111', + 8: '1000', + 9: '1001', + a: '1010', + b: '1011', + c: '1100', + d: '1101', + e: '1110', + f: '1111', + A: '1010', + B: '1011', + C: '1100', + D: '1101', + E: '1110', + F: '1111' +}; + +/** + * Converts hexadecimal string to binary string + * + * @param {string} hex Hexadecimal string + * @returns {string} Binary string + */ +export default function hexToBinary (hex) { + let binary = ''; + for (let i = 0, len = hex.length; i < len; i++) + binary += lookup[hex[i]]; + + return binary; +} diff --git a/src/common/libs/utilities.js b/src/common/libs/utilities.js index 54c27ebb..7742d20b 100644 --- a/src/common/libs/utilities.js +++ b/src/common/libs/utilities.js @@ -1,3 +1,59 @@ export function uidGen () { return Math.random().toString(36).substr(2, 9).toUpperCase(); }; + +export function mimeFromHex (hex) { + switch (hex.substring(0, 4)) { // 2 bytes + case '424D': + return { ext: 'bmp', mime: 'image/bmp' }; + case '1F8B': + return { ext: 'gz', mime: 'application/gzip' }; + case '0B77': + return { ext: 'ac3', mime: 'audio/vnd.dolby.dd-raw' }; + case '7801': + return { ext: 'dmg', mime: 'application/x-apple-diskimage' }; + case '4D5A': + return { ext: 'exe', mime: 'application/x-msdownload' }; + case '1FA0': + case '1F9D': + return { ext: 'Z', mime: 'application/x-compress' }; + default: + switch (hex.substring(0, 6)) { // 3 bytes + case 'FFD8FF': + return { ext: 'jpj', mime: 'image/jpeg' }; + case '4949BC': + return { ext: 'jxr', mime: 'image/vnd.ms-photo' }; + case '425A68': + return { ext: 'bz2', mime: 'application/x-bzip2' }; + default: + switch (hex) { // 4 bites + case '89504E47': + return { ext: 'png', mime: 'image/png' }; + case '47494638': + return { ext: 'gif', mime: 'image/gif' }; + case '25504446': + return { ext: 'pdf', mime: 'application/pdf' }; + case '504B0304': + return { ext: 'zip', mime: 'application/zip' }; + case '425047FB': + return { ext: 'bpg', mime: 'image/bpg' }; + case '4D4D002A': + return { ext: 'tif', mime: 'image/tiff' }; + default: + return { ext: '???', mime: 'unknown ' + hex }; + } + } + } +}; + +export function formatBytes (bytes, decimals = 2) { + if (bytes === 0) return '0 Bytes'; + + const k = 1024; + const dm = decimals < 0 ? 0 : decimals; + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + + const i = Math.floor(Math.log(bytes) / Math.log(k)); + + return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; +} diff --git a/src/main/index.js b/src/main/index.js index 85988a1a..b87c0cb2 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -94,10 +94,19 @@ app.on('ready', () => { }); // auto-updater events +autoUpdater.on('checking-for-update', () => { +}); + autoUpdater.on('update-available', () => { mainWindow.webContents.send('update_available'); }); +autoUpdater.on('update-not-available', () => { +}); + +autoUpdater.on('download-progress', (progressObj) => { +}); + autoUpdater.on('update-downloaded', () => { mainWindow.webContents.send('update_downloaded'); }); diff --git a/src/renderer/components/Workspace.vue b/src/renderer/components/Workspace.vue index fae523ce..52ad4bd8 100644 --- a/src/renderer/components/Workspace.vue +++ b/src/renderer/components/Workspace.vue @@ -151,6 +151,7 @@ export default { background: $bg-color; border: 1px solid; border-left: none; + border-bottom-width: 2px; border-color: $bg-color-light; padding: .1rem .4rem; font-weight: 700; diff --git a/src/renderer/components/WorkspaceQueryTable.vue b/src/renderer/components/WorkspaceQueryTable.vue index 813e04f8..81c43c23 100644 --- a/src/renderer/components/WorkspaceQueryTable.vue +++ b/src/renderer/components/WorkspaceQueryTable.vue @@ -38,11 +38,11 @@ v-for="(col, cKey) in row" :key="cKey" class="td" - :class="fieldType(col)" - :style="{'display': cKey === '_id'? 'none' : ''}" + :class="`type-${fieldType(cKey)}${isNull(col)}`" + :style="{'display': cKey === '_id' ? 'none' : ''}" tabindex="0" > - {{ col }} + {{ col | typeFormat(fieldType(cKey)) }} @@ -52,7 +52,9 @@