Skip to content

Commit 387e49c

Browse files
committed
Migration for legacy connections
1 parent 67e6ec4 commit 387e49c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/renderer/App.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export default {
1313
name: 'sshfs-win-manager',
1414
1515
mounted () {
16+
this.$store.dispatch('APPLY_CONNECTIONS_MIGRATIONS')
17+
1618
ipcRenderer.on('terminate-child-processes', () => {
1719
ProcessManager.terminateAll().then(() => {
1820
ipcRenderer.send('child-processes-terminated')

src/renderer/store/modules/Data.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ const mutations = {
3131

3232
CLEAR_CONNECTIONS (state) {
3333
state.connections = []
34+
},
35+
36+
MIGRATE_CONNECTIONS_ADVANCED_OPTIONS (state) {
37+
state.connections.forEach(conn => {
38+
if (!conn.advanced) {
39+
conn.advanced = {
40+
customCmdlOptionsEnabled: false,
41+
customCmdlOptions: []
42+
}
43+
}
44+
})
3445
}
3546
}
3647

@@ -53,6 +64,10 @@ const actions = {
5364

5465
CLEAR_CONNECTIONS ({ commit }) {
5566
commit('CLEAR_CONNECTIONS')
67+
},
68+
69+
APPLY_CONNECTIONS_MIGRATIONS ({ commit }) {
70+
commit('MIGRATE_CONNECTIONS_ADVANCED_OPTIONS')
5671
}
5772
}
5873

0 commit comments

Comments
 (0)