forked from cory/tildefriends
Compare commits
10 Commits
574292b798
...
969a8da6bf
Author | SHA1 | Date | |
---|---|---|---|
969a8da6bf | |||
2338b26329 | |||
d4df206740 | |||
8a93cdd33c | |||
92b31de4a9 | |||
5452f3f623 | |||
256614dbaf | |||
049449b213 | |||
85b46336b1 | |||
590afa7b01 |
@ -3,9 +3,9 @@
|
||||
MAKEFLAGS += --warn-undefined-variables
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
|
||||
VERSION_CODE := 20
|
||||
VERSION_NUMBER := 0.0.20-wip
|
||||
VERSION_NAME := One word all lowercase four words all uppercase.
|
||||
VERSION_CODE := 21
|
||||
VERSION_NUMBER := 0.0.21-wip
|
||||
VERSION_NAME := Psst. Look behind you.
|
||||
|
||||
SQLITE_URL := https://www.sqlite.org/2024/sqlite-amalgamation-3460000.zip
|
||||
LIBUV_URL := https://dist.libuv.org/dist/v1.48.0/libuv-v1.48.0.tar.gz
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🐌",
|
||||
"previous": "&z0N6jlqflRd4+grj16K/IdllNVLQrPLbr7aKVs/21mE=.sha256"
|
||||
"previous": "&TqpkOAi38Oi6gW6guh95KIvWY2M/vjBE8NLLNHK+M00=.sha256"
|
||||
}
|
||||
|
@ -76,15 +76,9 @@ class TfComposeElement extends LitElement {
|
||||
let preview = this.renderRoot.getElementById('preview');
|
||||
preview.innerHTML = this.process_text(edit.innerText);
|
||||
let content_warning = this.renderRoot.getElementById('content_warning');
|
||||
let content_warning_preview = this.renderRoot.getElementById(
|
||||
'content_warning_preview'
|
||||
);
|
||||
if (content_warning && content_warning_preview) {
|
||||
content_warning_preview.innerText = content_warning.value;
|
||||
}
|
||||
let draft = this.get_draft();
|
||||
draft.text = edit.innerText;
|
||||
draft.content_warning = content_warning?.innerText;
|
||||
draft.content_warning = content_warning?.value;
|
||||
setTimeout(() => this.notify(draft), 0);
|
||||
}
|
||||
|
||||
@ -221,12 +215,8 @@ class TfComposeElement extends LitElement {
|
||||
console.log('encrypted as', message);
|
||||
}
|
||||
try {
|
||||
await tfrpc.rpc.appendMessage(this.whoami, message).then(function () {
|
||||
edit.innerText = '';
|
||||
self.input();
|
||||
await tfrpc.rpc.appendMessage(this.whoami, message);
|
||||
self.notify(undefined);
|
||||
self.requestUpdate();
|
||||
});
|
||||
} catch (error) {
|
||||
alert(error.message);
|
||||
}
|
||||
@ -459,7 +449,7 @@ class TfComposeElement extends LitElement {
|
||||
<input type="checkbox" class="w3-check w3-theme-d1" id="cw" @change=${() => self.set_content_warning(undefined)} checked="checked"></input>
|
||||
<label for="cw">CW</label>
|
||||
</p>
|
||||
<input type="text" class="w3-input w3-border w3-theme-d1" id="content_warning" placeholder="Enter a content warning here." @input=${this.input} @change=${this.change} value=${draft.content_warning}></input>
|
||||
<input type="text" class="w3-input w3-border w3-theme-d1" id="content_warning" placeholder="Enter a content warning here." @input=${self.input} value=${draft.content_warning}></input>
|
||||
</div>
|
||||
`;
|
||||
} else {
|
||||
|
@ -21,14 +21,14 @@
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "tildefriends";
|
||||
version = "0.0.19";
|
||||
version = "0.0.20";
|
||||
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "dev.tildefriends.net";
|
||||
owner = "cory";
|
||||
repo = "tildefriends";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ttqL2wz06Jvn2f6kKIAGpF0nSSle+g4nSlj4jL0D+Fk=";
|
||||
hash = "sha256-q7PQS/OnfPyU74FBsTmuwWn+G8XTJ11ulvTxf1sgUQk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
2
deps/libbacktrace
vendored
2
deps/libbacktrace
vendored
@ -1 +1 @@
|
||||
Subproject commit 11427f31a64b11583fec94b4c2a265c7dafb1ab3
|
||||
Subproject commit 4ead348bb45f753121ca0bd44170ff8352d4c514
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.unprompted.tildefriends"
|
||||
android:versionCode="20"
|
||||
android:versionName="0.0.20-wip">
|
||||
android:versionCode="21"
|
||||
android:versionName="0.0.21-wip">
|
||||
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="34"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
|
@ -188,7 +188,7 @@ static void _database_set_work(tf_ssb_t* ssb, void* user_data)
|
||||
if (sqlite3_prepare(db, "INSERT OR REPLACE INTO properties (id, key, value) VALUES (?1, ?2, ?3)", -1, &statement, NULL) == SQLITE_OK)
|
||||
{
|
||||
if (sqlite3_bind_text(statement, 1, work->id, -1, NULL) == SQLITE_OK && sqlite3_bind_text(statement, 2, work->key, work->key_length, NULL) == SQLITE_OK &&
|
||||
sqlite3_bind_text(statement, 3, work->value, work->value_length, NULL) == SQLITE_OK && sqlite3_step(statement) == SQLITE_OK)
|
||||
sqlite3_bind_text(statement, 3, work->value, work->value_length, NULL) == SQLITE_OK && sqlite3_step(statement) == SQLITE_DONE)
|
||||
{
|
||||
work->result = true;
|
||||
}
|
||||
|
@ -1351,11 +1351,10 @@ static bool _verify_password(const char* password, const char* hash)
|
||||
return out_hash && strcmp(hash, out_hash) == 0;
|
||||
}
|
||||
|
||||
static bool _make_administrator_if_first(tf_ssb_t* ssb, const char* account_name_copy, bool may_become_first_admin)
|
||||
static bool _make_administrator_if_first(tf_ssb_t* ssb, JSContext* context, const char* account_name_copy, bool may_become_first_admin)
|
||||
{
|
||||
JSContext* context = tf_ssb_get_context(ssb);
|
||||
const char* settings = tf_ssb_db_get_property(ssb, "core", "settings");
|
||||
JSValue settings_value = settings ? JS_ParseJSON(context, settings, strlen(settings), NULL) : JS_UNDEFINED;
|
||||
JSValue settings_value = settings && *settings ? JS_ParseJSON(context, settings, strlen(settings), NULL) : JS_UNDEFINED;
|
||||
if (JS_IsUndefined(settings_value))
|
||||
{
|
||||
settings_value = JS_NewObject(context);
|
||||
@ -1523,7 +1522,7 @@ static void _httpd_endpoint_login_work(tf_ssb_t* ssb, void* user_data)
|
||||
tf_free(post_form_data);
|
||||
}
|
||||
|
||||
bool have_administrator = _make_administrator_if_first(ssb, account_name_copy, may_become_first_admin);
|
||||
bool have_administrator = _make_administrator_if_first(ssb, context, account_name_copy, may_become_first_admin);
|
||||
|
||||
if (session_is_new && _form_data_get(form_data, "return") && !login_error)
|
||||
{
|
||||
|
@ -438,7 +438,10 @@ const char* tf_util_backtrace_string()
|
||||
void tf_util_print_backtrace()
|
||||
{
|
||||
const char* bt = tf_util_backtrace_string();
|
||||
if (bt)
|
||||
{
|
||||
tf_printf("%s\n", bt);
|
||||
}
|
||||
tf_free((void*)bt);
|
||||
}
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define VERSION_NUMBER "0.0.20-wip"
|
||||
#define VERSION_NAME "One word all lowercase four words all uppercase."
|
||||
#define VERSION_NUMBER "0.0.21-wip"
|
||||
#define VERSION_NAME "Psst. Look behind you."
|
||||
|
Loading…
Reference in New Issue
Block a user