11 Commits

Author SHA1 Message Date
951155f1b6 build: Use this apksigner workaround for reproducible builds: https://gitlab.com/fdroid/fdroiddata/-/issues/3299.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 29m57s
2025-07-02 20:35:51 -04:00
1b678175ef build: Missed a number. Let's build a 0.0.32.1 with the version bumps and release it on F-Droid to see that we can.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
2025-07-02 19:34:33 -04:00
8eb1f40eec build: Only build docs once, and use the right number of jobs. 2025-07-02 19:12:08 -04:00
235887b3bf android: Bump android versions in the gitea action, too.
Some checks failed
Build Tilde Friends / Build-All (push) Failing after 32m19s
2025-07-02 18:59:29 -04:00
0b3d66dd48 android: Google says: 'App must target Android 15 (API level 35) or higher'. Bump SDK versions while I'm in here.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
2025-07-02 18:53:04 -04:00
beb9ef3754 ssb: Add a missing 'Encrypt' label. 2025-07-02 18:30:35 -04:00
9f6a480736 ssb: Nudge around some space around the compose widget. 2025-07-02 18:29:02 -04:00
b3bac2927d ssb: Shorten the timed query output.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
2025-07-02 18:21:40 -04:00
ef389f2ba2 ssb: The unread line can be used to make everything above read. 2025-07-02 18:19:34 -04:00
ef21dc6ae8 ssb: Use img title=, not alt= for more browser support.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 36m42s
2025-07-02 12:49:14 -04:00
6e55b6b49e ssb: Show sync/stay connected options on the sidebar when relevant. 2025-07-02 12:41:03 -04:00
14 changed files with 75 additions and 30 deletions

View File

@ -48,7 +48,7 @@ jobs:
- name: Build documentation
run: |
mkdir -p out/html/ ~/.ssh/
make docs
make -j`nproc` docs
echo 'pildefriends ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKD3Kde5vDO0TrMBDK0IGGeNGe/XinWAZkSQ/rXxwUjt' >> ~/.ssh/known_hosts
rsync -avP --delete -e "ssh -i /opt/keys/ssh.ed25519" out/html/ tfdocs@pildefriends:docs/html/
- name: Setup JDK
@ -59,11 +59,11 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: 'tools platform-tools build-tools;34.0.0 platforms;android-34 ndk;26.3.11579264'
packages: 'tools platform-tools build-tools;35.0.0 platforms;android-35 ndk;27.2.12479018'
- name: Docker build
run: DOCKER_BUILDKIT=1 docker build .
- name: Build
run: ANDROID_SDK=$HOME/.android/sdk make -j`nproc` all dist docs
run: ANDROID_SDK=$HOME/.android/sdk make -j`nproc` all dist
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:

View File

