refactoring for better topic and account editing

This commit is contained in:
or-else
2021-08-05 16:32:13 -07:00
parent dafc3161c5
commit 642821db9f
24 changed files with 759 additions and 611 deletions
+7 -1
View File
@@ -13,7 +13,7 @@ export default class HashNavigation {
}
if (parts[1]) {
parts[1].split('&').forEach(function(part) {
let item = part.split('=');
const item = part.split('=');
if (item[0]) {
params[decodeURIComponent(item[0])] = decodeURIComponent(item[1]);
}
@@ -58,6 +58,12 @@ export default class HashNavigation {
return this.composeUrlHash(parsed.path, parsed.params);
}
static setUrlInfoPanel(hash, infopanel) {
const parsed = this.parseUrlHash(hash);
parsed.params.info = infopanel;
return this.composeUrlHash(parsed.path, parsed.params);
}
static setUrlTopic(hash, topic) {
const parsed = this.parseUrlHash(hash);
parsed.path[1] = topic;