1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

All: Added "None" sync target to allow disabling synchronisation

This commit is contained in:
Laurent Cozic
2021-08-16 16:18:32 +01:00
parent fe4900d254
commit f5f05e6cc5
10 changed files with 165 additions and 20 deletions

View File

@ -1,4 +1,5 @@
const Folder = require('../../models/Folder').default;
const Setting = require('../../models/Setting').default;
const BaseModel = require('../../BaseModel').default;
const shared = {};
@ -81,6 +82,20 @@ shared.synchronize_press = async function(comp) {
const action = comp.props.syncStarted ? 'cancel' : 'start';
if (!Setting.value('sync.target')) {
comp.props.dispatch({
type: 'SIDE_MENU_CLOSE',
});
comp.props.dispatch({
type: 'NAV_GO',
routeName: 'Config',
sectionName: 'sync',
});
return 'init';
}
if (!(await reg.syncTarget().isAuthenticated())) {
if (reg.syncTarget().authRouteName()) {
comp.props.dispatch({