Skip to content

Commit

Permalink
Fix channel share not rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarrough committed May 29, 2024
1 parent a26552c commit e3172d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/components/r4-share-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ export default class R4ShareChannel extends LitElement {
<form>
<fieldset>
<label for="channel_url">Channel URL</label>
<input readonly name="channel_url" type="url" .value="${channelUrl}" @click="${this.onInputClick}" />
<input readonly name="channel_url" type="url" value="${channelUrl}" @click="${this.onInputClick}" />
</fieldset>
<fieldset>
<label for="channel_iframe">Channel <iframe></label>
<input readonly name="channel_iframe" type="url" .value="${this.iframeHtml}" @click="${this.onInputClick}" />
<label for="channel_iframe">Channel &lt;iframe&gt;</label>
<input readonly name="channel_iframe" type="url" value="${this.iframeHtml}" @click="${this.onInputClick}" />
</fieldset>
<fieldset>
<label for="channel_icon">Channel Icon</label>
<input readonly name="channel_icon" type="url" .value="${this.iconHtml}" @click="${this.onInputClick}" />
<input readonly name="channel_icon" type="url" value="${this.iconHtml}" @click="${this.onInputClick}" />
</fieldset>
</form>
`
Expand Down
4 changes: 3 additions & 1 deletion src/pages/base-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,15 @@ export default class BaseChannel extends R4Page {
return this.renderChannelMenu()
}
}

renderChannelShare() {
return html`
<r4-dialog name="share" @close="${this.onDialogClose}">
<r4-share slot="dialog" origin="${this.channelOrigin}" slug="${this.channel.slug}"></r4-share>
<r4-share-channel slot="dialog" origin="${this.channelOrigin}" .channel=${this.channel}></r4-share-channel>
</r4-dialog>
`
}

renderChannelError() {
return html`<p>404. There is no channel here. Want to <a href="${this.config.href}/new">create one?</a></p>`
}
Expand Down
13 changes: 7 additions & 6 deletions src/pages/r4-page-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default class R4PageChannel extends BaseChannel {
static properties = {
tracks: {type: Array, state: true},
// from base channel
// channel: {type: Object, state: true},
// channelError: {type: Object, state: true},
// canEdit: {type: Boolean, state: true},
// alreadyFollowing: {type: Boolean, state: true},
// followsYou: {type: Boolean, state: true},
// isFirebaseChannel: {type: Boolean, state: true},
channel: {type: Object, state: true},
channelError: {type: Object, state: true},
canEdit: {type: Boolean, state: true},
alreadyFollowing: {type: Boolean, state: true},
followsYou: {type: Boolean, state: true},
isFirebaseChannel: {type: Boolean, state: true},
// from router
params: {type: Object, state: true},
store: {type: Object, state: true},
Expand All @@ -39,6 +39,7 @@ export default class R4PageChannel extends BaseChannel {
.initialQuery=${this.query}
@data=${this.onData}
></r4-query>
${this.channel ? this.renderChannelShare() : null}
`
}

Expand Down

0 comments on commit e3172d0

Please sign in to comment.