Skip to content

Commit

Permalink
Redirect to namespace after creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fajfa committed Jan 6, 2025
1 parent 06831c0 commit 2267752
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions client/web/compose/src/views/Namespace/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,22 @@ export default {
toggleProcessing()
// Handle different navigation scenarios after namespace operation
if (closeOnSuccess) {
this.$router.push(this.previousPage || { name: 'namespace.manage' })
} else if (!this.isEdit || this.isClone) {
this.$router.push({ name: 'namespace.edit', params: { namespaceID: this.namespace.namespaceID } })
} else if (this.isClone) {
this.$router.push({
name: 'namespace.edit',
params: { namespaceID: this.namespace.namespaceID },
})
} else if (!this.isEdit && this.namespace.enabled) {
// If namespace is enabled and user has read access, go to pages view
this.$router.push({
name: 'pages',
params: {
slug: this.namespace.slug || this.namespace.namespaceID,
},
})
}
},
Expand Down

0 comments on commit 2267752

Please sign in to comment.