You've already forked joplin
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:
@ -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({
|
||||
|
Reference in New Issue
Block a user