mirror of https://github.com/Fabio286/antares.git
fix: connection default icon not change after client change
This commit is contained in:
parent
dd971d70e0
commit
a6bdf69a28
|
@ -115,8 +115,25 @@ export const useConnectionsStore = defineStore('connections', {
|
||||||
if (conn.uid === connection.uid) return connection;
|
if (conn.uid === connection.uid) return connection;
|
||||||
return conn;
|
return conn;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.connections = editedConnections;
|
this.connections = editedConnections;
|
||||||
persistentStore.set('connections', this.connections);
|
persistentStore.set('connections', this.connections);
|
||||||
|
|
||||||
|
const editedConnectionsOrder = (this.connectionsOrder as SidebarElement[]).map(conn => {
|
||||||
|
if (conn.uid === connection.uid) {
|
||||||
|
return {
|
||||||
|
isFolder: false,
|
||||||
|
uid: connection.uid,
|
||||||
|
client: connection.client,
|
||||||
|
icon: conn.icon,
|
||||||
|
name: conn.name
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return conn;
|
||||||
|
});
|
||||||
|
|
||||||
|
this.connectionsOrder = editedConnectionsOrder;
|
||||||
|
persistentStore.set('connectionsOrder', this.connectionsOrder);
|
||||||
},
|
},
|
||||||
updateConnections (connections: ConnectionParams[]) {
|
updateConnections (connections: ConnectionParams[]) {
|
||||||
this.connections = connections;
|
this.connections = connections;
|
||||||
|
|
Loading…
Reference in New Issue