prettier + clang-format.
This commit is contained in:
parent
a7922ff44e
commit
1ceeed1007
@ -13,14 +13,17 @@ function get_emojis() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function get_recent(author) {
|
async function get_recent(author) {
|
||||||
let recent = await tfrpc.rpc.query(`
|
let recent = await tfrpc.rpc.query(
|
||||||
|
`
|
||||||
SELECT DISTINCT content ->> '$.vote.expression' AS value
|
SELECT DISTINCT content ->> '$.vote.expression' AS value
|
||||||
FROM messages
|
FROM messages
|
||||||
WHERE author = ? AND
|
WHERE author = ? AND
|
||||||
content ->> '$.type' = 'vote'
|
content ->> '$.type' = 'vote'
|
||||||
ORDER BY timestamp DESC LIMIT 10
|
ORDER BY timestamp DESC LIMIT 10
|
||||||
`, [author]);
|
`,
|
||||||
return recent.map(x => x.value);
|
[author]
|
||||||
|
);
|
||||||
|
return recent.map((x) => x.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function picker(callback, anchor, author) {
|
export async function picker(callback, anchor, author) {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="margin: 0; padding: 0">
|
<body style="margin: 0; padding: 0">
|
||||||
<tf-app/>
|
<tf-app />
|
||||||
<script>
|
<script>
|
||||||
window.litDisableBundleWarning = true;
|
window.litDisableBundleWarning = true;
|
||||||
</script>
|
</script>
|
||||||
|
@ -375,7 +375,10 @@ class TfElement extends LitElement {
|
|||||||
: html`<div>Select or create an identity.</div>`
|
: html`<div>Select or create an identity.</div>`
|
||||||
: this.render_tab();
|
: this.render_tab();
|
||||||
return html`
|
return html`
|
||||||
<div style="width: 100vw; min-height: 100vh; height: 100%" class="w3-theme-dark">
|
<div
|
||||||
|
style="width: 100vw; min-height: 100vh; height: 100%"
|
||||||
|
class="w3-theme-dark"
|
||||||
|
>
|
||||||
<div style="padding: 8px">
|
<div style="padding: 8px">
|
||||||
${this.render_id_picker()} ${tabs}
|
${this.render_id_picker()} ${tabs}
|
||||||
${this.tags.map(
|
${this.tags.map(
|
||||||
|
@ -556,7 +556,8 @@ class TfComposeElement extends LitElement {
|
|||||||
@input=${this.input}
|
@input=${this.input}
|
||||||
@change=${this.change}
|
@change=${this.change}
|
||||||
@paste=${this.paste}
|
@paste=${this.paste}
|
||||||
>${draft.text}</textarea
|
>
|
||||||
|
${draft.text}</textarea
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -565,13 +566,11 @@ class TfComposeElement extends LitElement {
|
|||||||
<div id="preview"></div>
|
<div id="preview"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
${Object.values(draft.mentions || {}).map((x) => self.render_mention(x))}
|
${Object.values(draft.mentions || {}).map((x) =>
|
||||||
|
self.render_mention(x)
|
||||||
|
)}
|
||||||
${this.render_attach_app()} ${this.render_content_warning()}
|
${this.render_attach_app()} ${this.render_content_warning()}
|
||||||
<button
|
<button class="w3-button w3-theme-d1" id="submit" @click=${this.submit}>
|
||||||
class="w3-button w3-theme-d1"
|
|
||||||
id="submit"
|
|
||||||
@click=${this.submit}
|
|
||||||
>
|
|
||||||
Submit
|
Submit
|
||||||
</button>
|
</button>
|
||||||
<button class="w3-button w3-theme-d1" @click=${this.attach}>
|
<button class="w3-button w3-theme-d1" @click=${this.attach}>
|
||||||
|
@ -502,10 +502,7 @@ ${JSON.stringify(mention, null, 2)}</pre
|
|||||||
></tf-compose>
|
></tf-compose>
|
||||||
`
|
`
|
||||||
: html`
|
: html`
|
||||||
<button
|
<button class="w3-button w3-theme-d1" @click=${this.show_reply}>
|
||||||
class="w3-button w3-theme-d1"
|
|
||||||
@click=${this.show_reply}
|
|
||||||
>
|
|
||||||
Reply
|
Reply
|
||||||
</button>
|
</button>
|
||||||
`;
|
`;
|
||||||
@ -690,10 +687,7 @@ ${JSON.stringify(content, null, 2)}</pre
|
|||||||
></tf-compose>
|
></tf-compose>
|
||||||
`
|
`
|
||||||
: html`
|
: html`
|
||||||
<button
|
<button class="w3-button w3-theme-d1" @click=${this.show_reply}>
|
||||||
class="w3-button w3-theme-d1"
|
|
||||||
@click=${this.show_reply}
|
|
||||||
>
|
|
||||||
Reply
|
Reply
|
||||||
</button>
|
</button>
|
||||||
`;
|
`;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1222,7 +1222,8 @@ static void _httpd_endpoint_login(tf_http_request_t* request)
|
|||||||
|
|
||||||
if (form_register && strcmp(form_register, "1") == 0)
|
if (form_register && strcmp(form_register, "1") == 0)
|
||||||
{
|
{
|
||||||
if (!have_account && _is_name_valid(account_name) && password && confirm && strcmp(password, confirm) == 0 && tf_ssb_db_register_account(ssb, account_name, password))
|
if (!have_account && _is_name_valid(account_name) && password && confirm && strcmp(password, confirm) == 0 &&
|
||||||
|
tf_ssb_db_register_account(ssb, account_name, password))
|
||||||
{
|
{
|
||||||
tf_free((void*)send_session);
|
tf_free((void*)send_session);
|
||||||
send_session = _make_session_jwt(ssb, account_name);
|
send_session = _make_session_jwt(ssb, account_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user