prettier + clang-format.
This commit is contained in:
parent
a7922ff44e
commit
1ceeed1007
@ -13,14 +13,17 @@ function get_emojis() {
|
||||
}
|
||||
|
||||
async function get_recent(author) {
|
||||
let recent = await tfrpc.rpc.query(`
|
||||
let recent = await tfrpc.rpc.query(
|
||||
`
|
||||
SELECT DISTINCT content ->> '$.vote.expression' AS value
|
||||
FROM messages
|
||||
WHERE author = ? AND
|
||||
content ->> '$.type' = 'vote'
|
||||
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) {
|
||||
|
@ -11,7 +11,7 @@
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0">
|
||||
<tf-app/>
|
||||
<tf-app />
|
||||
<script>
|
||||
window.litDisableBundleWarning = true;
|
||||
</script>
|
||||
|
@ -375,7 +375,10 @@ class TfElement extends LitElement {
|
||||
: html`<div>Select or create an identity.</div>`
|
||||
: this.render_tab();
|
||||
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">
|
||||
${this.render_id_picker()} ${tabs}
|
||||
${this.tags.map(
|
||||
|
@ -556,7 +556,8 @@ class TfComposeElement extends LitElement {
|
||||
@input=${this.input}
|
||||
@change=${this.change}
|
||||
@paste=${this.paste}
|
||||
>${draft.text}</textarea
|
||||
>
|
||||
${draft.text}</textarea
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
@ -565,13 +566,11 @@ class TfComposeElement extends LitElement {
|
||||
<div id="preview"></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()}
|
||||
<button
|
||||
class="w3-button w3-theme-d1"
|
||||
id="submit"
|
||||
@click=${this.submit}
|
||||
>
|
||||
<button class="w3-button w3-theme-d1" id="submit" @click=${this.submit}>
|
||||
Submit
|
||||
</button>
|
||||
<button class="w3-button w3-theme-d1" @click=${this.attach}>
|
||||
|
@ -502,10 +502,7 @@ ${JSON.stringify(mention, null, 2)}</pre
|
||||
></tf-compose>
|
||||
`
|
||||
: html`
|
||||
<button
|
||||
class="w3-button w3-theme-d1"
|
||||
@click=${this.show_reply}
|
||||
>
|
||||
<button class="w3-button w3-theme-d1" @click=${this.show_reply}>
|
||||
Reply
|
||||
</button>
|
||||
`;
|
||||
@ -690,10 +687,7 @@ ${JSON.stringify(content, null, 2)}</pre
|
||||
></tf-compose>
|
||||
`
|
||||
: html`
|
||||
<button
|
||||
class="w3-button w3-theme-d1"
|
||||
@click=${this.show_reply}
|
||||
>
|
||||
<button class="w3-button w3-theme-d1" @click=${this.show_reply}>
|
||||
Reply
|
||||
</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 (!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);
|
||||
send_session = _make_session_jwt(ssb, account_name);
|
||||
|
Loading…
Reference in New Issue
Block a user