This commit is contained in:
Thomas Nordquist
2019-04-04 19:51:44 +02:00
parent c20c075bcf
commit 09dcce97b7
55 changed files with 775 additions and 1415 deletions

View File

@@ -3,7 +3,7 @@ import { ConnectionOptions } from '../model/ConnectionOptions'
import { createReducer } from './lib'
export interface ConnectionManagerState {
connections: {[s:string]: ConnectionOptions},
connections: {[s: string]: ConnectionOptions},
selected?: string
showAdvancedSettings: boolean
}
@@ -29,7 +29,7 @@ export enum ActionTypes {
export interface SetConnections {
type: ActionTypes.CONNECTION_MANAGER_SET_CONNECTIONS
connections: {[s:string]: ConnectionOptions}
connections: {[s: string]: ConnectionOptions}
}
export interface SelectConnection {

View File

@@ -48,35 +48,35 @@ const globalState: Reducer<GlobalState | undefined, CustomAction> = (state = ini
trackEvent(action.type)
console.log(action.type)
switch (action.type) {
case ActionTypes.showUpdateNotification:
return {
case ActionTypes.showUpdateNotification:
return {
...state,
showUpdateNotification: action.showUpdateNotification,
}
case ActionTypes.showError:
return {
case ActionTypes.showError:
return {
...state,
error: action.error,
}
case ActionTypes.didLaunch:
return {
case ActionTypes.didLaunch:
return {
...state,
launching: false,
}
case ActionTypes.showUpdateDetails:
if (action.showUpdateDetails === undefined) {
case ActionTypes.showUpdateDetails:
if (action.showUpdateDetails === undefined) {
return state
}
return {
return {
...state,
showUpdateDetails: action.showUpdateDetails,
}
default:
return state
default:
return state
}
}