From 0c97f165877216f12fd47f838610baf2d808e61c Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Wed, 28 Mar 2018 18:22:27 +0100 Subject: [PATCH 1/9] Added docker to travis build --- .travis.yml | 13 +++++++++++++ build/docker-push-tag.sh | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 build/docker-push-tag.sh diff --git a/.travis.yml b/.travis.yml index efb09833..dad0afb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,16 @@ language: node_js + node_js: - "8" + +services: + - docker + +before_install: + - docker build -t benweet/stackedit . + +deploy: + provider: script + script: bash build/docker-push-tag.sh + on: + tags: true diff --git a/build/docker-push-tag.sh b/build/docker-push-tag.sh new file mode 100644 index 00000000..eada372c --- /dev/null +++ b/build/docker-push-tag.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e +docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; +docker tag benweet/stackedit "benweet/stackedit:$TRAVIS_TAG" +docker push "benweet/stackedit:$TRAVIS_TAG" +docker tag "benweet/stackedit:$TRAVIS_TAG" benweet/stackedit:latest +docker push benweet/stackedit:latest From 83a47007b05d128c22733523ceab6476bba8682a Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Fri, 30 Mar 2018 13:04:14 +0100 Subject: [PATCH 2/9] Push to docker on tag --- .travis.yml | 2 +- build/docker-push-tag.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index dad0afb0..5d9f799d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ node_js: services: - docker -before_install: +before_deploy: - docker build -t benweet/stackedit . deploy: diff --git a/build/docker-push-tag.sh b/build/docker-push-tag.sh index eada372c..2190b8b5 100644 --- a/build/docker-push-tag.sh +++ b/build/docker-push-tag.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; +docker login -u benweet -p "$DOCKER_PASSWORD" docker tag benweet/stackedit "benweet/stackedit:$TRAVIS_TAG" -docker push "benweet/stackedit:$TRAVIS_TAG" -docker tag "benweet/stackedit:$TRAVIS_TAG" benweet/stackedit:latest +docker push benweet/stackedit:$TRAVIS_TAG +docker tag benweet/stackedit:$TRAVIS_TAG benweet/stackedit:latest docker push benweet/stackedit:latest From bde9cf059682079d02d67b87b8367adb287182bf Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Fri, 30 Mar 2018 13:04:41 +0100 Subject: [PATCH 3/9] Handle SIGTERM --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index 7404ec99..71d0caf3 100644 --- a/index.js +++ b/index.js @@ -18,3 +18,10 @@ const httpServer = http.createServer(app); httpServer.listen(port, null, () => { console.log(`HTTP server started: http://localhost:${port}`); }); + +// Handle graceful shutdown +process.on('SIGTERM', () => { + httpServer.close(() => { + process.exit(0); + }); +}); From d6a67f73098e11768a66caee92efff87a0ed5d99 Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Fri, 30 Mar 2018 13:44:23 +0100 Subject: [PATCH 4/9] Optimized light mode --- src/components/SideBar.vue | 2 +- src/services/sponsorSvc.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/SideBar.vue b/src/components/SideBar.vue index b5b1dd0f..d7ccd06f 100644 --- a/src/components/SideBar.vue +++ b/src/components/SideBar.vue @@ -75,7 +75,7 @@ export default { }), computed: { panel() { - return this.$store.getters['data/layoutSettings'].sideBarPanel; + return !this.$store.state.light && this.$store.getters['data/layoutSettings'].sideBarPanel; }, panelName() { return panelNames[this.panel]; diff --git a/src/services/sponsorSvc.js b/src/services/sponsorSvc.js index d643d2fb..26807542 100644 --- a/src/services/sponsorSvc.js +++ b/src/services/sponsorSvc.js @@ -23,8 +23,11 @@ const isGoogleSponsor = () => { const checkPayment = () => { const currentDate = Date.now(); - if (!isGoogleSponsor() && networkSvc.isUserActive() && !store.state.offline && - lastCheck + checkPaymentEvery < currentDate + if (!isGoogleSponsor() + && networkSvc.isUserActive() + && !store.state.offline + && !store.state.light + && lastCheck + checkPaymentEvery < currentDate ) { lastCheck = currentDate; getMonetize() From c67f2c88b9a5ba85e2cc16afc71e6cb70d9a19ea Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Fri, 30 Mar 2018 13:44:48 +0100 Subject: [PATCH 5/9] Tag v5.10.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9ce00ab..0e303fe6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "5.10.2", + "version": "5.10.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b616b0ea..d3c739e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "5.10.2", + "version": "5.10.3", "description": "Free, open-source, full-featured Markdown editor", "author": "Benoit Schweblin", "license": "Apache-2.0", From 0cf15a36c605816c029e85bfc6439700d090fcc7 Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Fri, 30 Mar 2018 16:07:52 +0100 Subject: [PATCH 6/9] Fixed escaped chars on paste --- src/components/modals/AboutModal.vue | 2 ++ src/services/cledit/cleditCore.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/modals/AboutModal.vue b/src/components/modals/AboutModal.vue index 3a1e393b..264fc73a 100644 --- a/src/components/modals/AboutModal.vue +++ b/src/components/modals/AboutModal.vue @@ -14,6 +14,8 @@
Community
+ For commercial support and custom development, please contact us. +

