forked from cory/tildefriends
ssb: Allow showing raw messages for contact messages.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"type": "tildefriends-app",
|
"type": "tildefriends-app",
|
||||||
"emoji": "🦀",
|
"emoji": "🦀",
|
||||||
"previous": "&3iV21tLQemlgG/Ui/WfYQyiprW/OBbFa8C3EKzPDt90=.sha256"
|
"previous": "&TTGzyovmfKozjELCGPBFLLEXQcpfaArOMmqzemvz9J8=.sha256"
|
||||||
}
|
}
|
||||||
|
@@ -789,10 +789,16 @@ class TfMessageElement extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
} else if (content.type == 'contact') {
|
} else if (content.type == 'contact') {
|
||||||
|
switch (this.format) {
|
||||||
|
case 'message':
|
||||||
|
default:
|
||||||
return this.render_frame(html`
|
return this.render_frame(html`
|
||||||
<div class="w3-bar">
|
<div class="w3-bar">
|
||||||
<div class="w3-bar-item">
|
<div class="w3-bar-item">
|
||||||
<tf-user id=${this.message.author} .users=${this.users}></tf-user>
|
<tf-user
|
||||||
|
id=${this.message.author}
|
||||||
|
.users=${this.users}
|
||||||
|
></tf-user>
|
||||||
is
|
is
|
||||||
${content.blocking === true
|
${content.blocking === true
|
||||||
? 'blocking'
|
? 'blocking'
|
||||||
@@ -808,41 +814,20 @@ class TfMessageElement extends LitElement {
|
|||||||
.users=${this.users}
|
.users=${this.users}
|
||||||
></tf-user>
|
></tf-user>
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-bar-item w3-right">
|
${this.render_menu()} ${this.render_votes()}
|
||||||
<button class="w3-button w3-theme-d1" @click=${this.toggle_menu}>
|
${this.render_actions()}
|
||||||
%
|
|
||||||
</button>
|
|
||||||
<div
|
|
||||||
class="w3-dropdown-content w3-bar-block w3-card-4 w3-theme-l1"
|
|
||||||
style="right: 48px"
|
|
||||||
>
|
|
||||||
<a
|
|
||||||
target="_top"
|
|
||||||
class="w3-button w3-bar-item"
|
|
||||||
href=${'#' + encodeURIComponent(this.message?.id)}
|
|
||||||
>View Message</a
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
class="w3-button w3-bar-item w3-border-bottom"
|
|
||||||
@click=${this.copy_id}
|
|
||||||
>
|
|
||||||
Copy ID
|
|
||||||
</button>
|
|
||||||
${this.drafts[this.message?.id] === undefined
|
|
||||||
? html`
|
|
||||||
<button
|
|
||||||
class="w3-button w3-bar-item"
|
|
||||||
@click=${this.show_reply}
|
|
||||||
>
|
|
||||||
↩️ Reply
|
|
||||||
</button>
|
|
||||||
`
|
|
||||||
: undefined}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
`);
|
||||||
|
break;
|
||||||
|
case 'raw':
|
||||||
|
return this.render_frame(html`
|
||||||
|
${this.render_header()}
|
||||||
|
<div class="w3-container">${this.render_raw()}</div>
|
||||||
${this.render_votes()} ${this.render_actions()}
|
${this.render_votes()} ${this.render_actions()}
|
||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else if (content.type == 'post') {
|
} else if (content.type == 'post') {
|
||||||
let self = this;
|
let self = this;
|
||||||
let body;
|
let body;
|
||||||
|
Reference in New Issue
Block a user