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