mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Add missing system collection redirects (#19522)
* Add missing system collection redirects in content route * Add changeset
This commit is contained in:
5
.changeset/rude-ducks-brake.md
Normal file
5
.changeset/rude-ducks-brake.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@directus/app': patch
|
||||
---
|
||||
|
||||
Added missing system collection redirects in content route
|
||||
@@ -33,6 +33,14 @@ const checkForSystem: NavigationGuard = (to, from) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (to.params.collection === 'directus_dashboards') {
|
||||
if (to.params.primaryKey) {
|
||||
return `/insights/${to.params.primaryKey}`;
|
||||
} else {
|
||||
return '/insights';
|
||||
}
|
||||
}
|
||||
|
||||
if (to.params.collection === 'directus_activity') {
|
||||
if (to.params.primaryKey) {
|
||||
return `/activity/${to.params.primaryKey}`;
|
||||
@@ -41,11 +49,23 @@ const checkForSystem: NavigationGuard = (to, from) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (to.params.collection === 'directus_webhooks') {
|
||||
if (to.params.collection === 'directus_settings') {
|
||||
return '/settings/project';
|
||||
}
|
||||
|
||||
if (to.params.collection === 'directus_collections') {
|
||||
if (to.params.primaryKey) {
|
||||
return `/settings/webhooks/${to.params.primaryKey}`;
|
||||
return `/settings/data-model/${to.params.primaryKey}`;
|
||||
} else {
|
||||
return '/settings/webhooks';
|
||||
return '/settings/data-model';
|
||||
}
|
||||
}
|
||||
|
||||
if (to.params.collection === 'directus_roles') {
|
||||
if (to.params.primaryKey) {
|
||||
return `/settings/roles/${to.params.primaryKey}`;
|
||||
} else {
|
||||
return '/settings/roles';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +85,22 @@ const checkForSystem: NavigationGuard = (to, from) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (to.params.collection === 'directus_webhooks') {
|
||||
if (to.params.primaryKey) {
|
||||
return `/settings/webhooks/${to.params.primaryKey}`;
|
||||
} else {
|
||||
return '/settings/webhooks';
|
||||
}
|
||||
}
|
||||
|
||||
if (to.params.collection === 'directus_flows') {
|
||||
if (to.params.primaryKey) {
|
||||
return `/settings/flows/${to.params.primaryKey}`;
|
||||
} else {
|
||||
return '/settings/flows';
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
'bookmark' in from.query &&
|
||||
typeof from.query.bookmark === 'string' &&
|
||||
@@ -73,6 +109,8 @@ const checkForSystem: NavigationGuard = (to, from) => {
|
||||
) {
|
||||
return addQueryToPath(to.fullPath, { bookmark: from.query.bookmark });
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
const getArchiveValue = (query: LocationQuery) => {
|
||||
|
||||
Reference in New Issue
Block a user