Added changelog link

This commit is contained in:
benweet 2018-02-15 08:40:20 +00:00
parent c4651fcb3f
commit b4e274df66
10 changed files with 68 additions and 40 deletions

View File

@ -371,18 +371,12 @@ export default {
&:hover,
&:focus {
background-color: rgba(0, 0, 0, 0.067);
background-color: rgba(0, 0, 0, 0.05);
}
}
.tabs__tab--active > a {
border-bottom: 2px solid $link-color;
color: inherit;
cursor: auto;
&:hover,
&:focus {
background-color: transparent;
}
}
</style>

View File

@ -162,7 +162,7 @@ export default {
.side-bar__info {
padding: 10px;
margin: -10px -10px 0;
margin: -10px -10px 10px;
background-color: $info-bg;
p {

View File

@ -122,7 +122,7 @@ textarea {
&:hover,
.hidden-file:focus + & {
color: #333;
background-color: rgba(0, 0, 0, 0.067);
background-color: rgba(0, 0, 0, 0.05);
outline: 0;
text-decoration: none;
}

View File

@ -1,5 +1,9 @@
<template>
<div class="history side-bar__panel">
<div class="side-bar__info" v-if="!syncToken">
<p>You have to <a href="javascript:void(0)" @click="signin">sign in with Google</a> to enable revision history.</p>
<p><b>Note:</b> This will sync your main workspace.</p>
</div>
<div class="revision" v-for="revision in revisionsWithSpacer" :key="revision.id">
<div class="history__spacer" v-if="revision.spacer"></div>
<a class="revision__button button flex flex--row" href="javascript:void(0)" @click="open(revision)">
@ -20,7 +24,7 @@
</template>
<script>
import { mapMutations } from 'vuex';
import { mapMutations, mapGetters } from 'vuex';
import providerRegistry from '../../services/providers/providerRegistry';
import MenuEntry from './common/MenuEntry';
import UserImage from '../UserImage';
@ -29,6 +33,8 @@ import EditorClassApplier from '../common/EditorClassApplier';
import PreviewClassApplier from '../common/PreviewClassApplier';
import utils from '../../services/utils';
import editorSvc from '../../services/editorSvc';
import googleHelper from '../../services/providers/helpers/googleHelper';
import syncSvc from '../../services/syncSvc';
let editorClassAppliers = [];
let previewClassAppliers = [];
@ -50,6 +56,9 @@ export default {
showCount: pageSize,
}),
computed: {
...mapGetters('workspace', [
'syncToken',
]),
revisions() {
return this.allRevisions.slice(0, this.showCount);
},
@ -67,11 +76,24 @@ export default {
showMoreButton() {
return this.showCount < this.allRevisions.length;
},
refreshTrigger() {
return utils.serializeObject([
this.$store.getters['file/current'].id,
this.syncToken,
]);
},
},
methods: {
...mapMutations('content', [
'setRevisionContent',
]),
signin() {
return googleHelper.signin()
.then(
() => syncSvc.requestSync(),
() => {}, // Cancel
);
},
close() {
this.$store.dispatch('data/setSideBarPanel', 'menu');
},
@ -82,7 +104,7 @@ export default {
let revisionContentPromise = revisionContentPromises[revision.id];
if (!revisionContentPromise) {
revisionContentPromise = new Promise((resolve, reject) => {
const syncToken = this.$store.getters['workspace/syncToken'];
const syncToken = this.syncToken;
const currentFile = this.$store.getters['file/current'];
this.$store.dispatch('queue/enqueue',
() => Promise.resolve()
@ -132,31 +154,34 @@ export default {
// Watch file changes
this.$watch(
() => this.$store.getters['file/current'].id,
(id) => {
() => this.refreshTrigger,
() => {
this.allRevisions = [];
if (id) {
const id = this.$store.getters['file/current'].id;
const syncToken = this.syncToken;
if (id && syncToken) {
if (id !== cachedFileId) {
this.setRevisionContent();
cachedFileId = id;
revisionContentPromises = {};
const syncToken = this.$store.getters['workspace/syncToken'];
const currentFile = this.$store.getters['file/current'];
revisionsPromise = new Promise((resolve, reject) => {
this.$store.dispatch('queue/enqueue',
() => Promise.resolve()
.then(() => this.workspaceProvider.listRevisions(syncToken, currentFile.id))
.then(resolve, reject));
});
revisionsPromise.catch(() => {
})
.catch(() => {
cachedFileId = null;
return [];
});
}
if (revisionsPromise) {
revisionsPromise.then((revisions) => {
this.allRevisions = revisions;
});
}
}
}, { immediate: true });
const loadOne = () => {
@ -166,7 +191,7 @@ export default {
let loadPromise;
this.revisions.some((revision) => {
if (!revision.created) {
const syncToken = this.$store.getters['workspace/syncToken'];
const syncToken = this.syncToken;
const currentFile = this.$store.getters['file/current'];
loadPromise = this.workspaceProvider
.loadRevision(syncToken, currentFile.id, revision)

View File

@ -41,7 +41,7 @@
<div>Publish</div>
<span>Export your files to the web.</span>
</menu-entry>
<menu-entry @click.native="history">
<menu-entry @click.native="setPanel('history')">
<icon-history slot="icon"></icon-history>
<div>File history</div>
<span>Track and restore file revisions.</span>
@ -114,17 +114,6 @@ export default {
return this.$store.dispatch('modal/open', 'fileProperties')
.catch(() => {}); // Cancel
},
history() {
if (!this.syncToken) {
this.$store.dispatch('modal/signInForHistory', {
onResolve: () => googleHelper.signin()
.then(() => syncSvc.requestSync()),
})
.catch(() => { }); // Cancel
} else {
this.setPanel('history');
}
},
print() {
print();
},

View File

@ -1,5 +1,8 @@
<template>
<div class="side-bar__panel side-bar__panel--menu">
<div class="side-bar__info" v-if="noToken">
<p>You have to <b>link an account</b> to start publishing files.</p>
</div>
<div class="side-bar__info" v-if="publishLocations.length">
<p><b>{{currentFileName}}</b> is already published.</p>
<menu-entry @click.native="requestPublish">
@ -147,6 +150,14 @@ export default {
zendeskTokens() {
return tokensToArray(this.$store.getters['data/zendeskTokens']);
},
noToken() {
return !this.googleDriveTokens.length
&& !this.dropboxTokens.length
&& !this.githubTokens.length
&& !this.wordpressTokens.length
&& !this.bloggerTokens.length
&& !this.zendeskTokens.length;
},
},
methods: {
requestPublish() {

View File

@ -1,5 +1,8 @@
<template>
<div class="side-bar__panel side-bar__panel--menu">
<div class="side-bar__info" v-if="noToken">
<p>You have to <b>link an account</b> to start syncing files.</p>
</div>
<div class="side-bar__info" v-if="syncLocations.length">
<p><b>{{currentFileName}}</b> is already synchronized.</p>
<menu-entry v-if="isSyncPossible" @click.native="requestSync">
@ -128,6 +131,11 @@ export default {
githubTokens() {
return tokensToArray(this.$store.getters['data/githubTokens']);
},
noToken() {
return !this.googleDriveTokens.length
&& !this.dropboxTokens.length
&& !this.githubTokens.length;
},
},
methods: {
requestSync() {

View File

@ -4,14 +4,15 @@
<div class="logo-background"></div>
<small>v{{version}} © 2018 Benoit Schweblin</small>
<hr>
<a target="_blank" href="https://github.com/benweet/stackedit/">GitHub repo</a>
<a target="_blank" href="https://github.com/benweet/stackedit/issues">issue tracker</a>
StackEdit on <a target="_blank" href="https://github.com/benweet/stackedit/">GitHub</a>
<br>
<a target="_blank" href="https://community.stackedit.io/">Community</a>
<a target="_blank" href="https://github.com/benweet/stackedit/issues">Issue tracker</a> <a target="_blank" href="https://github.com/benweet/stackedit/blob/master/CHANGELOG.md">Changelog</a>
<br>
<a target="_blank" href="https://chrome.google.com/webstore/detail/stackedit/iiooodelglhkcpgbajoejffhijaclcdg">Chrome app</a> thanks for your review!
<br>
StackEdit on <a target="_blank" href="https://twitter.com/stackedit/">Twitter</a>
<br>
<a target="_blank" href="https://community.stackedit.io/">Community</a>
<hr>
<h3>FAQ</h3>
<div class="faq" v-html="faq"></div>

View File

@ -5,7 +5,7 @@
<icon-close></icon-close>
</button>
<div class="modal__sponsor-button" v-if="showSponsorButton">
StackEdit is open source! Please consider
StackEdit is <a class="not-tabbable" target="_blank" href="https://github.com/benweet/stackedit/">open source</a>. Please consider
<a class="not-tabbable" href="javascript:void(0)" @click="sponsor">sponsoring</a> for just $5.
</div>
<slot></slot>

View File

@ -62,7 +62,7 @@
.button:focus,
.button:hover {
color: #333;
background-color: rgba(0, 0, 0, 0.067);
background-color: rgba(0, 0, 0, 0.05);
outline: 0;
text-decoration: none;
}