Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/azure-backoffice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- release/*
- v*/dev
- v*/main
paths:
Expand All @@ -15,6 +16,7 @@ on:
types: [opened, synchronize, reopened, closed]
branches:
- main
- release/*
- v*/dev
- v*/main
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { UMB_BACKOFFICE_CONTEXT } from '../backoffice.context.js';
import type { UmbBackofficeContext } from '../backoffice.context.js';
import type { CSSResultGroup } from '@umbraco-cms/backoffice/external/lit';
import { css, customElement, html, ifDefined, repeat, state } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import type { ManifestSection } from '@umbraco-cms/backoffice/section';
Expand Down Expand Up @@ -113,15 +112,13 @@ export class UmbBackofficeHeaderSectionsElement extends UmbLitElement {
const label = this.localize.string(manifest?.meta.label || manifest?.name);
return html`<uui-tab
data-mark="section-link:${manifest.alias}"
href=${this.#getSectionPath(manifest)}
.href=${this.#getSectionPath(manifest)}
label=${ifDefined(label)}
?active=${this._currentSectionAlias === manifest.alias}
@click=${(event: PointerEvent) => this.#onSectionClick(event, manifest)}
>${label}</uui-tab
>`;
@click=${(event: PointerEvent) => this.#onSectionClick(event, manifest)}></uui-tab>`;
}

static override styles: CSSResultGroup = [
static override readonly styles = [
css`
:host {
display: contents;
Expand Down
10 changes: 5 additions & 5 deletions src/Umbraco.Web.UI.Client/src/assets/lang/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ export default {
chooseMediaStartNode: 'Vælg startnode for medie',
selectMediaType: 'Vælg medietype',
selectIcon: 'Vælg ikon',
selectItem: 'Vælg item',
selectItem: 'Vælg element',
selectLink: 'Vælg link',
addLink: 'Tilføj Link',
updateLink: 'Opdater Link',
Expand Down Expand Up @@ -2356,10 +2356,10 @@ export default {
labelUsedByDocuments: 'Brugt i Dokumenter',
labelUsedByMembers: 'Brugt i Medlemmer',
labelUsedByMedia: 'Brugt i Medier',
itemHasNoReferences: 'This item has no references.',
labelUsedByDocumentTypes: 'Referenced by the following Document Types',
labelUsedByItems: 'Referenced by the following items',
labelDependsOnThis: 'The following items depend on this',
itemHasNoReferences: 'Ingen referencer',
labelUsedByDocumentTypes: 'Refereret af følgende Dokument Typer',
labelUsedByItems: 'Refereret af',
labelDependsOnThis: 'Følgende elementer er afhængige af dette',
labelUsedItems: 'The following items are referenced',
labelUsedDescendants: 'The following descendant items have dependencies',
labelDependentDescendants: 'The following descending items have dependencies',
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2434,7 +2434,7 @@ export default {
'This item or its descendants is being used. Unpublishing can lead to broken links on your website. Please take the appropriate actions.',
deleteDisabledWarning: 'This item or its descendants is being used. Therefore, deletion has been disabled.',
listViewDialogWarning: 'The following items you are trying to %0% are used by other content.',
labelUsedByItems: 'Referenced by the following items',
labelUsedByItems: 'Referenced by',
labelDependsOnThis: 'The following items depend on this',
labelDependentDescendants: 'The following descending items have dependencies',
labelMoreReferences: (count: number) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
* that has a relative HREF, uses the history API instead.
*/
export function ensureAnchorHistory() {
const isWindows = navigator.platform.toUpperCase().indexOf('WIN') !== -1;
const isMac = /Mac|iPhone|iPad|iPod/.test(navigator.userAgent);

window.addEventListener('click', (e: MouseEvent) => {
// If we try to open link in a new tab, then we want to skip skip:
if ((isWindows && e.ctrlKey) || (!isWindows && e.metaKey)) return;
// If we try to open link in a new tab, we want to skip:
// - Mac uses Meta (⌘) + Click
// - Windows and Linux use Ctrl + Click
if ((isMac && e.metaKey) || (!isMac && e.ctrlKey)) return;

// Find the target by using the composed path to get the element through the shadow boundaries.
const $anchor = (('composedPath' in e) as any)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
import { UMB_DATA_TYPE_WORKSPACE_ALIAS } from '../../workspace/constants.js';
import { UMB_DATA_TYPE_REFERENCE_REPOSITORY_ALIAS } from '../constants.js';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import {
UMB_WORKSPACE_CONDITION_ALIAS,
UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS,
} from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'workspaceInfoApp',
kind: 'entityReferences',
name: 'Data Type References Workspace Info App',
alias: 'Umb.WorkspaceInfoApp.DataType.References',
meta: {
referenceRepositoryAlias: UMB_DATA_TYPE_REFERENCE_REPOSITORY_ALIAS,
},
conditions: [
{
alias: UMB_WORKSPACE_CONDITION_ALIAS,
match: UMB_DATA_TYPE_WORKSPACE_ALIAS,
},
{
alias: UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS,
match: false,
},
],
meta: {
referenceRepositoryAlias: UMB_DATA_TYPE_REFERENCE_REPOSITORY_ALIAS,
},
},
];
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
import { UMB_DOCUMENT_WORKSPACE_ALIAS } from '../../workspace/constants.js';
import { UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS } from '../constants.js';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import {
UMB_WORKSPACE_CONDITION_ALIAS,
UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS,
} from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'workspaceInfoApp',
kind: 'entityReferences',
name: 'Document References Workspace Info App',
alias: 'Umb.WorkspaceInfoApp.Document.References',
meta: {
referenceRepositoryAlias: UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS,
},
conditions: [
{
alias: UMB_WORKSPACE_CONDITION_ALIAS,
match: UMB_DOCUMENT_WORKSPACE_ALIAS,
},
{
alias: UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS,
match: false,
},
],
meta: {
referenceRepositoryAlias: UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS,
},
},
];
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
import { UMB_MEDIA_WORKSPACE_ALIAS } from '../../workspace/constants.js';
import { UMB_MEDIA_REFERENCE_REPOSITORY_ALIAS } from '../constants.js';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import {
UMB_WORKSPACE_CONDITION_ALIAS,
UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS,
} from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'workspaceInfoApp',
kind: 'entityReferences',
name: 'Media References Workspace Info App',
alias: 'Umb.WorkspaceInfoApp.Media.References',
meta: {
referenceRepositoryAlias: UMB_MEDIA_REFERENCE_REPOSITORY_ALIAS,
},
conditions: [
{
alias: UMB_WORKSPACE_CONDITION_ALIAS,
match: UMB_MEDIA_WORKSPACE_ALIAS,
},
{
alias: UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS,
match: false,
},
],
meta: {
referenceRepositoryAlias: UMB_MEDIA_REFERENCE_REPOSITORY_ALIAS,
},
},
];
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
import { UMB_MEMBER_WORKSPACE_ALIAS } from '../../workspace/constants.js';
import { UMB_MEMBER_REFERENCE_REPOSITORY_ALIAS } from '../constants.js';
import { UMB_WORKSPACE_CONDITION_ALIAS } from '@umbraco-cms/backoffice/workspace';
import {
UMB_WORKSPACE_CONDITION_ALIAS,
UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS,
} from '@umbraco-cms/backoffice/workspace';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'workspaceInfoApp',
kind: 'entityReferences',
name: 'Member References Workspace Info App',
alias: 'Umb.WorkspaceInfoApp.Member.References',
meta: {
referenceRepositoryAlias: UMB_MEMBER_REFERENCE_REPOSITORY_ALIAS,
},
conditions: [
{
alias: UMB_WORKSPACE_CONDITION_ALIAS,
match: UMB_MEMBER_WORKSPACE_ALIAS,
},
{
alias: UMB_WORKSPACE_ENTITY_IS_NEW_CONDITION_ALIAS,
match: false,
},
],
meta: {
referenceRepositoryAlias: UMB_MEMBER_REFERENCE_REPOSITORY_ALIAS,
},
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export class UmbEntityReferencesWorkspaceInfoAppElement extends UmbLitElement {
}

override render() {
if (!this._items?.length) return nothing;
return html`
<umb-workspace-info-app-layout headline="#references_labelUsedByItems">
<div id="content">${this.#renderItems()} ${this.#renderReferencePagination()}</div>
Expand All @@ -112,7 +111,10 @@ export class UmbEntityReferencesWorkspaceInfoAppElement extends UmbLitElement {
}

#renderItems() {
if (!this._items) return;
if (!this._items) return nothing;
if (this._items.length === 0) {
return html`<umb-localize class="noItems" key="references_itemHasNoReferences"></umb-localize>`;
}
return html`
<uui-ref-list>
${repeat(
Expand Down Expand Up @@ -150,6 +152,11 @@ export class UmbEntityReferencesWorkspaceInfoAppElement extends UmbLitElement {
display: contents;
}

.noItems {
display: block;
margin: var(--uui-size-space-2);
}

#content {
display: block;
padding: var(--uui-size-space-3) var(--uui-size-space-4);
Expand Down
Loading