2 Commits

Author SHA1 Message Date
20c7a71db6 ssb: Add a checkbox to reply in a new thread. #47 Also, it's crab time. I'm sorry it took me so long.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m53s
2024-12-23 12:06:32 -05:00
8475ee0985 build: Let's start work on 0.0.27. 2024-12-23 11:23:51 -05:00
6 changed files with 25 additions and 11 deletions

View File

@ -16,8 +16,8 @@ MAKEFLAGS += --no-builtin-rules
## LD := Linker.
## ANDROID_SDK := Path to the Android SDK.
VERSION_CODE := 31
VERSION_NUMBER := 0.0.26
VERSION_CODE := 32
VERSION_NUMBER := 0.0.27-wip
VERSION_NAME := This program kills fascists.
SQLITE_URL := https://www.sqlite.org/2024/sqlite-amalgamation-3470200.zip

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🐌",
"previous": "&q/1uGp0jMvsYGW7Gj8E33kf6UFo/uNYDXg3zo1sVKQg=.sha256"
"emoji": "🦀",
"previous": "&wH32i/aBIOkc9RfRTQOfpulnPoLSepbHcZlDEHB9V1Y=.sha256"
}

View File

@ -15,6 +15,7 @@ class TfComposeElement extends LitElement {
drafts: {type: Object},
author: {type: String},
channel: {type: String},
new_thread: {type: Boolean},
};
}
@ -28,6 +29,7 @@ class TfComposeElement extends LitElement {
this.apps = undefined;
this.drafts = {};
this.author = undefined;
this.new_thread = false;
}
process_text(text) {
@ -200,7 +202,7 @@ class TfComposeElement extends LitElement {
channel: this.channel,
};
if (this.root || this.branch) {
message.root = this.root;
message.root = this.new_thread ? this.branch ?? this.root : this.root;
message.branch = this.branch;
}
if (Object.values(draft.mentions || {}).length) {
@ -469,6 +471,16 @@ class TfComposeElement extends LitElement {
}
}
render_new_thread() {
let self = this;
if (this.root !== undefined && this.branch !== undefined && this.root != this.branch) {
return html`
<input type="checkbox" class="w3-check w3-theme-d1" id="new_thread" @change=${() => self.new_thread = !self.new_thread} ?checked=${self.new_thread}></input>
<label for="new_thread">New Thread</label>
`;
}
}
get_draft() {
return this.drafts[this.branch || ''] || {};
}
@ -562,7 +574,9 @@ class TfComposeElement extends LitElement {
${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()}
${this.render_new_thread()}
<button class="w3-button w3-theme-d1" id="submit" @click=${this.submit}>
Submit
</button>

View File

@ -21,14 +21,14 @@
}:
pkgs.stdenv.mkDerivation rec {
pname = "tildefriends";
version = "0.0.25";
version = "0.0.26";
src = pkgs.fetchFromGitea {
domain = "dev.tildefriends.net";
owner = "cory";
repo = "tildefriends";
rev = "v${version}";
hash = "sha256-Rfk+CUhi+Ss0z70CCgmtVM/w4nCL1GX/MsD4sPYIa5s=";
hash = "sha256-XJ7M++risfsRn9GkS1zjTQpqqV5S09uyimeVzU9hGGg=";
fetchSubmodules = true;
};

View File

@ -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="31"
android:versionName="0.0.26">
android:versionCode="32"
android:versionName="0.0.27-wip">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application

View File

@ -1,2 +1,2 @@
#define VERSION_NUMBER "0.0.26"
#define VERSION_NUMBER "0.0.27-wip"
#define VERSION_NAME "This program kills fascists."