mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 09:45:52 +00:00
Check if Tab ;emu have broken links and replace them
Simple find and replace broken links without a new function and without update registered urls which are fixed and dont have broken links
This commit is contained in:
parent
7c0948886f
commit
c95dfa6edd
@ -1225,6 +1225,34 @@ class NavBar extends connect(store)(LitElement) {
|
||||
|
||||
this.myMenuPlugins = JSON.parse(localStorage.getItem('myMenuPlugs') || '[]')
|
||||
} else {
|
||||
let newPluginMenu = JSON.parse(localStorage.getItem('myMenuPlugs') || '[]')
|
||||
|
||||
const oldQchat = 'messaging/q-chat/index.html'
|
||||
const newQchat = 'q-chat/index.html'
|
||||
const oldMinting = 'minting/index.html'
|
||||
const newMinting = 'minting-info/index.html'
|
||||
const oldWebsites = 'qdn/index.html'
|
||||
const newWebsites = 'q-website/index.html'
|
||||
const oldDatamanager = 'qdn/data-management/index.html'
|
||||
const newDatamanager = 'data-management/index.html'
|
||||
|
||||
// Check if local storage have broken links and replace them
|
||||
newPluginMenu.find(a => {
|
||||
if (a.page === oldQchat) {
|
||||
a.page = newQchat
|
||||
} else if (a.page === oldMinting) {
|
||||
a.page = newMinting
|
||||
} else if (a.page === oldWebsites) {
|
||||
a.page = newWebsites
|
||||
} else if (a.page === oldDatamanager) {
|
||||
a.page = newDatamanager
|
||||
} else {}
|
||||
})
|
||||
|
||||
localStorage.setItem('myMenuPlugs', JSON.stringify(newPluginMenu))
|
||||
|
||||
await appDelay(250)
|
||||
|
||||
this.myMenuPlugins = JSON.parse(localStorage.getItem('myMenuPlugs') || '[]')
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user