forked from cory/tildefriends
Prettier.
This commit is contained in:
parent
d528bc808e
commit
a947396bad
@ -236,7 +236,13 @@ class TfElement extends LitElement {
|
|||||||
console.log(by_count.sort((x, y) => y.count - x.count).slice(0, 20));
|
console.log(by_count.sort((x, y) => y.count - x.count).slice(0, 20));
|
||||||
let start_time = new Date();
|
let start_time = new Date();
|
||||||
users = await this.fetch_about(Object.keys(following).sort(), users);
|
users = await this.fetch_about(Object.keys(following).sort(), users);
|
||||||
console.log('about took', (new Date() - start_time) / 1000.0, 'seconds for', Object.keys(users).length, 'users');
|
console.log(
|
||||||
|
'about took',
|
||||||
|
(new Date() - start_time) / 1000.0,
|
||||||
|
'seconds for',
|
||||||
|
Object.keys(users).length,
|
||||||
|
'users'
|
||||||
|
);
|
||||||
this.following = Object.keys(following);
|
this.following = Object.keys(following);
|
||||||
this.users = users;
|
this.users = users;
|
||||||
await tags;
|
await tags;
|
||||||
|
@ -542,15 +542,16 @@ class TfComposeElement extends LitElement {
|
|||||||
${this.render_encrypt()}
|
${this.render_encrypt()}
|
||||||
<div class="w3-container w3-padding-small">
|
<div class="w3-container w3-padding-small">
|
||||||
<div class="w3-half">
|
<div class="w3-half">
|
||||||
<span
|
<span
|
||||||
class="w3-input w3-theme-d1 w3-border"
|
class="w3-input w3-theme-d1 w3-border"
|
||||||
style="resize: vertical; width: 100%; overflow: hidden; white-space: pre-wrap"
|
style="resize: vertical; width: 100%; overflow: hidden; white-space: pre-wrap"
|
||||||
placeholder="Write a post here."
|
placeholder="Write a post here."
|
||||||
id="edit"
|
id="edit"
|
||||||
@input=${this.input}
|
@input=${this.input}
|
||||||
@paste=${this.paste}
|
@paste=${this.paste}
|
||||||
contenteditable
|
contenteditable
|
||||||
>${draft.text}</span>
|
>${draft.text}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-half w3-padding">
|
<div class="w3-half w3-padding">
|
||||||
${content_warning}
|
${content_warning}
|
||||||
|
@ -72,10 +72,7 @@ class TfMessageElement extends LitElement {
|
|||||||
return expression;
|
return expression;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return html`<div
|
return html`<div class="w3-button" @click=${this.show_reactions}>
|
||||||
class="w3-button"
|
|
||||||
@click=${this.show_reactions}
|
|
||||||
>
|
|
||||||
${(this.message.votes || []).map(
|
${(this.message.votes || []).map(
|
||||||
(vote) => html`
|
(vote) => html`
|
||||||
<span
|
<span
|
||||||
|
@ -23,29 +23,45 @@ class TfReactionsModalElement extends LitElement {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
let self = this;
|
let self = this;
|
||||||
return this.votes?.length ? html`
|
return this.votes?.length
|
||||||
<div class="w3-modal w3-animate-opacity" style="display: block; box-sizing: border-box">
|
? html` <div
|
||||||
<div class="w3-modal-content w3-card-4 w3-theme-d1">
|
class="w3-modal w3-animate-opacity"
|
||||||
<div class="w3-container w3-padding">
|
style="display: block; box-sizing: border-box"
|
||||||
<header class="w3-container">
|
>
|
||||||
<h2>Reactions</h2>
|
<div class="w3-modal-content w3-card-4 w3-theme-d1">
|
||||||
<span class="w3-button w3-display-topright" @click=${this.clear}>×</span>
|
<div class="w3-container w3-padding">
|
||||||
</header>
|
<header class="w3-container">
|
||||||
<ul class="w3-theme-dark w3-container w3-ul">
|
<h2>Reactions</h2>
|
||||||
${this.votes.map(x => html`
|
<span class="w3-button w3-display-topright" @click=${this.clear}
|
||||||
<li class="w3-bar">
|
>×</span
|
||||||
<span class="w3-bar-item">${x?.content?.vote?.expression}</span>
|
>
|
||||||
<tf-user class="w3-bar-item" id=${x.author} .users=${this.users}></tf-user>
|
</header>
|
||||||
<span class="w3-bar-item w3-right">${new Date(x?.timestamp).toLocaleString()}</span>
|
<ul class="w3-theme-dark w3-container w3-ul">
|
||||||
</li>
|
${this.votes.map(
|
||||||
`)}
|
(x) => html`
|
||||||
</ul>
|
<li class="w3-bar">
|
||||||
<footer class="w3-container w3-padding">
|
<span class="w3-bar-item"
|
||||||
<button class="w3-button" @click=${this.clear}>Close</button>
|
>${x?.content?.vote?.expression}</span
|
||||||
</footer>
|
>
|
||||||
</div>
|
<tf-user
|
||||||
</div>
|
class="w3-bar-item"
|
||||||
</div>` : undefined;
|
id=${x.author}
|
||||||
|
.users=${this.users}
|
||||||
|
></tf-user>
|
||||||
|
<span class="w3-bar-item w3-right"
|
||||||
|
>${new Date(x?.timestamp).toLocaleString()}</span
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
`
|
||||||
|
)}
|
||||||
|
</ul>
|
||||||
|
<footer class="w3-container w3-padding">
|
||||||
|
<button class="w3-button" @click=${this.clear}>Close</button>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`
|
||||||
|
: undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,8 +346,13 @@ class TfNavigationElement extends LitElement {
|
|||||||
${this.render_permissions()}
|
${this.render_permissions()}
|
||||||
${this.status?.message && !this.status.is_error
|
${this.status?.message && !this.status.is_error
|
||||||
? html`
|
? html`
|
||||||
<link type="text/css" rel="stylesheet" href="/static/w3.css" />
|
<link type="text/css" rel="stylesheet" href="/static/w3.css" />
|
||||||
<div class="w3-bar-item" style="color: ${this.status.color ?? kStatusColor}">${this.status.message}</div>
|
<div
|
||||||
|
class="w3-bar-item"
|
||||||
|
style="color: ${this.status.color ?? kStatusColor}"
|
||||||
|
>
|
||||||
|
${this.status.message}
|
||||||
|
</div>
|
||||||
`
|
`
|
||||||
: undefined}
|
: undefined}
|
||||||
${Object.keys(this.spark_lines)
|
${Object.keys(this.spark_lines)
|
||||||
|
Loading…
Reference in New Issue
Block a user