- SAVE_API_TOKEN: (token: string) => {
- return { ...state, apiToken: token };
+ SET_CONFIG: ({ config }) => {
+ return {
+ ...state,
+ config,
+ localCluster: config.uuidPrefix,
+ remoteHosts: { ...config.remoteHosts, [config.uuidPrefix]: new URL(config.rootUrl).host },
+ homeCluster: config.loginCluster || config.uuidPrefix,
+ loginCluster: config.loginCluster,
+ remoteHostsConfig: { ...state.remoteHostsConfig, [config.uuidPrefix]: config }
+ };