correcting weight on extension slot

This commit is contained in:
Niels Lyngsø
2023-03-30 09:10:46 +02:00
parent bc080d379e
commit eefae37194
4 changed files with 8 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ const headerApps: Array<ManifestTypes> = [
alias: 'Umb.HeaderApp.Search',
name: 'Header App Search',
loader: () => import('./umb-search-header-app.element'),
weight: 10,
weight: 900,
meta: {
label: 'Search',
icon: 'search',

View File

@@ -97,7 +97,8 @@ export class UmbExtensionSlotElement extends UmbLitElement {
// sort:
// TODO: Make sure its right to have highest last?
this._extensions.sort((a, b) => a.weight - b.weight);
// should not sort here, its done by registry:
//this._extensions.sort((a, b) => a.weight - b.weight);
} else {
// Remove cause we could not get the component, so we will get rid of this.
//this._extensions.splice(this._extensions.indexOf(extensionObject), 1);

View File

@@ -1,6 +1,6 @@
import type { ManifestTypes } from '@umbraco-cms/backoffice/extensions-registry';
import { manifests as modalManifests } from './modals/manifests';
import { manifests as userProfileAppsManifests } from './user-profile-apps/manifests';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extensions-registry';
export const headerApps: Array<ManifestTypes> = [
{
@@ -8,7 +8,7 @@ export const headerApps: Array<ManifestTypes> = [
alias: 'Umb.HeaderApp.CurrentUser',
name: 'Current User',
loader: () => import('./current-user-header-app.element'),
weight: 1000,
weight: 0,
meta: {
label: 'TODO: how should we enable this to not be set.',
icon: 'TODO: how should we enable this to not be set.',

View File

@@ -6,7 +6,7 @@ export const userProfileApps: Array<ManifestUserProfileApp> = [
alias: 'Umb.UserProfileApp.profile',
name: 'Profile User Profile App',
loader: () => import('./user-profile-app-profile.element'),
weight: 0,
weight: 900,
meta: {
label: 'Profile User Profile App',
pathname: 'profile',
@@ -17,7 +17,7 @@ export const userProfileApps: Array<ManifestUserProfileApp> = [
alias: 'Umb.UserProfileApp.ExternalLoginProviders',
name: 'External Login Providers User Profile App',
loader: () => import('./user-profile-app-external-login-providers.element'),
weight: 100,
weight: 800,
meta: {
label: 'External Login Providers User Profile App',
pathname: 'externalLoginProviders',
@@ -39,7 +39,7 @@ export const userProfileApps: Array<ManifestUserProfileApp> = [
alias: 'Umb.UserProfileApp.History',
name: 'History User Profile App',
loader: () => import('./user-profile-app-history.element'),
weight: 300,
weight: 100,
meta: {
label: 'History User Profile App',
pathname: 'history',