diff --git a/frontend/src/features/collections/share-collection.ts b/frontend/src/features/collections/share-collection.ts index 74ccb03051..3ee177eb4a 100644 --- a/frontend/src/features/collections/share-collection.ts +++ b/frontend/src/features/collections/share-collection.ts @@ -7,7 +7,6 @@ import { collectionShareLink } from "./helpers/share-link"; import { BtrixElement } from "@/classes/BtrixElement"; import { ClipboardController } from "@/controllers/clipboard"; -import { type EditCollectionDetail } from "@/pages/org/collection-detail"; import { AnalyticsTrackEvent } from "@/trackEvents"; import { CollectionAccess, @@ -18,7 +17,6 @@ import { track } from "@/utils/analytics"; /** * @fires btrix-change - * @fires btrix-edit-collection {EditCollectionDetail} */ @localized() @customElement("btrix-share-collection") @@ -64,33 +62,9 @@ export class ShareCollection extends BtrixElement { } private renderButton() { - if (!this.collection) { - return html` - - `; - } + if (!this.collection) return; - if (this.collection.access === CollectionAccess.Private) { - return html` - { - this.dispatchEvent( - new CustomEvent("btrix-edit-collection", { - detail: { tab: "sharing" }, - }), - ); - }} - > - - ${msg("Share")} - - `; - } + if (this.collection.access === CollectionAccess.Private) return; return html`
diff --git a/frontend/src/pages/org/collection-detail.ts b/frontend/src/pages/org/collection-detail.ts index 8a53f3b398..389820f403 100644 --- a/frontend/src/pages/org/collection-detail.ts +++ b/frontend/src/pages/org/collection-detail.ts @@ -42,10 +42,6 @@ import { tw } from "@/utils/tailwind"; const ABORT_REASON_THROTTLE = "throttled"; const INITIAL_ITEMS_PAGE_SIZE = 20; -export type EditCollectionDetail = { - tab?: EditDialogTab; -}; - export enum Tab { Replay = "replay", About = "about", @@ -219,13 +215,6 @@ export class CollectionDetail extends BtrixElement { e.stopPropagation(); void this.fetchCollection(); }} - @btrix-edit-collection=${async ( - e: CustomEvent, - ) => { - this.editTab = e.detail.tab; - await this.updateComplete; - this.openDialogName = "edit"; - }} > ${when(this.isCrawler, this.renderActions)}