From 44f07693c238c1622dc8d31233073581d1e40a44 Mon Sep 17 00:00:00 2001 From: Breno Polanski Date: Tue, 11 Feb 2020 20:20:48 -0300 Subject: [PATCH 01/29] fix: background and avatar modal labels (#1665) * fix: translate the keypath values of the background and avatars selections * test: add strings mixins --- .../unit/components/Selection/SelectionBackground.spec.js | 4 +++- src/renderer/components/Selection/mixin-selection-image.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/__tests__/unit/components/Selection/SelectionBackground.spec.js b/__tests__/unit/components/Selection/SelectionBackground.spec.js index 7819f0ca81..52f9b721f5 100644 --- a/__tests__/unit/components/Selection/SelectionBackground.spec.js +++ b/__tests__/unit/components/Selection/SelectionBackground.spec.js @@ -1,6 +1,7 @@ import { shallowMount } from '@vue/test-utils' import { useI18nGlobally } from '../../__utils__/i18n' import { SelectionBackground } from '@/components/Selection' +import StringsMixin from '@/mixins/strings' const i18n = useI18nGlobally() @@ -8,7 +9,8 @@ describe('SelectionBackground', () => { describe('SelectionBackground', () => { it('should render the component', () => { const wrapper = shallowMount(SelectionBackground, { - i18n + i18n, + mixins: [StringsMixin] }) expect(wrapper.contains('.SelectionBackgroundGrid')).toBeTruthy() diff --git a/src/renderer/components/Selection/mixin-selection-image.js b/src/renderer/components/Selection/mixin-selection-image.js index 639ac1c8c8..8fea32a2f3 100644 --- a/src/renderer/components/Selection/mixin-selection-image.js +++ b/src/renderer/components/Selection/mixin-selection-image.js @@ -16,7 +16,7 @@ export default { * the image path and its filename as title. */ images () { - const componentName = this.$options.name.toUpperCase().replace(' ', '_') + const componentName = this.strings_snakeCase(this.$options.name).toUpperCase() const groups = imageManager.tree return this.categories.reduce((all, category) => { From 538f0e1f63fa714975cc015b0f9aafde3c28ca2c Mon Sep 17 00:00:00 2001 From: Davi Figueiredo Date: Tue, 11 Feb 2020 15:48:27 -0800 Subject: [PATCH 02/29] fix: remove mouse up trigger of modal close (#1653) * fix: change click to mousedown on modalwindow * test: added tests for mousedown events on modal * fix: prevents additional rightclick to fires mousedown Co-authored-by: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> --- .../unit/components/Modal/ModalWindow.spec.js | 31 ++++++++++++++++--- src/renderer/components/Modal/ModalWindow.vue | 28 ++++++++--------- 2 files changed, 40 insertions(+), 19 deletions(-) diff --git a/__tests__/unit/components/Modal/ModalWindow.spec.js b/__tests__/unit/components/Modal/ModalWindow.spec.js index b0e63d8375..969c78a305 100644 --- a/__tests__/unit/components/Modal/ModalWindow.spec.js +++ b/__tests__/unit/components/Modal/ModalWindow.spec.js @@ -71,17 +71,40 @@ describe('ModalWindow', () => { expect(wrapper.emitted('close')).toBeTruthy() }) - it('should emit a close event when clicks the mask', () => { + it('should not close when clicking inside the modal', () => { + const wrapper = mount(ModalWindow, { stubs }) + const modal = wrapper.find('.ModalWindow__container') + modal.trigger('click') + expect(wrapper.emitted('close')).toBeFalsy() + }) + + it('should not close when mousedown inside the modal', () => { + const wrapper = mount(ModalWindow, { stubs }) + const modal = wrapper.find('.ModalWindow__container') + modal.trigger('mousedown') + expect(wrapper.emitted('close')).toBeFalsy() + }) + + it('should close when firing mousedown inside the mask', () => { const wrapper = mount(ModalWindow, { stubs }) const mask = wrapper.find('.ModalWindow') - mask.trigger('click') + mask.trigger('mousedown') expect(wrapper.emitted('close')).toBeTruthy() }) - it('should not close when pressing inside the modal', () => { + it('should not close event when firing mouseup only inside the mask', () => { + const wrapper = mount(ModalWindow, { stubs }) + const mask = wrapper.find('.ModalWindow') + mask.trigger('mouseup') + expect(wrapper.emitted('close')).toBeFalsy() + }) + + it('should not close event when firing mousedown inside the container and mouseup inside the wrapper', () => { const wrapper = mount(ModalWindow, { stubs }) const modal = wrapper.find('.ModalWindow__container') - modal.trigger('click') + const mask = wrapper.find('.ModalWindow') + modal.trigger('mousedown') + mask.trigger('mouseup') expect(wrapper.emitted('close')).toBeFalsy() }) }) diff --git a/src/renderer/components/Modal/ModalWindow.vue b/src/renderer/components/Modal/ModalWindow.vue index 138137825e..d1ef85f1b1 100644 --- a/src/renderer/components/Modal/ModalWindow.vue +++ b/src/renderer/components/Modal/ModalWindow.vue @@ -1,7 +1,5 @@ diff --git a/src/renderer/i18n/locales/en-US.js b/src/renderer/i18n/locales/en-US.js index 2eaac8ff3e..1ee3ac8484 100644 --- a/src/renderer/i18n/locales/en-US.js +++ b/src/renderer/i18n/locales/en-US.js @@ -658,7 +658,7 @@ export default { ALL: 'All', GAMING: 'Gaming', UTILITY: 'Utility', - THEME: 'Theme', + THEME: 'Themes', OTHER: 'Other' }, FILTERS: { diff --git a/src/renderer/services/plugin-manager.js b/src/renderer/services/plugin-manager.js index c446c27740..6125fdbe33 100644 --- a/src/renderer/services/plugin-manager.js +++ b/src/renderer/services/plugin-manager.js @@ -206,7 +206,9 @@ export class PluginManager { try { plugin.logo = await this.fetchLogo(plugin.logo) - } catch (error) { } + } catch (error) { + plugin.logo = null + } const validName = validatePackageName(plugin.id).validForNewPackages if (!validName) { diff --git a/src/renderer/store/modules/plugin.js b/src/renderer/store/modules/plugin.js index a7b8d96acb..7b5b775cf3 100644 --- a/src/renderer/store/modules/plugin.js +++ b/src/renderer/store/modules/plugin.js @@ -44,7 +44,9 @@ export default { let match = true - if (category && category !== 'all') { + if (category === 'all') { + match = match && !plugin.config.categories.includes('theme') + } else if (category && category !== 'all') { match = match && plugin.config.categories.includes(category) } From 2dbcd91586e2df9bdc54f77b32065007bc2280f6 Mon Sep 17 00:00:00 2001 From: Edgar Goetzendorff Date: Tue, 18 Feb 2020 21:42:31 +0100 Subject: [PATCH 12/29] fix: max recipients validation error and count list (#1662) * fix: off by one error in recipients validation * feat: add count to InputEditableList component * test: adjust unit tests * feat: show of public keys in multi signature registration form * fix: add right padding to payment row so that its not covered by close button * tests: add unit tests for title including count Co-authored-by: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> --- .../Input/InputEditableList.spec.js | 49 +++++++++++++++++-- .../TransactionFormMultiPayment.spec.js | 8 +-- .../components/Input/InputEditableList.vue | 14 +++++- .../TransactionFormMultiPayment.vue | 11 ++++- .../TransactionFormMultiSignature.vue | 1 + .../TransactionMultiPaymentList.vue | 20 +++++++- .../TransactionMultiSignatureList.vue | 7 +++ 7 files changed, 96 insertions(+), 14 deletions(-) diff --git a/__tests__/unit/components/Input/InputEditableList.spec.js b/__tests__/unit/components/Input/InputEditableList.spec.js index 061dd5718b..2b8cc0f5d1 100644 --- a/__tests__/unit/components/Input/InputEditableList.spec.js +++ b/__tests__/unit/components/Input/InputEditableList.spec.js @@ -28,13 +28,52 @@ describe('InputEditableList', () => { expect(wrapper.contains('.InputEditableList')).toBe(true) }) - it('should show title', () => { - createWrapper(null, { - value: [], - title: 'Test List' + describe('title', () => { + it('should show title', () => { + createWrapper(null, { + value: [], + title: 'Test List' + }) + + expect(wrapper.find('.InputField__label').text()).toBe('Test List') + }) + + it('should show title including the item count', () => { + createWrapper(null, { + value: [ + 'test item 1', + 'test item 2' + ], + title: 'Test List', + showCount: true + }) + + expect(wrapper.find('.InputField__label').text()).toBe('Test List - 2') }) - expect(wrapper.find('.InputField__label').text()).toBe('Test List') + it('should not show the item count if there are zero items', () => { + createWrapper(null, { + value: [], + title: 'Test List', + showCount: true + }) + + expect(wrapper.find('.InputField__label').text()).toBe('Test List') + }) + + it('should show title including the item count and maximum allowed count', () => { + createWrapper(null, { + value: [ + 'test item 1', + 'test item 2' + ], + title: 'Test List', + showCount: true, + maxItems: 3 + }) + + expect(wrapper.find('.InputField__label').text()).toBe('Test List - 2 / 3') + }) }) it('should list each item', () => { diff --git a/__tests__/unit/components/Transaction/TransactionForm/TransactionFormMultiPayment.spec.js b/__tests__/unit/components/Transaction/TransactionForm/TransactionFormMultiPayment.spec.js index 132f7ed3b4..377b9cd395 100644 --- a/__tests__/unit/components/Transaction/TransactionForm/TransactionFormMultiPayment.spec.js +++ b/__tests__/unit/components/Transaction/TransactionForm/TransactionFormMultiPayment.spec.js @@ -912,7 +912,7 @@ describe('TransactionFormMultiPayment', () => { expect(wrapper.vm.$v.form.recipients.aboveMinimum).toBe(true) }) - it('should not be below maximum if too many', () => { + it('should not be below or equal to maximum if too many', () => { const network = { ...cloneDeep(globalNetwork), constants: { @@ -933,16 +933,16 @@ describe('TransactionFormMultiPayment', () => { amount: 10 }] - expect(wrapper.vm.$v.form.recipients.belowMaximum).toBe(false) + expect(wrapper.vm.$v.form.recipients.belowOrEqualMaximum).toBe(false) }) - it('should be above minimum if set', () => { + it('should be below or equal to maximum if set', () => { wrapper.vm.$v.form.recipients.$model = [{ address: 'address-1', amount: 10 }] - expect(wrapper.vm.$v.form.recipients.belowMaximum).toBe(true) + expect(wrapper.vm.$v.form.recipients.belowOrEqualMaximum).toBe(true) }) }) }) diff --git a/src/renderer/components/Input/InputEditableList.vue b/src/renderer/components/Input/InputEditableList.vue index 13361c9be6..bdd1b88cb3 100644 --- a/src/renderer/components/Input/InputEditableList.vue +++ b/src/renderer/components/Input/InputEditableList.vue @@ -10,7 +10,7 @@ v-show="title" class="InputField__label absolute pointer-events-none text-theme-page-text-light truncate" > - {{ title }} + {{ title }} - {{ items.length }} / {{ maxItems }} @@ -64,6 +64,18 @@ export default { default: null }, + showCount: { + type: Boolean, + required: false, + default: false + }, + + maxItems: { + type: Number, + required: false, + default: null + }, + value: { type: Array, required: true diff --git a/src/renderer/components/Transaction/TransactionForm/TransactionFormMultiPayment.vue b/src/renderer/components/Transaction/TransactionForm/TransactionFormMultiPayment.vue index ba54f933d0..e508a4f0fa 100644 --- a/src/renderer/components/Transaction/TransactionForm/TransactionFormMultiPayment.vue +++ b/src/renderer/components/Transaction/TransactionForm/TransactionFormMultiPayment.vue @@ -63,6 +63,9 @@ this.maximumRecipients + }, + // Customize the message to display the minimum amount as subunit amountTooLowError () { const { fractionDigits } = this.walletNetwork @@ -416,8 +423,8 @@ export default { return this.form.recipients.length > 1 }, - belowMaximum () { - return this.form.recipients.length < this.maximumRecipients + belowOrEqualMaximum () { + return this.form.recipients.length <= this.maximumRecipients } }, fee: mixin.validators.fee, diff --git a/src/renderer/components/Transaction/TransactionForm/TransactionFormMultiSignature.vue b/src/renderer/components/Transaction/TransactionForm/TransactionFormMultiSignature.vue index e046f61e8d..0989f1d116 100644 --- a/src/renderer/components/Transaction/TransactionForm/TransactionFormMultiSignature.vue +++ b/src/renderer/components/Transaction/TransactionForm/TransactionFormMultiSignature.vue @@ -79,6 +79,7 @@ diff --git a/src/renderer/components/Transaction/TransactionMultiPaymentList.vue b/src/renderer/components/Transaction/TransactionMultiPaymentList.vue index c502b4577e..b33d94303b 100644 --- a/src/renderer/components/Transaction/TransactionMultiPaymentList.vue +++ b/src/renderer/components/Transaction/TransactionMultiPaymentList.vue @@ -2,6 +2,8 @@ -
+
{{ $t('TRANSACTION.RECIPIENT') }}: @@ -62,7 +64,9 @@ export default { title: { type: String, required: false, - default: 'Recipients' + default: function () { + return this.$t('TRANSACTION.MULTI_PAYMENT.RECIPIENTS') + } }, items: { @@ -70,6 +74,18 @@ export default { required: true }, + maxItems: { + type: Number, + required: false, + default: null + }, + + showCount: { + type: Boolean, + required: false, + default: false + }, + readonly: { type: Boolean, required: false, diff --git a/src/renderer/components/Transaction/TransactionMultiSignatureList.vue b/src/renderer/components/Transaction/TransactionMultiSignatureList.vue index 1826fb41a1..129cbd5c1e 100644 --- a/src/renderer/components/Transaction/TransactionMultiSignatureList.vue +++ b/src/renderer/components/Transaction/TransactionMultiSignatureList.vue @@ -2,6 +2,7 @@ Date: Tue, 18 Feb 2020 22:10:57 +0100 Subject: [PATCH 13/29] fix: wallet sidebar sort by balance (#1659) * fix: user custom sort function to sort by balance * test: adjust unit tests Co-authored-by: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> --- .../components/Wallet/WalletSidebar.spec.js | 34 +++++++++---------- .../Wallet/WalletSidebar/WalletSidebar.vue | 5 +-- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/__tests__/unit/components/Wallet/WalletSidebar.spec.js b/__tests__/unit/components/Wallet/WalletSidebar.spec.js index 8edc453dfa..20a3a08b6a 100644 --- a/__tests__/unit/components/Wallet/WalletSidebar.spec.js +++ b/__tests__/unit/components/Wallet/WalletSidebar.spec.js @@ -47,16 +47,16 @@ describe('WalletSidebar', () => { describe('filterWallets', () => { const wallets = [ - { address: 'A1', isLedger: false, balance: 23 }, - { address: 'A2', isLedger: false, balance: 22 } + { address: 'A1', isLedger: false, balance: '23' }, + { address: 'A2', isLedger: false, balance: '22' } ] const ledgerWallets = [ - { address: 'Aledger1', isLedger: true, balance: 10 }, - { address: 'Aledger2', isLedger: true, balance: 12 } + { address: 'Aledger1', isLedger: true, balance: '10' }, + { address: 'Aledger2', isLedger: true, balance: '12' } ] const emptyWallets = [ - { address: 'A3', isLedger: false, balance: 0 }, - { address: 'Aledger3', isLedger: true, balance: 0 } + { address: 'A3', isLedger: false, balance: '0' }, + { address: 'Aledger3', isLedger: true, balance: '0' } ] const allWallets = [ ...wallets, @@ -126,9 +126,9 @@ describe('WalletSidebar', () => { describe('when a search query (`searchQuery`) is passed', () => { const wallets = [ - { address: 'A1xd', name: 'example', balance: 132.23 }, - { address: 'A2xd', name: 'name', balance: 13 }, - { address: 'A3dx', name: 'other', balance: 937 } + { address: 'A1xd', name: 'example', balance: '13223' }, + { address: 'A2xd', name: 'name', balance: '13' }, + { address: 'A3dx', name: 'other', balance: '937' } ] let wrapper @@ -215,10 +215,10 @@ describe('WalletSidebar', () => { describe('sortWallets', () => { const wallets = [ - { address: 'AA', name: 'example', balance: 132.23 }, - { address: 'AD', name: '', balance: 0 }, - { address: 'AB', name: 'name', balance: 13 }, - { address: 'AC', name: 'other', balance: 937 } + { address: 'AA', name: 'example', balance: '132' }, + { address: 'AD', name: '', balance: '0' }, + { address: 'AB', name: 'name', balance: '13' }, + { address: 'AC', name: 'other', balance: '937' } ] let wrapper @@ -235,7 +235,7 @@ describe('WalletSidebar', () => { it('should sort the wallets by name ascendently', () => { wrapper.vm.applySortOrder({ field: 'name', type: 'asc' }) - expect(wrapper.vm.sortWallets(wallets)).toEqual([ + expect(wrapper.vm.sortWallets(wallets.slice())).toEqual([ wallets[1], wallets[0], wallets[2], @@ -252,7 +252,7 @@ describe('WalletSidebar', () => { it('should sort the wallets by name descendently', () => { wrapper.vm.applySortOrder({ field: 'name', type: 'desc' }) - expect(wrapper.vm.sortWallets(wallets)).toEqual([ + expect(wrapper.vm.sortWallets(wallets.slice())).toEqual([ wallets[3], wallets[2], wallets[0], @@ -269,7 +269,7 @@ describe('WalletSidebar', () => { it('should sort the wallets by balance ascendently', () => { wrapper.vm.applySortOrder({ field: 'balance', type: 'asc' }) - expect(wrapper.vm.sortWallets(wallets)).toEqual([ + expect(wrapper.vm.sortWallets(wallets.slice())).toEqual([ wallets[1], wallets[2], wallets[0], @@ -286,7 +286,7 @@ describe('WalletSidebar', () => { it('should sort the wallets by balance descendently', () => { wrapper.vm.applySortOrder({ field: 'balance', type: 'desc' }) - expect(wrapper.vm.sortWallets(wallets)).toEqual([ + expect(wrapper.vm.sortWallets(wallets.slice())).toEqual([ wallets[3], wallets[0], wallets[2], diff --git a/src/renderer/components/Wallet/WalletSidebar/WalletSidebar.vue b/src/renderer/components/Wallet/WalletSidebar/WalletSidebar.vue index 18e11e1afe..e5b2a039fd 100644 --- a/src/renderer/components/Wallet/WalletSidebar/WalletSidebar.vue +++ b/src/renderer/components/Wallet/WalletSidebar/WalletSidebar.vue @@ -204,7 +204,8 @@ - - + + diff --git a/src/main/index.js b/src/main/index.js index 88856b8f3a..97c4b94b31 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -14,7 +14,9 @@ require('electron-log') * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html */ if (process.env.NODE_ENV !== 'development') { - global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\') + global.__static = require('path') + .join(__dirname, '/static') + .replace(/\\/g, '\\\\') } // To E2E tests @@ -25,11 +27,39 @@ if (process.env.TEMP_USER_DATA === 'true') { } let mainWindow = null +let loadingWindow = null let deeplinkingUrl = null -const winURL = process.env.NODE_ENV === 'development' - ? 'http://localhost:9080' - : `file://${__dirname}/index.html` +const winURL = + process.env.NODE_ENV === 'development' + ? 'http://localhost:9080' + : `file://${__dirname}/index.html` + +const loadingURL = + process.env.NODE_ENV === 'development' + ? 'http://localhost:9080/splashscreen.html' + : `file://${__dirname}/splashscreen.html` + +const createLoadingWindow = () => { + loadingWindow = new BrowserWindow({ + width: 800, + height: 600, + parent: mainWindow, + skipTaskbar: true, + frame: false, + autoHideMenuBar: true, + resizable: false, + webPreferences: { + nodeIntegration: true + } + }) + loadingWindow.setResizable(false) + loadingWindow.loadURL(loadingURL) + loadingWindow.show() + loadingWindow.on('close', () => (loadingWindow = null)) + loadingWindow.on('closed', () => (loadingWindow = null)) + loadingWindow.webContents.on('did-finish-load', () => loadingWindow.show()) +} function createWindow () { const { width, height } = screen.getPrimaryDisplay().workAreaSize @@ -52,29 +82,42 @@ function createWindow () { } }) + // The `mainWindow.show()` is executed after the opening splash screen + ipcMain.on('splashscreen:app-ready', () => { + if (loadingWindow) { + loadingWindow.close() + } + mainWindow.show() + }) + ipcMain.on('disable-iframe-protection', function (_event, urls) { const filter = { urls } - mainWindow.webContents.session.webRequest.onHeadersReceived(filter, (details, done) => { - const headers = details.responseHeaders - - const xFrameOrigin = Object.keys(headers).find(header => header.toString().match(/^x-frame-options$/i)) - if (xFrameOrigin) { - delete headers[xFrameOrigin] + mainWindow.webContents.session.webRequest.onHeadersReceived( + filter, + (details, done) => { + const headers = details.responseHeaders + + const xFrameOrigin = Object.keys(headers).find(header => + header.toString().match(/^x-frame-options$/i) + ) + if (xFrameOrigin) { + delete headers[xFrameOrigin] + } + + done({ + cancel: false, + responseHeaders: headers, + statusLine: details.statusLine + }) } - - done({ cancel: false, responseHeaders: headers, statusLine: details.statusLine }) - }) + ) }) windowState.manage(mainWindow) mainWindow.loadURL(winURL) - mainWindow.once('ready-to-show', () => { - mainWindow.show() - }) - mainWindow.on('closed', () => { - mainWindow = null - }) + mainWindow.on('close', () => (mainWindow = null)) + mainWindow.on('closed', () => (mainWindow = null)) mainWindow.webContents.on('did-finish-load', () => { const name = packageJson.build.productName @@ -142,6 +185,7 @@ if (!gotTheLock) { } app.on('ready', () => { + createLoadingWindow() createWindow() setupPluginManager({ sendToWindow, mainWindow, ipcMain }) setupUpdater({ sendToWindow, ipcMain }) @@ -155,6 +199,7 @@ app.on('window-all-closed', () => { app.on('activate', () => { if (mainWindow === null) { + createLoadingWindow() createWindow() } }) diff --git a/src/main/splashscreen.js b/src/main/splashscreen.js new file mode 100644 index 0000000000..7dbe10cd8a --- /dev/null +++ b/src/main/splashscreen.js @@ -0,0 +1,32 @@ +import { BrowserWindow, ipcMain } from 'electron' + +const url = process.env.NODE_ENV === 'development' + ? 'http://localhost:9080/splashscreen.html' + : `file://${__dirname}/splashscreen.html` + +export const splashScreenWindow = mainWindow => { + const splashScreen = new BrowserWindow({ + width: 800, + height: 600, + parent: mainWindow, + skipTaskbar: true, + frame: false, + autoHideMenuBar: true, + resizable: false, + webPreferences: { + nodeIntegration: true + } + }) + + splashScreen.loadURL(url) + splashScreen.show() + + const hideSplashScreen = () => { + setTimeout(() => splashScreen.destroy(), 500) + mainWindow.show() + } + + ipcMain.on('splashscreen:app-ready', hideSplashScreen) + + return hideSplashScreen +} diff --git a/src/renderer/App.vue b/src/renderer/App.vue index 9e9b2379e7..2cea230ee0 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -338,6 +338,8 @@ export default { }) await Promise.all([this.$plugins.fetchPluginsFromAdapter(), this.$plugins.fetchBlacklist(), this.$plugins.fetchWhitelist()]) + + ipcRenderer.send('splashscreen:app-ready') }, onPortalChange (portal, isActive) { diff --git a/src/renderer/SplashScreen.vue b/src/renderer/SplashScreen.vue new file mode 100644 index 0000000000..d851d3f5a3 --- /dev/null +++ b/src/renderer/SplashScreen.vue @@ -0,0 +1,79 @@ + + + diff --git a/src/renderer/i18n/locales/en-US.js b/src/renderer/i18n/locales/en-US.js index 3a4351a0f7..54e9e8f104 100644 --- a/src/renderer/i18n/locales/en-US.js +++ b/src/renderer/i18n/locales/en-US.js @@ -24,6 +24,7 @@ export default { FINISH: 'Finish', HIDE_WALLET_BUTTON_TEXT: 'Hide text from wallet buttons', IS_MARKET_CHART_ENABLED: 'Price chart on the dashboard', + INITIALIZING: 'Initializing...', LANGUAGE: 'Application Language', LEDGER: 'Ledger', LEDGER_WALLET: 'This is a Ledger wallet', diff --git a/src/renderer/splashscreen.js b/src/renderer/splashscreen.js new file mode 100644 index 0000000000..ae60e6b847 --- /dev/null +++ b/src/renderer/splashscreen.js @@ -0,0 +1,13 @@ +import Vue from 'vue' + +import SplashScreen from './SplashScreen.vue' +import i18n from './i18n' + +Vue.config.productionTip = false + +/* eslint-disable no-new */ +new Vue({ + components: { SplashScreen }, + i18n, + template: '' +}).$mount('#splashscreen') diff --git a/src/splashscreen.ejs b/src/splashscreen.ejs new file mode 100644 index 0000000000..8f83579821 --- /dev/null +++ b/src/splashscreen.ejs @@ -0,0 +1,22 @@ + + + + + ARK Desktop Wallet + <% if (htmlWebpackPlugin.options.nodeModules) { %> + + + <% } %> + + +
+ + + + + + From 0c42a6f3f6b1373a6c831dc827b46caa19b8f5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=BAcio=20Rubens?= <4539235+luciorubeens@users.noreply.github.com> Date: Thu, 20 Feb 2020 15:14:51 -0300 Subject: [PATCH 24/29] chore: bump version to 2.8.1 (#1689) --- .github/workflows/test.yml | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c541a796f..0a49353e8c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,20 +89,20 @@ jobs: # - name: Upload .AppImage # uses: actions/upload-artifact@master # with: - # name: ark-desktop-wallet-linux-2.8.0.AppImage - # path: build/target/ark-desktop-wallet-linux-x86_64-2.8.0.AppImage + # name: ark-desktop-wallet-linux-2.8.1.AppImage + # path: build/target/ark-desktop-wallet-linux-x86_64-2.8.1.AppImage # - name: Upload .tar.gz # uses: actions/upload-artifact@master # with: - # name: ark-desktop-wallet-linux-2.8.0.tar.gz - # path: build/target/ark-desktop-wallet-linux-x64-2.8.0.tar.gz + # name: ark-desktop-wallet-linux-2.8.1.tar.gz + # path: build/target/ark-desktop-wallet-linux-x64-2.8.1.tar.gz - name: Upload .deb uses: actions/upload-artifact@master with: - name: ark-desktop-wallet-linux-2.8.0-${{ github.sha }}.deb - path: build/target/ark-desktop-wallet-linux-amd64-2.8.0.deb + name: ark-desktop-wallet-linux-2.8.1-${{ github.sha }}.deb + path: build/target/ark-desktop-wallet-linux-amd64-2.8.1.deb build-macOS: runs-on: macOS-latest @@ -135,14 +135,14 @@ jobs: # - name: Upload .zip # uses: actions/upload-artifact@master # with: - # name: ark-desktop-wallet-mac-2.8.0.zip - # path: build/target/ark-desktop-wallet-mac-2.8.0.zip + # name: ark-desktop-wallet-mac-2.8.1.zip + # path: build/target/ark-desktop-wallet-mac-2.8.1.zip - name: Upload .dmg uses: actions/upload-artifact@v1 with: - name: ark-desktop-wallet-mac-2.8.0-${{ github.sha }}.dmg - path: build/target/ark-desktop-wallet-mac-2.8.0.dmg + name: ark-desktop-wallet-mac-2.8.1-${{ github.sha }}.dmg + path: build/target/ark-desktop-wallet-mac-2.8.1.dmg build-windows: runs-on: windows-latest @@ -170,5 +170,5 @@ jobs: - name: Upload .exe uses: actions/upload-artifact@v1 with: - name: ark-desktop-wallet-win-2.8.0-${{ github.sha }}.exe - path: build/target/ark-desktop-wallet-win-2.8.0.exe + name: ark-desktop-wallet-win-2.8.1-${{ github.sha }}.exe + path: build/target/ark-desktop-wallet-win-2.8.1.exe diff --git a/package.json b/package.json index 96a1f37bed..b7bb60ca79 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "ark-desktop-wallet", - "version": "2.8.0", + "version": "2.8.1", "repository": { "type": "git", "url": "git+https://github.com/ArkEcosystem/desktop-wallet.git" From 026f59d0441734664d74fdb25637fa16d5b13b42 Mon Sep 17 00:00:00 2001 From: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> Date: Thu, 20 Feb 2020 23:03:49 +0000 Subject: [PATCH 25/29] fix: splashscreen fullscreen & ui tweaks (#1691) * fix: apply fullscreen flag after main window opens * fix: disable text selection * fix: spacing above loading icon * fix: make sure window is hidden (linux) * fix: quit app when all windows are closed (mac) * Revert "fix: make sure window is hidden (linux)" This reverts commit 6e51d50cdd13e0c28c0dad9d322a38696d01a06e. --- src/main/index.js | 9 +++++---- src/renderer/SplashScreen.vue | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index 97c4b94b31..4bf0132c5b 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -66,9 +66,11 @@ function createWindow () { const windowState = winState({ defaultWidth: width, - defaultHeight: height + defaultHeight: height, + fullScreen: false }) + const wasFullScreen = windowState.isFullScreen mainWindow = new BrowserWindow({ width: windowState.width, height: windowState.height, @@ -88,6 +90,7 @@ function createWindow () { loadingWindow.close() } mainWindow.show() + mainWindow.setFullScreen(wasFullScreen) }) ipcMain.on('disable-iframe-protection', function (_event, urls) { @@ -192,9 +195,7 @@ app.on('ready', () => { }) app.on('window-all-closed', () => { - if (process.platform !== 'darwin') { - app.quit() - } + app.quit() }) app.on('activate', () => { diff --git a/src/renderer/SplashScreen.vue b/src/renderer/SplashScreen.vue index d851d3f5a3..ad4cd5b99f 100644 --- a/src/renderer/SplashScreen.vue +++ b/src/renderer/SplashScreen.vue @@ -1,5 +1,5 @@