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,6 +1,7 @@
|
||||
import { utils, CommandRuntime, CommandDeclaration, CommandContext } from '../services/CommandService';
|
||||
import { _ } from '../locale';
|
||||
import { reg } from '../registry';
|
||||
import Setting from '../models/Setting';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'synchronize',
|
||||
@ -17,6 +18,14 @@ export const runtime = (): CommandRuntime => {
|
||||
|
||||
const action = syncStarted ? 'cancel' : 'start';
|
||||
|
||||
if (!Setting.value('sync.target')) {
|
||||
context.dispatch({
|
||||
type: 'DIALOG_OPEN',
|
||||
name: 'syncWizard',
|
||||
});
|
||||
return 'init';
|
||||
}
|
||||
|
||||
if (!(await reg.syncTarget().isAuthenticated())) {
|
||||
if (reg.syncTarget().authRouteName()) {
|
||||
utils.store.dispatch({
|
||||
|
Reference in New Issue
Block a user