mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2026-05-25 04:52:45 +00:00
feat(riot-v5): add config for router and register tag instead of import
This commit is contained in:
14
src/scripts/router.js
Normal file
14
src/scripts/router.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { route, router, getCurrentRoute } from '@riotjs/route';
|
||||
|
||||
function baseUrl() {
|
||||
return getCurrentRoute().replace(/#!(.*)/, '');
|
||||
}
|
||||
|
||||
export default {
|
||||
home() {
|
||||
router.pus(baseUrl());
|
||||
},
|
||||
taglist(image) {
|
||||
router.push(`${baseUrl()}#!/taglist/${image}`);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user