@@ -83,8 +83,8 @@ export const mutations: MutationTree<ConfigState> = {
8383 }
8484 } else {
8585 instances . forEach ( ( instance , index ) => {
86+ instance . active = ( index === i )
8687 if ( index === i ) {
87- instance . active = ( index === i )
8888 instance . name = state . fileConfig . general . instanceName
8989 }
9090 } )
@@ -102,15 +102,15 @@ export const mutations: MutationTree<ConfigState> = {
102102 localStorage . setItem ( Globals . LOCAL_INSTANCES_STORAGE_KEY , JSON . stringify ( state . instances ) )
103103 } ,
104104
105- addInstance ( state , payload ) {
106- const instances = state . instances
107- const i = instances . findIndex ( ( instance : InstanceConfig ) => instance . apiUrl === payload . apiUrl )
108- if ( i === - 1 ) {
109- instances . push ( payload )
110- Vue . set ( state , 'instances' , instances )
111- localStorage . setItem ( Globals . LOCAL_INSTANCES_STORAGE_KEY , JSON . stringify ( instances ) )
112- }
113- } ,
105+ // addInstance (state, payload) {
106+ // const instances = state.instances
107+ // const i = instances.findIndex((instance: InstanceConfig) => instance.apiUrl === payload.apiUrl)
108+ // if (i === -1) {
109+ // instances.push(payload)
110+ // Vue.set(state, 'instances', instances)
111+ // localStorage.setItem(Globals.LOCAL_INSTANCES_STORAGE_KEY, JSON.stringify(instances))
112+ // }
113+ // },
114114
115115 removeInstance ( state , payload ) {
116116 const instances = state . instances
0 commit comments