addons.html wildcard routing

This commit is contained in:
Thomas Weber committed 2021-01-23 01:00:15 -06:00
1 parent 557ee9db26
commit a5e92a1083
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -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
View File
@@ -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'}
]
}
},