You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
All: Open the connection screen when a SAML session has expired
This commit is contained in:
@@ -2,6 +2,7 @@ import { utils, CommandRuntime, CommandDeclaration, CommandContext } from '../se
|
||||
import { _ } from '../locale';
|
||||
import { reg } from '../registry';
|
||||
import Setting from '../models/Setting';
|
||||
import NavService from '../services/NavService';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'synchronize',
|
||||
@@ -35,7 +36,18 @@ export const runtime = (): CommandRuntime => {
|
||||
return 'auth';
|
||||
}
|
||||
|
||||
reg.logger().error('Not authenticated with sync target - please check your credentials.');
|
||||
const error = new Error('Not authenticated with sync target - please check your credentials.');
|
||||
|
||||
utils.store.dispatch({
|
||||
type: 'SYNC_REPORT_UPDATE',
|
||||
report: { errors: [error] },
|
||||
});
|
||||
|
||||
if (Setting.value('sync.target') === 11) {
|
||||
await NavService.go('JoplinServerSamlLogin');
|
||||
}
|
||||
|
||||
reg.logger().error(error);
|
||||
return 'error';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user