@ -18,7 +18,7 @@ MAKEFLAGS += --no-builtin-rules
VERSION_CODE := 39
VERSION_CODE_IOS := 15
VERSION_NUMBER := 0.0.33-wip
VERSION_NUMBER := 0.0.32.1
VERSION_NAME := This program kills fascists.
IPHONEOS_VERSION_MIN=14.0
@ -106,10 +106,10 @@ LDFLAGS += \
-Wno-aggressive-loop-optimizations
ANDROID_MIN_SDK_VERSION := 24
ANDROID_TARGET_SDK_VERSION := 34
ANDROID_BUILD_TOOLS := $(ANDROID_SDK)/build-tools/34.0.0
ANDROID_TARGET_SDK_VERSION := 35
ANDROID_BUILD_TOOLS := $(ANDROID_SDK)/build-tools/35.0.0
ANDROID_PLATFORM := $(ANDROID_SDK)/platforms/android-$(ANDROID_TARGET_SDK_VERSION)
ANDROID_NDK ?= $(ANDROID_SDK)/ndk/26.3.11579264
ANDROID_NDK ?= $(ANDROID_SDK)/ndk/27.2.12479018
ANDROID_ARMV7A_TARGETS := \
out/androiddebug-armv7a/tildefriends \
@ -1055,7 +1055,7 @@ out/TildeFriends.aab: out/apk/classes.dex $(filter-out %debug%, $(ANDROID_TARGET
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --only-keep-debug out/androidrelease-x86_64/tildefriends -o out/aab/staging/BUNDLE-METADATA/com.android.tools.build.debugsymbols/x86_64/libtildefriends.so.sym
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --only-keep-debug out/androidrelease-x86/tildefriends -o out/aab/staging/BUNDLE-METADATA/com.android.tools.build.debugsymbols/x86/libtildefriends.so.sym
@cd out/aab/staging; zip -u ../../../$@ BUNDLE-METADATA/com.android.tools.build.debugsymbols/arm64-v8a/libtildefriends.so.sym BUNDLE-METADATA/com.android.tools.build.debugsymbols/armeabi-v7a/libtildefriends.so.sym BUNDLE-METADATA/com.android.tools.build.debugsymbols/x86_64/libtildefriends.so.sym BUNDLE-METADATA/com.android.tools.build.debugsymbols/x86/libtildefriends.so.sym; cd ../../../
@$(ANDROID_BUILD_TOOLS)/apksigner sign -ks .keys/android.jks --ks-key-alias androidKey -ks-pass pass:android --min-sdk-version=$(ANDROID_MIN_SDK_VERSION) $@
@$(ANDROID_BUILD_TOOLS)/apksigner sign -ks .keys/android.jks --ks-key-alias androidKey -ks-pass pass:android --min-sdk-version=$(ANDROID_MIN_SDK_VERSION) --alignment-preserved $@
aab: out/TildeFriends.aab ## Build an Android App Bundle.
.PHONY: aab
@ -1117,12 +1117,12 @@ out/apk/TildeFriends-%.fdroid.unsigned.apk:
out/%.apk: out/apk/%.unsigned.apk
@echo "[apksigner] $(notdir $@)"
@$(ANDROID_BUILD_TOOLS)/apksigner sign --ks .keys/android.jks --ks-key-alias androidKey --ks-pass pass:android --key-pass pass:android --min-sdk-version $(ANDROID_MIN_SDK_VERSION) --out $@ $<
@$(ANDROID_BUILD_TOOLS)/apksigner sign --ks .keys/android.jks --ks-key-alias androidKey --ks-pass pass:android --key-pass pass:android --min-sdk-version $(ANDROID_MIN_SDK_VERSION) --out $@ --alignment-preserved $<
out/%.zopfli.apk: out/%.apk
@echo "[zopfli] $(notdir $@)"
$(ANDROID_BUILD_TOOLS)/zipalign -f -z 4 $< $@.zopfli
@$(ANDROID_BUILD_TOOLS)/apksigner sign --ks .keys/android.jks --ks-key-alias androidKey --ks-pass pass:android --key-pass pass:android --min-sdk-version $(ANDROID_MIN_SDK_VERSION) --out $@ $@.zopfli
@$(ANDROID_BUILD_TOOLS)/apksigner sign --ks .keys/android.jks --ks-key-alias androidKey --ks-pass pass:android --key-pass pass:android --min-sdk-version $(ANDROID_MIN_SDK_VERSION) --out $@ --alignment-preserved $@.zopfli
release-apk: out/TildeFriends-arm-release.zopfli.apk out/TildeFriends-x86-release.zopfli.apk ## Build an Android release APK.
.PHONY: release-apk

View File

@ -1,5 +1,5 @@
{
"type": "tildefriends-app",
"emoji": "🦀",
"previous": "&9egAArMLNHQzp1yniwnxD41e4T7qXWAfLNJdH4LrXS8=.sha256"
"previous": "&Ym1vefMN4CV4UIgLuV+zu52qj58WwIScctt4v5YIHmQ=.sha256"
}

View File

@ -360,7 +360,7 @@ class TfElement extends LitElement {
let start = new Date();
let result = await tfrpc.rpc.query(sql, args);
let end = new Date();
console.log((end - start) / 1000, sql);
console.log((end - start) / 1000, sql.replaceAll(/\s+/g, ' ').trim());
return result;
}
@ -601,9 +601,13 @@ class TfElement extends LitElement {
.channels_latest=${this.channels_latest}
.channels_unread=${this.channels_unread}
@channelsetunread=${this.channel_set_unread}
@refresh=${this.refresh}
@toggle_stay_connected=${this.toggle_stay_connected}
.connections=${this.connections}
.private_messages=${this.private_messages}
.recent_reactions=${this.recent_reactions}
?is_administrator=${this.is_administrator}
?stay_connected=${this.stay_connected}
></tf-tab-news>
`;
} else if (this.tab === 'connections') {

View File

@ -581,7 +581,7 @@ class TfComposeElement extends LitElement {
class="w3-button w3-bar-item w3-theme-d1"
@click=${() => this.set_encrypt([])}
>
🔐
🔐 Encrypt
</button>`;
let result = html`
<style>
@ -602,7 +602,7 @@ class TfComposeElement extends LitElement {
: undefined}
${this.render_encrypt()}
</header>
<div class="w3-container w3-padding-small">
<div class="w3-container" style="padding: 0 0 16px 0">
<div class="w3-half">
<span
class="w3-input w3-theme-d1 w3-border"
@ -623,7 +623,7 @@ class TfComposeElement extends LitElement {
${Object.values(draft.mentions || {}).map((x) =>
self.render_mention(x)
)}
<footer class="w3-container">
<footer>
${this.render_attach_app()} ${this.render_content_warning()}
${this.render_new_thread()}
<button

View File

@ -233,7 +233,19 @@ class TfNewsElement extends LitElement {
<div
style="border-bottom: 1px solid #f00; flex: 1; align-self: center; height: 1px"
></div>
<div style="color: #f00; padding: 8px">unread</div>
<button
style="color: #f00; padding: 8px"
class="w3-button"
@click=${() =>
this.dispatchEvent(
new Event('mark_all_read', {
bubbles: true,
composed: true,
})
)}
>
unread
</button>
<div
style="border-bottom: 1px solid #f00; flex: 1; align-self: center; height: 1px"
></div>

View File

@ -486,6 +486,7 @@ class TfTabNewsFeedElement extends LitElement {
channel=${this.channel()}
channel_unread=${this.channels_unread?.[this.channel()]}
.recent_reactions=${this.recent_reactions}
@mark_all_read=${this.mark_all_read}
></tf-news>
${more}
`);

View File

@ -26,6 +26,8 @@ class TfTabNewsElement extends LitElement {
private_messages: {type: Array},
recent_reactions: {type: Array},
peer_exchange: {type: Boolean},
is_administrator: {type: Boolean},
stay_connected: {type: Boolean},
};
}
@ -174,10 +176,6 @@ class TfTabNewsElement extends LitElement {
.map((x) => x[0]);
}
refresh() {
tfrpc.rpc.sync();
}
async enable_peer_exchange() {
await tfrpc.rpc.globalSettingsSet('peer_exchange', true);
await this.check_peer_exchange();
@ -196,6 +194,32 @@ class TfTabNewsElement extends LitElement {
>
&times;
</div>
${this.is_administrator
? html`
<button
class="w3-bar-item w3-button"
@click=${() =>
this.dispatchEvent(
new Event('refresh', {bubbles: true, composed: true})
)}
>
<span style="width: 1.5em; height: 1.5em; padding: 8px">↻</span>
Sync now
</button>
<button
class="w3-bar-item w3-button w3-ripple"
@click=${() =>
this.dispatchEvent(
new Event('toggle_stay_connected', {
bubbles: true,
composed: true,
})
)}
>
${this.stay_connected ? '🔗 Online mode' : '⛓️‍💥 Passive mode'}
</button>
`
: undefined}
${this.hash.startsWith('##') &&
this.channels.indexOf(this.hash.substring(2)) == -1
? html`
@ -266,7 +290,10 @@ class TfTabNewsElement extends LitElement {
(this.connections?.some((x) => x.flags.one_shot)
? ' w3-spin'
: '')}
@click=${this.refresh}
@click=${() =>
this.dispatchEvent(
new Event('refresh', {bubbles: true, composed: true})
)}
>
↻ Sync now
</button>

View File

@ -34,11 +34,10 @@ class TfUserElement extends LitElement {
>😎</span
>`;
let name = this.users?.[this.id]?.name;
let name_string = name ?? this.fallback_name ?? this.id;
name = this.icon_only
? undefined
: html`<a target="_top" href=${'#' + this.id}
>${name ?? this.fallback_name ?? this.id}</a
>`;
: html`<a target="_top" href=${'#' + this.id}>${name_string}</a>`;
if (user) {
let image_link = user.image;
@ -52,7 +51,7 @@ class TfUserElement extends LitElement {
class=${'w3-theme-l4 ' + shape}
style="width: 2em; height: 2em; vertical-align: middle; object-fit: cover"
src="/${image_link}/view"
alt=${name ?? this.fallback_name ?? this.id}
title=${name_string + ' (' + this.id + ')'}
/>`;
}
}

View File

@ -50,9 +50,9 @@ function image(node, entering) {
'</div>'
);
if (this.options.safe && potentiallyUnsafe(node.destination)) {
this.lit('<img src="" alt="');
this.lit('<img src="" title="');
} else {
this.lit('<img src="' + this.esc(node.destination) + '" alt="');
this.lit('<img src="' + this.esc(node.destination) + '" title="');
}
}
this.disableTags += 1;

View File

@ -0,0 +1,2 @@
* Updating Android SDK+target versions.
* Minor UI improvements.

View File

@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unprompted.tildefriends"
android:versionCode="39"
android:versionName="0.0.33-wip">
android:versionName="0.0.32.1">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application

View File

@ -13,7 +13,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.33</string>
<string>0.0.32.1</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>

View File

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