File tree Expand file tree Collapse file tree 2 files changed +2
-39
lines changed Expand file tree Collapse file tree 2 files changed +2
-39
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { collectionShareLink } from "./helpers/share-link";
7
7
8
8
import { BtrixElement } from "@/classes/BtrixElement" ;
9
9
import { ClipboardController } from "@/controllers/clipboard" ;
10
- import { type EditCollectionDetail } from "@/pages/org/collection-detail" ;
11
10
import { AnalyticsTrackEvent } from "@/trackEvents" ;
12
11
import {
13
12
CollectionAccess ,
@@ -18,7 +17,6 @@ import { track } from "@/utils/analytics";
18
17
19
18
/**
20
19
* @fires btrix-change
21
- * @fires btrix-edit-collection {EditCollectionDetail}
22
20
*/
23
21
@localized ( )
24
22
@customElement ( "btrix-share-collection" )
@@ -64,33 +62,9 @@ export class ShareCollection extends BtrixElement {
64
62
}
65
63
66
64
private renderButton ( ) {
67
- if ( ! this . collection ) {
68
- return html `
69
- < sl-skeleton
70
- effect ="pulse "
71
- class ="h-[var(--sl-input-height-small)] w-20 [--border-radius:var(--sl-input-border-radius-small)] "
72
- > </ sl-skeleton >
73
- ` ;
74
- }
65
+ if ( ! this . collection ) return ;
75
66
76
- if ( this . collection . access === CollectionAccess . Private ) {
77
- return html `
78
- < sl-button
79
- variant =${ this . collection . crawlCount ? "primary" : "default" }
80
- size ="small"
81
- @click=${ ( ) => {
82
- this . dispatchEvent (
83
- new CustomEvent < EditCollectionDetail > ( "btrix-edit-collection" , {
84
- detail : { tab : "sharing" } ,
85
- } ) ,
86
- ) ;
87
- } }
88
- >
89
- < sl-icon name ="box-arrow-up " slot ="prefix "> </ sl-icon >
90
- ${ msg ( "Share" ) }
91
- </ sl-button >
92
- ` ;
93
- }
67
+ if ( this . collection . access === CollectionAccess . Private ) return ;
94
68
95
69
return html `
96
70
< div class ="flex items-center gap-2 ">
Original file line number Diff line number Diff line change @@ -42,10 +42,6 @@ import { tw } from "@/utils/tailwind";
42
42
const ABORT_REASON_THROTTLE = "throttled" ;
43
43
const INITIAL_ITEMS_PAGE_SIZE = 20 ;
44
44
45
- export type EditCollectionDetail = {
46
- tab ?: EditDialogTab ;
47
- } ;
48
-
49
45
export enum Tab {
50
46
Replay = "replay" ,
51
47
About = "about" ,
@@ -219,13 +215,6 @@ export class CollectionDetail extends BtrixElement {
219
215
e . stopPropagation ( ) ;
220
216
void this . fetchCollection ( ) ;
221
217
} }
222
- @btrix-edit-collection=${ async (
223
- e : CustomEvent < EditCollectionDetail > ,
224
- ) => {
225
- this . editTab = e . detail . tab ;
226
- await this . updateComplete ;
227
- this . openDialogName = "edit" ;
228
- } }
229
218
></btrix-share-collection>
230
219
${ when ( this . isCrawler , this . renderActions ) }
231
220
</div>
You can’t perform that action at this time.
0 commit comments