FAQ


diff --git a/src/services/cledit/cleditCore.js b/src/services/cledit/cleditCore.js index 7f724832..d3098eb9 100644 --- a/src/services/cledit/cleditCore.js +++ b/src/services/cledit/cleditCore.js @@ -333,6 +333,7 @@ function cledit(contentElt, scrollEltOpt) { }); const turndownService = new TurndownService(store.getters['data/computedSettings'].turndown); + turndownService.escape = str => str; // Disable escaping contentElt.addEventListener('paste', (evt) => { undoMgr.setCurrentMode('single'); @@ -343,7 +344,7 @@ function cledit(contentElt, scrollEltOpt) { data = clipboardData.getData('text/plain'); try { const html = clipboardData.getData('text/html'); - if (html && !clipboardData.getData('text/css')) { + if (html) { const sanitizedHtml = htmlSanitizer.sanitizeHtml(html) .replace(/ /g, ' '); // Replace non-breaking spaces with classic spaces if (sanitizedHtml) { From 2d179f34ddd542f1be9a0ff49f44fa0ab9c4ea8b Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Fri, 30 Mar 2018 16:09:07 +0100 Subject: [PATCH 7/9] Tag v5.10.4 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e303fe6..a3803cbd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "5.10.3", + "version": "5.10.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d3c739e3..9771b73f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "5.10.3", + "version": "5.10.4", "description": "Free, open-source, full-featured Markdown editor", "author": "Benoit Schweblin", "license": "Apache-2.0", From e2ec937ac729658e3c01b52e68a8848f6c93a2ff Mon Sep 17 00:00:00 2001 From: benweet Date: Thu, 5 Apr 2018 19:57:54 +0100 Subject: [PATCH 8/9] Minor changes in the About modal --- src/components/modals/AboutModal.vue | 6 +++--- src/data/faq.md | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/modals/AboutModal.vue b/src/components/modals/AboutModal.vue index 264fc73a..17f93035 100644 --- a/src/components/modals/AboutModal.vue +++ b/src/components/modals/AboutModal.vue @@ -13,9 +13,9 @@ StackEdit on Twitter
Community -
- For commercial support and custom development, please contact us. -
+

FAQ


diff --git a/src/data/faq.md b/src/data/faq.md index 36b1c581..ad6add70 100644 --- a/src/data/faq.md +++ b/src/data/faq.md @@ -1,14 +1,17 @@ **Where is my data stored?** If your workspace is not synced, your files are only stored inside your browser (using the [IndexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)) and are not stored anywhere else. + We recommend syncing your workspace to make sure files won't be lost in case your browser data is cleared. **Where is my data stored once I sync my workspace?** If you sign in with Google, your main workspace will be stored in Google Drive (in your [app data folder](https://developers.google.com/drive/v3/web/appdata)). + If you open a Google Drive workspace, the files in the workspace will be stored inside a Google Drive folder which you can share with other users. + If you open a CouchDB workspace, the files in the workspace will be stored in the CouchDB database which can be hosted on premises for privacy concerns. **Can StackEdit access my data without telling me?** -StackEdit is a frontend application. The access tokens issued by Google, Dropbox, GitHub... are stored in your browser and are not sent to our backend or to 3rd parties so your data won't be accessed by anybody. +StackEdit is a frontend application. The access tokens issued by Google, Dropbox, GitHub... are stored in your browser and are not sent to any backend or 3^rd^ parties so your data won't be accessed by anyone. From 3625d5e17b5332084dc5d7179800337883f45ab1 Mon Sep 17 00:00:00 2001 From: benweet Date: Thu, 5 Apr 2018 19:58:52 +0100 Subject: [PATCH 9/9] Tag v5.10.5 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3803cbd..fadccd91 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "5.10.4", + "version": "5.10.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9771b73f..b025326e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "5.10.4", + "version": "5.10.5", "description": "Free, open-source, full-featured Markdown editor", "author": "Benoit Schweblin", "license": "Apache-2.0",