addons.html wildcard routing
This commit is contained in:
2 files changed
+4
-2
No files matched your search
@@ -61,7 +61,8 @@ window.addEventListener('message', e => {
|
||||
});
|
||||
|
||||
const handleClickAddonSettings = () => {
|
||||
const w = window.open(`${process.env.ROOT}addons.html`, 'tw_addons');
|
||||
const path = process.env.ROUTING_STYLE === 'wildcard' ? 'addons' : 'addons.html';
|
||||
const w = window.open(`${process.env.ROOT}${path}`, 'tw_addons');
|
||||
if (w) {
|
||||
w.focus();
|
||||
}
|
||||
|
||||
+2
-1
@@ -38,7 +38,8 @@ const base = {
|
||||
{from: /^\/\d+\/?$/, to: '/index.html'},
|
||||
{from: /^\/\d+\/fullscreen\/?$/, to: '/fullscreen.html'},
|
||||
{from: /^\/\d+\/editor\/?$/, to: '/editor.html'},
|
||||
{from: /^\/\d+\/embed\/?$/, to: '/embed.html'}
|
||||
{from: /^\/\d+\/embed\/?$/, to: '/embed.html'},
|
||||
{from: /^\/addons\/?$/, to: '/addons.html'}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user