* fix 17676

* localize
This commit is contained in:
Niels Lyngsø
2025-02-12 10:53:21 +01:00
committed by GitHub
parent 3d8400302a
commit 9c621607d4
4 changed files with 27 additions and 25 deletions

View File

@@ -873,6 +873,7 @@ export default {
unknown: 'Ukendt',
unknownUser: 'Ukendt bruger',
under: 'under',
unnamed: 'Unavngivet',
up: 'Op',
update: 'Opdatér',
upgrade: 'Opdatér',

View File

@@ -911,6 +911,7 @@ export default {
unknown: 'Unknown',
unknownUser: 'Unknown user',
under: 'under',
unnamed: 'Unnamed',
up: 'Up',
update: 'Update',
upgrade: 'Upgrade',

View File

@@ -16,8 +16,11 @@ import './content-editor-tab.element.js';
@customElement('umb-content-workspace-view-edit')
export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements UmbWorkspaceViewElement {
//@state()
//private _hasRootProperties = false;
/*
// root properties is a possible feature with Bellissima, but as it is new its not fully implemented yet [NL]
@state()
private _hasRootProperties = false;
*/
@state()
private _hasRootGroups = false;
@@ -78,6 +81,16 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements
if (!this._tabs || !this.#structureManager) return;
const routes: UmbRoute[] = [];
if (this._hasRootGroups) {
routes.push({
path: `root`,
component: () => import('./content-editor-tab.element.js'),
setup: (component) => {
(component as UmbContentWorkspaceViewEditTabElement).containerId = null;
},
});
}
if (this._tabs.length > 0) {
this._tabs?.forEach((tab) => {
const tabName = tab.name ?? '';
@@ -91,23 +104,11 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements
});
}
if (this._hasRootGroups) {
if (routes.length !== 0) {
routes.push({
path: '',
component: () => import('./content-editor-tab.element.js'),
setup: (component) => {
(component as UmbContentWorkspaceViewEditTabElement).containerId = null;
},
redirectTo: routes[0].path,
});
}
if (routes.length !== 0) {
if (!this._hasRootGroups) {
routes.push({
path: '',
redirectTo: routes[0]?.path,
});
}
routes.push({
path: `**`,
@@ -127,11 +128,9 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements
${this._hasRootGroups && this._tabs.length > 0
? html`
<uui-tab
label="Content"
.active=${this._routerPath + '/' === this._activePath}
href=${this._routerPath + '/'}
>Content</uui-tab
>
.label=${this.localize.term('general_generic')}
.active=${this._routerPath + '/root' === this._activePath}
.href=${this._routerPath + '/root'}></uui-tab>
`
: ''}
${repeat(
@@ -139,9 +138,10 @@ export class UmbContentWorkspaceViewEditElement extends UmbLitElement implements
(tab) => tab.name,
(tab) => {
const path = this._routerPath + '/tab/' + encodeFolderName(tab.name || '');
return html`<uui-tab label=${tab.name ?? 'Unnamed'} .active=${path === this._activePath} href=${path}
>${this.localize.string(tab.name)}</uui-tab
>`;
return html`<uui-tab
.label=${this.localize.string(tab.name ?? '#general_unnamed')}
.active=${path === this._activePath}
.href=${path}></uui-tab>`;
},
)}
</uui-tab-group>`

View File

@@ -34,7 +34,7 @@ export class UmbRouteNotFoundElement extends UmbLitElement {
align-items: center;
height: 100%;
opacity: 0;
animation: fadeIn 4s 0.2s forwards;
animation: fadeIn 6s 0.2s forwards;
}
@keyframes fadeIn {