mirror of
https://github.com/directus/directus.git
synced 2026-02-06 03:25:04 -05:00
Support link-modules and add docs link (#368)
* Allow link type modules * Add docs module * Allow buttons to render as <a> * Update button readme * Use link buttons in module sidebar when needed
This commit is contained in:
@@ -13,17 +13,19 @@ export function defineModule(
|
||||
options = config;
|
||||
}
|
||||
|
||||
options.routes = options.routes.map((route) => {
|
||||
if (route.path) {
|
||||
route.path = `/:project/${options.id}${route.path}`;
|
||||
}
|
||||
if (options.routes !== undefined) {
|
||||
options.routes = options.routes.map((route) => {
|
||||
if (route.path) {
|
||||
route.path = `/:project/${options.id}${route.path}`;
|
||||
}
|
||||
|
||||
if (route.redirect) {
|
||||
route.redirect = `/:project/${options.id}${route.redirect}`;
|
||||
}
|
||||
if (route.redirect) {
|
||||
route.redirect = `/:project/${options.id}${route.redirect}`;
|
||||
}
|
||||
|
||||
return route;
|
||||
});
|
||||
return route;
|
||||
});
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user