remove workspace editor redirect
This commit is contained in:
@@ -71,11 +71,8 @@ export class UmbWorkspaceEditorElement extends UmbLitElement {
|
||||
} as UmbRoute;
|
||||
});
|
||||
|
||||
newRoutes.push({
|
||||
path: '',
|
||||
redirectTo: newRoutes[0]?.path,
|
||||
});
|
||||
|
||||
// Duplicate first workspace and use it for the empty path scenario. [NL]
|
||||
newRoutes.push({ ...newRoutes[0], path: '' });
|
||||
}
|
||||
|
||||
newRoutes.push({
|
||||
@@ -116,15 +113,18 @@ export class UmbWorkspaceEditorElement extends UmbLitElement {
|
||||
${repeat(
|
||||
this._workspaceViews,
|
||||
(view) => view.alias,
|
||||
(view) => html`
|
||||
<uui-tab
|
||||
href="${this._routerPath}/view/${view.meta.pathname}"
|
||||
.label="${view.meta.label ? this.localize.string(view.meta.label) : view.name}"
|
||||
?active=${'view/' + view.meta.pathname === this._activePath}>
|
||||
<umb-icon slot="icon" name=${view.meta.icon}></umb-icon>
|
||||
${view.meta.label ? this.localize.string(view.meta.label) : view.name}
|
||||
</uui-tab>
|
||||
`,
|
||||
(view, index) =>
|
||||
// Notice how we use index 0 to determine which workspace that is active with empty path. [NL]
|
||||
html`
|
||||
<uui-tab
|
||||
href="${this._routerPath}/view/${view.meta.pathname}"
|
||||
.label="${view.meta.label ? this.localize.string(view.meta.label) : view.name}"
|
||||
?active=${'view/' + view.meta.pathname === this._activePath ||
|
||||
(index === 0 && this._activePath === '')}>
|
||||
<umb-icon slot="icon" name=${view.meta.icon}></umb-icon>
|
||||
${view.meta.label ? this.localize.string(view.meta.label) : view.name}
|
||||
</uui-tab>
|
||||
`,
|
||||
)}
|
||||
</uui-tab-group>
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user