mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-29 16:39:54 +03:00
feat(riot-v5): add config for router and register tag instead of import
This commit is contained in:
parent
142727e8ac
commit
ea21483346
7 changed files with 49 additions and 20 deletions
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}`);
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue