Merge branch 'master' of github.com:benweet/stackedit

This commit is contained in:
benweet 2018-04-05 19:41:37 +01:00
commit 907605a2b5
9 changed files with 39 additions and 6 deletions

View File

@ -1,3 +1,16 @@
language: node_js
node_js:
- "8"
services:
- docker
before_deploy:
- docker build -t benweet/stackedit .
deploy:
provider: script
script: bash build/docker-push-tag.sh
on:
tags: true

7
build/docker-push-tag.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
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:latest

View File

@ -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);
});
});

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "stackedit",
"version": "5.10.2",
"version": "5.10.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "stackedit",
"version": "5.10.2",
"version": "5.10.4",
"description": "Free, open-source, full-featured Markdown editor",
"author": "Benoit Schweblin",
"license": "Apache-2.0",

View File

@ -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];

View File

@ -14,6 +14,8 @@
<br>
<a target="_blank" href="https://community.stackedit.io/">Community</a>
<hr>
For commercial support and custom development, please <a href="mailto:stackedit.project@gmail.com">contact us</a>.
<hr>
<h3>FAQ</h3>
<div class="faq" v-html="faq"></div>
<hr>

View File

@ -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(/&#160;/g, ' '); // Replace non-breaking spaces with classic spaces
if (sanitizedHtml) {

View File

@ -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()