1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-30 23:44:55 +02:00

Desktop: Resolves #591: Add support for multiple profiles (#6385)

This commit is contained in:
Laurent
2022-04-11 16:49:32 +01:00
committed by GitHub
parent 58bf93a112
commit 6458ad0540
32 changed files with 919 additions and 154 deletions

View File

@ -6,13 +6,15 @@ import propsHaveChanged from './propsHaveChanged';
const { createSelectorCreator, defaultMemoize } = require('reselect');
const { createCachedSelector } = require('re-reselect');
interface MenuItem {
id: string;
label: string;
click: Function;
export interface MenuItem {
id?: string;
label?: string;
click?: Function;
role?: any;
type?: string;
accelerator?: string;
enabled: boolean;
checked?: boolean;
enabled?: boolean;
}
interface MenuItems {

View File

@ -30,6 +30,7 @@ export interface WhenClauseContext {
folderIsShared: boolean;
folderIsShareRoot: boolean;
joplinServerConnected: boolean;
hasMultiProfiles: boolean;
}
export default function stateToWhenClauseContext(state: State, options: WhenClauseContextOptions = null): WhenClauseContext {
@ -82,5 +83,7 @@ export default function stateToWhenClauseContext(state: State, options: WhenClau
folderIsShared: commandFolder ? !!commandFolder.share_id : false,
joplinServerConnected: [9, 10].includes(state.settings['sync.target']),
hasMultiProfiles: state.profileConfig && state.profileConfig.profiles.length > 1,
};
}