-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5390 from kodadot/fix/chain-list
- Loading branch information
Showing
10 changed files
with
252 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
import { chainPrefixes } from '@/utils/chain' | ||
|
||
export default function ({ store, route }): void { | ||
const prefix = route.params.prefix | ||
const prefix = route.params.prefix || route.path.split('/')[1] | ||
const chains = ['rmrk', ...chainPrefixes] | ||
const isAnyChainPrefixInPath = chains.some((prefix) => | ||
route.path.includes(prefix) | ||
) | ||
|
||
if (store.getters.currentUrlPrefix !== prefix && prefix) { | ||
if ( | ||
store.getters.currentUrlPrefix !== prefix && | ||
prefix && | ||
isAnyChainPrefixInPath | ||
) { | ||
store.dispatch('setUrlPrefix', prefix) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import VuexPersistence from 'vuex-persist' | ||
|
||
export default ({ store }): void => { | ||
new VuexPersistence({ | ||
key: 'preferences', | ||
storage: window.localStorage, | ||
}).plugin(store) | ||
new VuexPersistence({ | ||
key: 'setting', | ||
storage: window.sessionStorage, | ||
modules: ['identity'], | ||
}).plugin(store) | ||
} |
Oops, something went wrong.