From 3a834034336b346e073680617cabf5ead8915d6d Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Mon, 26 Mar 2018 00:07:34 +0200 Subject: [PATCH 01/25] Fixed version number in Shell --- src/renderer/store/modules/ShellHistory.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/store/modules/ShellHistory.js b/src/renderer/store/modules/ShellHistory.js index 4fb39b3..4ed84e5 100644 --- a/src/renderer/store/modules/ShellHistory.js +++ b/src/renderer/store/modules/ShellHistory.js @@ -1,7 +1,8 @@ import app from '../../../../package.json'; import revision from '../../../../revision.json'; -let version = app.version + revision.rev; +// let version = app.version + '.' + revision.rev; +let version = revision.version; const state = { output: ['Welcome to imapsync ', 'Version ' + version] From 2508e48e04c48aac50ad26c889c15747383806e1 Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Mon, 26 Mar 2018 00:09:21 +0200 Subject: [PATCH 02/25] Fixed Spelling --- src/renderer/components/Add/MailboxForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/Add/MailboxForm.vue b/src/renderer/components/Add/MailboxForm.vue index 3368c59..061433d 100644 --- a/src/renderer/components/Add/MailboxForm.vue +++ b/src/renderer/components/Add/MailboxForm.vue @@ -192,7 +192,7 @@ this.$store.commit('addLine', '==== LOG (' + mailbox.mailbox_from + ' => ' + mailbox.mailbox_to + ') ===='); this.$store.commit('addLine', response.data.log); - this.$store.commit('addLine', '==== LOG Ended ===='); + this.$store.commit('addLine', '==== LOG End ===='); this.$store.commit('addLine', mailbox.mailbox_from + ' => ' + mailbox.mailbox_to + ' <=> ' + uuid + ' [Finished]'); this.$store.commit('removeMailbox', index); this.queue.splice(this.queue.map(el => el.uuid).indexOf(uuid), 1); From 29ba2e5f17a5752aa29d3e53f2f977c22f08df44 Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Mon, 26 Mar 2018 00:10:15 +0200 Subject: [PATCH 03/25] Fixed Shell store --- src/renderer/store/modules/ShellHistory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/store/modules/ShellHistory.js b/src/renderer/store/modules/ShellHistory.js index 4ed84e5..8a323a7 100644 --- a/src/renderer/store/modules/ShellHistory.js +++ b/src/renderer/store/modules/ShellHistory.js @@ -1,4 +1,4 @@ -import app from '../../../../package.json'; +// import app from '../../../../package.json'; import revision from '../../../../revision.json'; // let version = app.version + '.' + revision.rev; From 85e2d336905a730ba4bd9241a5b64703df3889bc Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Mon, 26 Mar 2018 00:54:47 +0200 Subject: [PATCH 04/25] Fixed linux dist build name --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a52e0d6..259fe77 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "productName": "ImapSync Client", "version": "0.0.1", "author": "Rida Am. ", - "description": "An electron-vue project", + "description": "It's only an Internet Message Access Protocol Synchronization Client", "license": "MIT", "main": "./dist/electron/main.js", "scripts": { @@ -65,8 +65,8 @@ }, "linux": { "icon": "build/icons", - "executableName": "githoard", - "synopsis": "Imapy Sync", + "executableName": "imapsyncclient", + "synopsis": "ImapSync Client", "category": "Development", "target": [ "AppImage", From 2325a1baa825cc249cb4a5e0378b243de2c612cf Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Mon, 26 Mar 2018 00:55:30 +0200 Subject: [PATCH 05/25] Added Single Instance to main process --- src/main/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/index.js b/src/main/index.js index 0505926..3c0d9bb 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -59,6 +59,16 @@ function createWindow () { webFrame.setLayoutZoomLevelLimits(0, 0); */ } +// Single Instance +let instanceToQuit = app.makeSingleInstance(function (commandLine, workingDirectory) { + if (mainWindow) { + if (mainWindow.isMinimized()) mainWindow.restore(); + mainWindow.focus(); + } +}); + +if (instanceToQuit) app.quit(); + app.on('ready', createWindow); app.on('window-all-closed', () => { From 9a9d9d35d96e83dec70bc8a095b9e3ce34e476e5 Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Mon, 26 Mar 2018 00:56:05 +0200 Subject: [PATCH 06/25] Minor changes --- src/renderer/App.vue | 10 ++++++++++ src/renderer/components/MainComponent.vue | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/renderer/App.vue b/src/renderer/App.vue index cb2a779..82b9c5e 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -12,4 +12,14 @@ diff --git a/src/renderer/components/MainComponent.vue b/src/renderer/components/MainComponent.vue index 0859143..9869390 100644 --- a/src/renderer/components/MainComponent.vue +++ b/src/renderer/components/MainComponent.vue @@ -5,9 +5,10 @@ - - + + + From 796bdcfb93c35f37df2b9b32bb0c6d02e262c238 Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Mon, 26 Mar 2018 00:57:00 +0200 Subject: [PATCH 07/25] 0.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 259fe77..eac07f4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "imapsyncclient", "displayName": "ImapSync Client", "productName": "ImapSync Client", - "version": "0.0.1", + "version": "0.0.2", "author": "Rida Am. ", "description": "It's only an Internet Message Access Protocol Synchronization Client", "license": "MIT", From 834fc5374d91b7c6748ed29f047a50711fb26bfa Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Mon, 26 Mar 2018 00:58:45 +0200 Subject: [PATCH 08/25] 0.0.2 Alpha (Dev) --- revision.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/revision.json b/revision.json index 5ff730a..35c1532 100644 --- a/revision.json +++ b/revision.json @@ -1,5 +1,5 @@ { - "rev": "c4d8eaa", - "version": "0.0.1.c4d8eaa", - "date": "2018-3-25 18:31:23" + "rev": "796bdcf", + "version": "0.0.2.796bdcf", + "date": "2018-3-26 00:58:08" } \ No newline at end of file From 37b945fcb906bfa32abfa4f62a3fa9fc965e5f3f Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Fri, 30 Mar 2018 18:15:00 +0200 Subject: [PATCH 09/25] Inital Travis CI --- appveyor.yml => .appveyor.yml | 0 .travis.yml | 36 -------------------------- travis.yml | 48 +++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 36 deletions(-) rename appveyor.yml => .appveyor.yml (100%) delete mode 100644 .travis.yml create mode 100644 travis.yml diff --git a/appveyor.yml b/.appveyor.yml similarity index 100% rename from appveyor.yml rename to .appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fd14ca5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -osx_image: xcode8.3 -sudo: required -dist: trusty -language: c -matrix: - include: - - os: osx - - os: linux - env: CC=clang CXX=clang++ npm_config_clang=1 - compiler: clang -cache: - directories: - - node_modules - - "$HOME/.electron" - - "$HOME/.cache" -addons: - apt: - packages: - - libgnome-keyring-dev - - icnsutils -before_install: -- mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([ - "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz - | tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull -- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi -install: -- nvm install 7 -- curl -o- -L https://yarnpkg.com/install.sh | bash -- source ~/.bashrc -- npm install -g xvfb-maybe -- yarn -script: -- yarn run build -branches: - only: - - master diff --git a/travis.yml b/travis.yml new file mode 100644 index 0000000..a79b361 --- /dev/null +++ b/travis.yml @@ -0,0 +1,48 @@ +matrix: + include: + - os: osx + osx_image: xcode9.2 + language: node_js + node_js: "9" + env: + - ELECTRON_CACHE=$HOME/.cache/electron + - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder + + - os: linux + services: docker + language: generic + +cache: + directories: + - node_modules + - $HOME/.cache/electron + - $HOME/.cache/electron-builder + +before_install: + - | + if [ "$TRAVIS_OS_NAME" == "osx" ]; then + mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.3.1/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.3.1.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1 + export PATH="/tmp/git-lfs:$PATH" + fi +before_script: + - git lfs pull + +script: + - | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then + docker run --rm \ + --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:wine \ + /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn release --linux --win" + else + yarn release + fi +before_cache: + - rm -rf $HOME/.cache/electron-builder/wine + +branches: + except: + - "/^v\\d+\\.\\d+\\.\\d+$/" \ No newline at end of file From bd3edfde4657efae73f8e1cf2d0d771febcdaa7e Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Fri, 30 Mar 2018 18:17:24 +0200 Subject: [PATCH 10/25] Fixed About Dialog Added API Status Added api to auth.json --- travis.yml => .travis.yml | 0 .appveyor.yml => appveyor.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename travis.yml => .travis.yml (100%) rename .appveyor.yml => appveyor.yml (100%) diff --git a/travis.yml b/.travis.yml similarity index 100% rename from travis.yml rename to .travis.yml diff --git a/.appveyor.yml b/appveyor.yml similarity index 100% rename from .appveyor.yml rename to appveyor.yml From 4b75efd89f13b45e7fd9d3b260800c43be93309c Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Fri, 30 Mar 2018 18:43:49 +0200 Subject: [PATCH 11/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cde8433..bbc58e0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ImapSyncClient +# ImapSync Client [![Build Status](https://travis-ci.org/ridaamirini/ImapSyncClient.svg?branch=master)](https://travis-ci.org/ridaamirini/ImapSyncClient) [![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/uses-html.svg)](http://forthebadge.com) From bcfa234405731a9b9bedd1b14a885122bf477b6b Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Fri, 30 Mar 2018 19:31:34 +0200 Subject: [PATCH 12/25] Travis CI --- .idea/workspace.xml | 398 ++++++++++++++++++++++++++------------------ .travis.yml | 5 + 2 files changed, 237 insertions(+), 166 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9f87854..00ee897 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,15 +1,9 @@ - - - - - - - - - + + + @@ -29,31 +23,33 @@ - - + + - - - + + + + + - - + + - - + + - - + + - - + + @@ -70,10 +66,6 @@ - email_to - tabledata4 - value4 - tabledat mailboxes migrate mail some @@ -98,6 +90,12 @@ pack electron electron: + main + version + '5.39.26.202' + element + $http + console.log mailbox_to @@ -107,6 +105,9 @@ ' + this.api + ' + this.api + + + C:\Users\RidaSmart Apps-PC1\WebstormProjects\ImapSyncClient + @@ -193,6 +197,11 @@ + + + + + @@ -203,19 +212,36 @@ + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + - - + - + + + + + + + + + @@ -367,9 +319,6 @@ Default - - @@ -400,6 +349,7 @@ + 1512344052374 @@ -524,35 +474,35 @@ - - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -576,20 +526,26 @@ - - - - - - - + + + + + + + + + + + - - + + + + @@ -602,7 +558,7 @@ - + @@ -610,69 +566,46 @@ - - - - - - - - - - - - - + - - - - - - + - - - + - - - + - - - + - + - + @@ -684,27 +617,13 @@ - - - - - - - - - - - - - - - + @@ -713,7 +632,7 @@ - + @@ -721,42 +640,42 @@ - + - + - + - + - + - + @@ -770,86 +689,59 @@ - + - - + + + + + - + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - + - - + - - - + + - - - + + diff --git a/.travis.yml b/.travis.yml index b35ea18..a79b361 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,9 +36,9 @@ script: -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ electronuserland/builder:wine \ - /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn build --linux --win" + /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn release --linux --win" else - yarn build + yarn release fi before_cache: - rm -rf $HOME/.cache/electron-builder/wine diff --git a/package.json b/package.json index eac07f4..e0aa484 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "main": "./dist/electron/main.js", "scripts": { "revision": "node .electron-vue/revision.js", + "release": "build", "build": "node .electron-vue/build.js && electron-builder", "build:dir": "node .electron-vue/build.js && electron-builder --dir", "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js", From 2becc2fa1b827e5423f975f122bb1d072d85b825 Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Fri, 30 Mar 2018 23:57:06 +0200 Subject: [PATCH 16/25] Travis CI --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e0aa484..f7e6cc4 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "main": "./dist/electron/main.js", "scripts": { "revision": "node .electron-vue/revision.js", - "release": "build", + "release": "node .electron-vue/build.js && electron-builder", "build": "node .electron-vue/build.js && electron-builder", "build:dir": "node .electron-vue/build.js && electron-builder --dir", "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js", From f64cd2dc1ad073291d7d377ade618bd44850c2ce Mon Sep 17 00:00:00 2001 From: ridaamirini Date: Sat, 31 Mar 2018 09:29:59 +0200 Subject: [PATCH 17/25] Travis CI --- .gitignore | 1 + .travis.yml | 1 + auth.json.enc | Bin 0 -> 112 bytes auth.json.example | 5 +++++ 4 files changed, 7 insertions(+) create mode 100644 auth.json.enc create mode 100644 auth.json.example diff --git a/.gitignore b/.gitignore index 6d09910..9243594 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ npm-debug.log npm-debug.log.* thumbs.db !.gitkeep +auth.json \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index a79b361..5951c64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ cache: - $HOME/.cache/electron-builder before_install: + - openssl aes-256-cbc -K $encrypted_720ad0b35daf_key -iv $encrypted_720ad0b35daf_iv -in auth.json.enc -out auth.json -d - | if [ "$TRAVIS_OS_NAME" == "osx" ]; then mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.3.1/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.3.1.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1 diff --git a/auth.json.enc b/auth.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..9e25d5ad45e7ca4309c98fa3fcf71e28b9b301e3 GIT binary patch literal 112 zcmV-$0FVEiuN&c7Y*lwjwhk@>PE#YRJ7>=QF1>s8F3nQ6*8dnH0pjH$vcnqe$WQMG z;$h}oyu;%FKI47f?ZbzHa8u8H Date: Sun, 1 Apr 2018 04:16:44 +0200 Subject: [PATCH 18/25] Travis CI & Test Auto-Update --- package.json | 4 +++- src/main/index.js | 51 ++++++++++++++++++++++++++++++----------------- yarn.lock | 37 ++++++++++++++++++++++++++-------- 3 files changed, 65 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index f7e6cc4..f9df66a 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,9 @@ "vue": "^2.3.3", "vue-electron": "^1.0.6", "vue-router": "^2.5.3", - "vuex": "^2.3.1" + "vuex": "^2.3.1", + "electron-log": "^1.3.0", + "electron-updater": "^2.15.0" }, "devDependencies": { "babel-core": "^6.25.0", diff --git a/src/main/index.js b/src/main/index.js index 3c0d9bb..bda1d40 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -1,6 +1,7 @@ 'use strict'; -import { app, BrowserWindow } from 'electron'; +import { app, BrowserWindow, dialog } from 'electron'; +import { autoUpdater } from 'electron-updater'; /** * Set `__static` path to static files in production @@ -20,16 +21,16 @@ function createWindow () { * Initial window options */ - // Linux & Windows + // Linux & Windows let options = { - title: 'ImapSync Client', - height: 680, - width: 1050, - useContentSize: true, - resizable: false, - fullscreen: false, - backgroundColor: '#272d33' - }; + title: 'ImapSync Client', + height: 680, + width: 1050, + useContentSize: true, + resizable: false, + fullscreen: false, + backgroundColor: '#272d33' + }; if (process.platform === 'darwin') { options = { @@ -69,7 +70,7 @@ let instanceToQuit = app.makeSingleInstance(function (commandLine, workingDirect if (instanceToQuit) app.quit(); -app.on('ready', createWindow); +// app.on('ready', createWindow); app.on('window-all-closed', () => { if (process.platform !== 'darwin') { @@ -91,14 +92,28 @@ app.on('activate', () => { * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-builder.html#auto-updating */ -/* -import { autoUpdater } from 'electron-updater' +autoUpdater.logger = require('electron-log'); +autoUpdater.logger.transports.file.level = 'info'; autoUpdater.on('update-downloaded', () => { - autoUpdater.quitAndInstall() -}) + if (process.env.NODE_ENV === 'production') { + dialog.showMessageBox({ + type: 'info', + title: 'Update', + message: 'Found updates, do you want update now?', + buttons: ['Update', 'No'] + }, (buttonIndex) => { + if (buttonIndex === 0) { + const isSilent = true; + const isForceRunAfter = true; + autoUpdater.quitAndInstall(isSilent, isForceRunAfter); + } + }); + } +}); app.on('ready', () => { - if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates() -}) - */ + if (process.env.NODE_ENV === 'production') { autoUpdater.checkForUpdates(); } + + createWindow(); +}); diff --git a/yarn.lock b/yarn.lock index fcb792e..fc5f313 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1406,7 +1406,7 @@ builder-util-runtime@4.0.4: fs-extra-p "^4.5.0" sax "^1.2.4" -builder-util-runtime@^4.0.4, builder-util-runtime@^4.0.5: +builder-util-runtime@^4.0.4, builder-util-runtime@^4.0.5, builder-util-runtime@~4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-4.2.0.tgz#c56aa18d34390143da031c418c9d3a055fbd3522" dependencies: @@ -2641,6 +2641,10 @@ electron-localshortcut@^3.0.0: keyboardevent-from-electron-accelerator "^1.1.0" keyboardevents-areequal "^0.2.1" +electron-log@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-1.3.0.tgz#d05544114b971a16c86739c79d0d236103ad0a16" + electron-osx-sign@0.4.8: version "0.4.8" resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.8.tgz#f0b9fadded9e1e54ec35fa89877b5c6c34c7bc40" @@ -2667,6 +2671,20 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: version "1.3.41" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.41.tgz#7e33643e00cd85edfd17e04194f6d00e73737235" +electron-updater@^2.15.0: + version "2.21.4" + resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-2.21.4.tgz#56326defc8072e78e339cc656838ac78e708f50c" + dependencies: + bluebird-lst "^1.0.5" + builder-util-runtime "~4.2.0" + electron-is-dev "^0.3.0" + fs-extra-p "^4.5.2" + js-yaml "^3.11.0" + lazy-val "^1.0.3" + lodash.isequal "^4.5.0" + semver "^5.5.0" + source-map-support "^0.5.4" + electron@^1.7.5: version "1.8.4" resolved "https://registry.yarnpkg.com/electron/-/electron-1.8.4.tgz#cca8d0e6889f238f55b414ad224f03e03b226a38" @@ -3819,14 +3837,13 @@ html-minifier@^2.1.5: uglify-js "2.6.x" html-minifier@^3.2.3: - version "3.5.12" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.12.tgz#6bfad4d0327f5b8d2b62f5854654ac3703b9b031" + version "3.5.13" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.13.tgz#6bca6d533a7f18a476dc6aeb3d113071ab5c165e" dependencies: camel-case "3.0.x" clean-css "4.1.x" commander "2.15.x" he "1.1.x" - ncname "1.0.x" param-case "2.1.x" relateurl "0.2.x" uglify-js "3.3.x" @@ -4366,7 +4383,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.10.0, js-yaml@^3.4.3, js-yaml@^3.9.1: +js-yaml@^3.10.0, js-yaml@^3.11.0, js-yaml@^3.4.3, js-yaml@^3.9.1: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" dependencies: @@ -4649,6 +4666,10 @@ lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + lodash.isplainobject@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz#9a8238ae16b200432960cd7346512d0123fbf4c5" @@ -6682,7 +6703,7 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.3: +source-map-support@^0.5.3, source-map-support@^0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.4.tgz#54456efa89caa9270af7cd624cc2f123e51fbae8" dependencies: @@ -7185,8 +7206,8 @@ uglify-js@2.6.x: yargs "~3.10.0" uglify-js@3.3.x: - version "3.3.16" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.16.tgz#23ba13efa27aa00885be7417819e8a9787f94028" + version "3.3.17" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.17.tgz#f32a66b191fe18a5b6b4b66b75c0a195f7811f9e" dependencies: commander "~2.15.0" source-map "~0.6.1" From 2cd1bfb6869a7a8136c74a9b7b7171070a941ab6 Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Sun, 1 Apr 2018 04:19:42 +0200 Subject: [PATCH 19/25] Delete auth.json --- auth.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 auth.json diff --git a/auth.json b/auth.json deleted file mode 100644 index fc6ecd1..0000000 --- a/auth.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "username": "", - "password": "", - "api": "" -} \ No newline at end of file From 9b65f704ff04f71a1073d27fd6055a511b546ff8 Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Sun, 1 Apr 2018 04:24:06 +0200 Subject: [PATCH 20/25] Travis CI & Test Auto-Update --- .gitignore | 3 ++- package.json | 2 +- yarn.lock | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9243594..d01ccd9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ npm-debug.log npm-debug.log.* thumbs.db !.gitkeep -auth.json \ No newline at end of file +auth.json +.idea/* \ No newline at end of file diff --git a/package.json b/package.json index f9df66a..843cbdd 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "vue-router": "^2.5.3", "vuex": "^2.3.1", "electron-log": "^1.3.0", - "electron-updater": "^2.15.0" + "electron-updater": "^2.18.2" }, "devDependencies": { "babel-core": "^6.25.0", diff --git a/yarn.lock b/yarn.lock index fc5f313..16d2666 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2671,7 +2671,7 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: version "1.3.41" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.41.tgz#7e33643e00cd85edfd17e04194f6d00e73737235" -electron-updater@^2.15.0: +electron-updater@^2.18.2: version "2.21.4" resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-2.21.4.tgz#56326defc8072e78e339cc656838ac78e708f50c" dependencies: From 690cf9304d3ca1ba7cf010db95944fa8ca4477d9 Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Sun, 1 Apr 2018 05:00:06 +0200 Subject: [PATCH 21/25] Travis CI & Test Auto-Update --- package.json | 2 +- src/renderer/components/MainComponent.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 843cbdd..d730026 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "imapsyncclient", "displayName": "ImapSync Client", "productName": "ImapSync Client", - "version": "0.0.2", + "version": "0.0.3", "author": "Rida Am. ", "description": "It's only an Internet Message Access Protocol Synchronization Client", "license": "MIT", diff --git a/src/renderer/components/MainComponent.vue b/src/renderer/components/MainComponent.vue index 9869390..0d33c0b 100644 --- a/src/renderer/components/MainComponent.vue +++ b/src/renderer/components/MainComponent.vue @@ -1,7 +1,7 @@ @@ -48,11 +49,40 @@ export default { name: 'main-component', components: { QueueTable, MailboxForm, About }, + created () { + this.$electron.ipcRenderer.on('update-available', + (event, { version, currentVersion, releaseNotes }) => { + this.$notify.info({ + title: 'Update', + iconClass: 'el-icon-bell', + showClose: true, + message: 'Hurray! a new update is available. Click me!', + duration: 6000, + onClick: this.handleUpdate + }); + + this.updateAvailable = true; + + this.$store.commit('setLatestVersion', version); + } + ); + + // this.$electron.ipcRenderer.send('check-update'); + }, data () { return { aboutShow: false, - multipleMailboxes: false + multipleMailboxes: false, + updateAvailable: false }; + }, + methods: { + handleUpdate: function () { + console.log('HandelUpdate'); + } + }, + beforeDestroy () { + this.$electron.ipcRenderer.removeListener('update-available'); } }; @@ -118,6 +148,16 @@ animation:fa-beat 5s ease infinite; } + .update-badge { + z-index: 1000; + } + + .update-badge sup { + position: absolute; + top: -20px; + right: -10px; + } + @keyframes fa-beat { 0% { transform:scale(1); diff --git a/src/renderer/store/modules/Version.js b/src/renderer/store/modules/Version.js new file mode 100644 index 0000000..e032ef8 --- /dev/null +++ b/src/renderer/store/modules/Version.js @@ -0,0 +1,20 @@ +import app from '../../../../package.json'; + +const state = { + version: app.version, + latest: app.version +}; + +const mutations = { + setLatestVersion (state, version) { + state.latest = version; + } +}; + +const actions = {}; + +export default { + state, + mutations, + actions +}; From 958159ee54428fb2202959517474e780442d51a0 Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Mon, 2 Apr 2018 03:41:13 +0200 Subject: [PATCH 23/25] :heart_eyes: Auto Updater --- package.json | 2 +- src/main/updater.js | 8 +++++-- src/renderer/components/About.vue | 27 ++++++++++++--------- src/renderer/components/MainComponent.vue | 29 +++++++++++++++++++---- 4 files changed, 48 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index d730026..843cbdd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "imapsyncclient", "displayName": "ImapSync Client", "productName": "ImapSync Client", - "version": "0.0.3", + "version": "0.0.2", "author": "Rida Am. ", "description": "It's only an Internet Message Access Protocol Synchronization Client", "license": "MIT", diff --git a/src/main/updater.js b/src/main/updater.js index f985f4f..ebced1d 100644 --- a/src/main/updater.js +++ b/src/main/updater.js @@ -54,10 +54,14 @@ app.once('browser-window-focus', (event, win) => { }); ipcMain.on('download-update', () => { - autoUpdater.downloadUpdate(); + if (process.env.NODE_ENV === 'production') autoUpdater.downloadUpdate(); + }); + + ipcMain.on('check-update-manually', () => { + if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates(); }); }); export function checkForUpdates () { - autoUpdater.checkForUpdates(); // @todo only on ENV + if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates(); } diff --git a/src/renderer/components/About.vue b/src/renderer/components/About.vue index 7173e4b..3284d14 100644 --- a/src/renderer/components/About.vue +++ b/src/renderer/components/About.vue @@ -21,7 +21,7 @@ Latest version: v{{latest}}   - + {{ updateAvailable ? 'Update' : 'Check for update'}} @@ -47,20 +47,24 @@ diff --git a/src/renderer/components/MainComponent.vue b/src/renderer/components/MainComponent.vue index 4139945..8555a57 100644 --- a/src/renderer/components/MainComponent.vue +++ b/src/renderer/components/MainComponent.vue @@ -1,7 +1,7 @@ @@ -45,6 +45,7 @@ import QueueTable from './QueueTable/QueueTable.vue'; import MailboxForm from './Add/MailboxForm.vue'; import About from './About.vue'; + import { Loading } from 'element-ui'; export default { name: 'main-component', @@ -67,7 +68,7 @@ } ); - // this.$electron.ipcRenderer.send('check-update'); + this.$electron.ipcRenderer.send('check-update'); }, data () { return { @@ -78,11 +79,31 @@ }, methods: { handleUpdate: function () { - console.log('HandelUpdate'); + this.$confirm('The Application will be restarted. Continue?', 'Update', { + confirmButtonText: 'OK', + cancelButtonText: 'Cancel', + type: 'info' + }).then(() => { + this.$message({ + type: 'success', + message: 'Update will be downloaded and install. It might take a while.', + duration: 3000 + }); + + this.$electron.ipcRenderer.send('download-update'); + + Loading.service({ + fullscreen: false, + background: '#272d33', + text: 'Downloading ...', + lock: true + }); + }); } }, beforeDestroy () { this.$electron.ipcRenderer.removeListener('update-available'); + this.$off('update-client'); } }; From 937497c66f8c8820d015ce2df14ec7ab815359c1 Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Mon, 2 Apr 2018 03:42:41 +0200 Subject: [PATCH 24/25] Travis CI & Test Auto-Update --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5951c64..8cff155 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,5 +45,7 @@ before_cache: - rm -rf $HOME/.cache/electron-builder/wine branches: - except: - - "/^v\\d+\\.\\d+\\.\\d+$/" \ No newline at end of file +# except: +# - "/^v\\d+\\.\\d+\\.\\d+$/" + only: + - master \ No newline at end of file From 7e576bb254f9bf543d7ff0582935312c5e4b3ba6 Mon Sep 17 00:00:00 2001 From: Rida Amirini Date: Mon, 2 Apr 2018 03:43:40 +0200 Subject: [PATCH 25/25] Travis CI & Test Auto-Update --- .idea/workspace.xml | 664 ++++++++++++++++++++++++++++++++------------ .travis.yml | 4 +- 2 files changed, 488 insertions(+), 180 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 386b01e..b2e82b3 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,10 +1,9 @@ - - - - + + + @@ -24,32 +23,14 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -65,8 +46,6 @@ - mailboxes - migrate mail some this.el logo @@ -95,6 +74,8 @@ element $http console.log + once + check-update mailbox_to @@ -112,7 +93,7 @@ @@ -144,14 +125,17 @@ @@ -167,20 +151,33 @@ - -