Merge remote-tracking branch 'origin/dev' into feat/custom-themes

This commit is contained in:
zjs81 committed 2026-10-31 13:43:51 -07:00
commit f0ca703dfb
51 files changed
+207 -365

No files matched your search

+2
View File
@@ -21,6 +21,8 @@ flutter build web --release
The versioned web build uses `dart run build_pipe:build` (also `bun run build`). Web deployment pins Flutter 3.41.2; other CI jobs track stable. Read `pubspec.yaml` for current app version and dependencies rather than copying them into this guide.
For Linux, use `nix develop`; see [Linux with Nix](README.md#linux-with-nix) for the pinned SDK, native build checks, cache troubleshooting, and Sysprof host prerequisites.
## Architecture and important files
| Area | Source |
+53
View File
@@ -150,6 +150,59 @@ The matrix describes implemented functionality, not a guarantee that every featu
flutter run
```
### Linux with Nix
Enter the development shell from the repository root:
```bash
nix develop
flutter --version
pkg-config --exists gtk+-3.0 glib-2.0 gio-2.0 sysprof-capture-4
flutter pub get
flutter build linux --debug
flutter build linux --profile
```
The lockfile currently supplies Flutter 3.47.4 and its matching Dart SDK. The
app requires Flutter 3.41.2 or newer. The Linux shell provides wrapped Clang
compilers, native headers and libraries, and Sysprof capture development files.
Android SDK warnings do not prevent Linux builds.
If an SDK or toolchain update leaves CMake using an old compiler or install
prefix, remove the affected generated cache, for example
`rm -f build/linux/x64/profile/CMakeCache.txt`, and rebuild. If widget tests
report that `ink_sparkle.frag` cannot be decoded after an SDK update, remove
the generated `build/unit_test_assets` directory and rerun `flutter test`.
Launch the profile bundle from a graphical session (replace `x64` with `arm64`
on ARM Linux):
```bash
build/linux/x64/profile/bundle/meshcore_open
```
To record with Sysprof, launch the app through the recorder and press Ctrl+C
when finished. Use a new capture filename for each recording:
```bash
sysprof-cli meshcore.syscap -- build/linux/x64/profile/bundle/meshcore_open
sysprof meshcore.syscap
```
CPU stack sampling requires host support for kernel perf events and appropriate
permissions, potentially through the Sysprof system service and polkit. The Nix
shell supplies tools and libraries, not system services or permission changes.
If Sysprof reports `Permission denied` opening perf events, ask the host
administrator to configure profiling access. A file being created does not
prove CPU samples were recorded; check the recording diagnostics and contents.
For an unprivileged capture smoke test only, use
`sysprof-cli --no-sysprofd --no-perf smoke.syscap -- build/linux/x64/profile/bundle/meshcore_open`;
this intentionally excludes CPU stack sampling.
To update the package pin, run `nix flake update nixpkgs`, review the lockfile
diff, and repeat both Linux builds, analysis, and tests before committing it.
Keep the updated lockfile with the shell configuration for reproducibility.
### Web (self-host)
Use a Chromium browser. Device APIs are origin-gated, so serve the build over HTTPS.
+1 -1
View File
@@ -163,7 +163,7 @@ The auto-translate and composer toggles are disabled until **Enable translation*
Open **App Settings → IPFS provider configuration** to configure IPFS uploads and previews:
- **Public IPFS gateway**: Select Pinata, Filebase, a custom gateway, or deactivate it. This gateway lets the app load bare IPFS content IDs in image links.
- **Public IPFS gateway**: Select Filebase (the default), Pinata, a custom gateway, or deactivate it. This gateway lets the app load bare IPFS content IDs in image links.
- **Upload provider**: Select Pinata, Filebase, a custom provider, or deactivate uploads. Presets fill in the provider’s upload endpoint and upload gateway; custom setups can edit both.
- **API key**: Enter the credential required by the selected provider. The value is masked in the settings dialog. Pinata and Filebase presets require provider credentials.
Generated
+3 -3
View File
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1770562336,
"narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=",
"lastModified": 1793341285,
"narHash": "sha256-Y1CiZ4SoBUjLQyQM/pY+rS2dXD3CHLPstF0lmOc73D4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d6c71932130818840fc8fe9509cf50be8c64634f",
"rev": "1c89083e451e891152365b799595cf7790a43325",
"type": "github"
},
"original": {
+12 -9
View File
@@ -12,11 +12,18 @@
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
devShells.default = (pkgs.mkShell.override {
stdenv = if pkgs.stdenv.hostPlatform.isLinux then pkgs.clangStdenv else pkgs.stdenv;
}) {
nativeBuildInputs = with pkgs; [
cmake
ninja
pkg-config
];
buildInputs = with pkgs; [
# Flutter and Dart
flutter
dart
# Java (required for Android development)
jdk17
@@ -29,22 +36,18 @@
gtk3
glib
sysprof
libclang
cmake
ninja
pkg-config
libdatrie
# Additional tools for installing Android SDK if not present
curl
unzip
] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [
pkgs.libsysprof-capture
];
shellHook = ''
echo "MeshCore Flutter Development Environment"
export PKG_CONFIG_PATH="${pkgs.gtk3}/lib/pkgconfig:${pkgs.glib}/lib/pkgconfig:${pkgs.sysprof}/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [pkgs.gtk3 pkgs.glib pkgs.sysprof pkgs.libdatrie]}:$LD_LIBRARY_PATH"
export CMAKE_INSTALL_PREFIX="$PWD/build/bundle"
# Setup Android SDK in home directory (standard location)
export ANDROID_HOME="$HOME/Android/Sdk"
@@ -62,7 +65,7 @@
echo ""
cat << 'EOF'
mkdir -p ~/Android/Sdk && cd ~/Android/Sdk && \
curl -o cmdline-tools.zip ${if pkgs.stdenv.isDarwin then "https://dl.google.com/android/repository/commandlinetools-mac-10406996_latest.zip" else "https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip"} && \
curl -o cmdline-tools.zip ${if pkgs.stdenv.hostPlatform.isDarwin then "https://dl.google.com/android/repository/commandlinetools-mac-10406996_latest.zip" else "https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip"} && \
unzip -q cmdline-tools.zip && \
mkdir -p cmdline-tools/latest && \
mv cmdline-tools/* cmdline-tools/latest/ 2>/dev/null || echo "Warning: failed to move Android cmdline-tools into 'latest' directory; please check your SDK layout." >&2 && \
-3
View File
@@ -2249,9 +2249,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Зарежда изображенията от линкове във всеки чат, освен ако не сте ги изключили там. Това споделя вашия IP адрес с хостовете на изображения във всеки чат.",
"appSettings_publicIpfsGateway": "Публичен шлюз",
"appSettings_ipfsGatewayDeactivated": "Деактивиран",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Собствен (Kubo)",
"appSettings_uploadIpfsProvider": "Доставчик за качване",
"appSettings_uploadIpfsGateway": "Шлюз за качване",
-3
View File
@@ -2376,9 +2376,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Link-Bilder in jedem Chat laden, sofern sie dort nicht deaktiviert wurden. Dabei wird in jedem Chat Ihre IP-Adresse an Bild-Hosts weitergegeben.",
"appSettings_publicIpfsGateway": "Öffentliches Gateway",
"appSettings_ipfsGatewayDeactivated": "Deaktiviert",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Benutzerdefiniert (Kubo)",
"appSettings_uploadIpfsProvider": "Upload-Anbieter",
"appSettings_uploadIpfsGateway": "Upload-Gateway",
-3
View File
@@ -574,9 +574,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Load link images in every chat unless you turned them off there. This shares your IP address with image hosts in every chat.",
"appSettings_publicIpfsGateway": "Public gateway",
"appSettings_ipfsGatewayDeactivated": "Deactivated",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Custom (Kubo)",
"appSettings_uploadIpfsProvider": "Upload provider",
"appSettings_uploadIpfsGateway": "Upload gateway",
-3
View File
@@ -3472,9 +3472,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Carga las imágenes de enlaces en cada chat salvo que las hayas desactivado allí. Esto comparte tu dirección IP con los servidores de imágenes en todos los chats.",
"appSettings_publicIpfsGateway": "Pasarela pública",
"appSettings_ipfsGatewayDeactivated": "Desactivada",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Personalizada (Kubo)",
"appSettings_uploadIpfsProvider": "Proveedor de subida",
"appSettings_uploadIpfsGateway": "Pasarela de subida",
-3
View File
@@ -3472,9 +3472,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Charger les images des liens dans chaque chat, sauf si vous les avez désactivées dans ce chat. Cela partage votre adresse IP avec les hébergeurs d'images dans tous les chats.",
"appSettings_publicIpfsGateway": "Passerelle publique",
"appSettings_ipfsGatewayDeactivated": "Désactivée",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Personnalisée (Kubo)",
"appSettings_uploadIpfsProvider": "Fournisseur d'envoi",
"appSettings_uploadIpfsGateway": "Passerelle d'envoi",
-3
View File
@@ -293,9 +293,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "A hivatkozott képek betöltése minden csevegésben, ha ott nem kapcsoltad ki. Ez minden csevegésben megosztja az IP-címedet a képtárolókkal.",
"appSettings_publicIpfsGateway": "Nyilvános átjáró",
"appSettings_ipfsGatewayDeactivated": "Kikapcsolva",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Egyéni (Kubo)",
"appSettings_uploadIpfsProvider": "Feltöltési szolgáltató",
"appSettings_uploadIpfsGateway": "Feltöltési átjáró",
-3
View File
@@ -3472,9 +3472,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Carica le immagini dei link in ogni chat, a meno che tu non le abbia disattivate in quella chat. Questo condivide il tuo indirizzo IP con gli host delle immagini in ogni chat.",
"appSettings_publicIpfsGateway": "Gateway pubblico",
"appSettings_ipfsGatewayDeactivated": "Disattivato",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Personalizzato (Kubo)",
"appSettings_uploadIpfsProvider": "Provider di caricamento",
"appSettings_uploadIpfsGateway": "Gateway di caricamento",
-3
View File
@@ -3472,9 +3472,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "チャットごとにオフにしていない限り、すべてのチャットでリンク画像を読み込みます。すべてのチャットで画像ホストにIPアドレスが共有されます。",
"appSettings_publicIpfsGateway": "公開ゲートウェイ",
"appSettings_ipfsGatewayDeactivated": "無効",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "カスタム(Kubo)",
"appSettings_uploadIpfsProvider": "アップロードプロバイダー",
"appSettings_uploadIpfsGateway": "アップロードゲートウェイ",
-3
View File
@@ -3472,9 +3472,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "채팅별로 끄지 않은 한 모든 채팅에서 링크 이미지를 불러옵니다. 모든 채팅에서 이미지 호스트에 내 IP 주소가 공유됩니다.",
"appSettings_publicIpfsGateway": "공개 게이트웨이",
"appSettings_ipfsGatewayDeactivated": "사용 안 함",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "사용자 지정(Kubo)",
"appSettings_uploadIpfsProvider": "업로드 제공자",
"appSettings_uploadIpfsGateway": "업로드 게이트웨이",
-18
View File
@@ -2428,24 +2428,6 @@ abstract class AppLocalizations {
/// **'Deactivated'**
String get appSettings_ipfsGatewayDeactivated;
/// No description provided for @appSettings_ipfsGatewayIpfsIo.
///
/// In en, this message translates to:
/// **'ipfs.io'**
String get appSettings_ipfsGatewayIpfsIo;
/// No description provided for @appSettings_ipfsGatewayPinata.
///
/// In en, this message translates to:
/// **'Pinata'**
String get appSettings_ipfsGatewayPinata;
/// No description provided for @appSettings_ipfsGatewayFilebase.
///
/// In en, this message translates to:
/// **'Filebase'**
String get appSettings_ipfsGatewayFilebase;
/// No description provided for @appSettings_ipfsGatewayCustom.
///
/// In en, this message translates to:
-9
View File
@@ -1340,15 +1340,6 @@ class AppLocalizationsBg extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Деактивиран';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Собствен (Kubo)';
-9
View File
@@ -1334,15 +1334,6 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Deaktiviert';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Benutzerdefiniert (Kubo)';
-9
View File
@@ -1317,15 +1317,6 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Deactivated';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Custom (Kubo)';
-9
View File
@@ -1331,15 +1331,6 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Desactivada';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Personalizada (Kubo)';
-9
View File
@@ -1337,15 +1337,6 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Désactivée';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Personnalisée (Kubo)';
-9
View File
@@ -1327,15 +1327,6 @@ class AppLocalizationsHu extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Kikapcsolva';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Egyéni (Kubo)';
-9
View File
@@ -1337,15 +1337,6 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Disattivato';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Personalizzato (Kubo)';
-9
View File
@@ -1272,15 +1272,6 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => '無効';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'カスタム(Kubo)';
-9
View File
@@ -1276,15 +1276,6 @@ class AppLocalizationsKo extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => '사용 안 함';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => '사용자 지정(Kubo)';
-9
View File
@@ -1327,15 +1327,6 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Uitgeschakeld';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Aangepast (Kubo)';
-9
View File
@@ -1343,15 +1343,6 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Wyłączona';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Własna (Kubo)';
-9
View File
@@ -1335,15 +1335,6 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Desativado';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Personalizado (Kubo)';
-9
View File
@@ -1340,15 +1340,6 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Отключён';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Свой (Kubo)';
-9
View File
@@ -1329,15 +1329,6 @@ class AppLocalizationsSk extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Deaktivované';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Vlastná (Kubo)';
-9
View File
@@ -1328,15 +1328,6 @@ class AppLocalizationsSl extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Deaktivirano';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Po meri (Kubo)';
-9
View File
@@ -1316,15 +1316,6 @@ class AppLocalizationsSv extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Avaktiverad';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Egen (Kubo)';
-9
View File
@@ -1331,15 +1331,6 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => 'Деактивовано';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => 'Власний (Kubo)';
-9
View File
@@ -1255,15 +1255,6 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get appSettings_ipfsGatewayDeactivated => '已停用';
@override
String get appSettings_ipfsGatewayIpfsIo => 'ipfs.io';
@override
String get appSettings_ipfsGatewayPinata => 'Pinata';
@override
String get appSettings_ipfsGatewayFilebase => 'Filebase';
@override
String get appSettings_ipfsGatewayCustom => '自定义 (Kubo)';
-3
View File
@@ -2292,9 +2292,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Laad linkafbeeldingen in elke chat, tenzij je ze daar hebt uitgezet. Hierdoor wordt je IP-adres in elke chat gedeeld met afbeeldingshosts.",
"appSettings_publicIpfsGateway": "Publieke gateway",
"appSettings_ipfsGatewayDeactivated": "Uitgeschakeld",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Aangepast (Kubo)",
"appSettings_uploadIpfsProvider": "Uploadprovider",
"appSettings_uploadIpfsGateway": "Uploadgateway",
-3
View File
@@ -2287,9 +2287,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Wczytuj obrazy z linków w każdym czacie, chyba że je tam wyłączono. Ujawnia to Twój adres IP hostom obrazów w każdym czacie.",
"appSettings_publicIpfsGateway": "Publiczna bramka",
"appSettings_ipfsGatewayDeactivated": "Wyłączona",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Własna (Kubo)",
"appSettings_uploadIpfsProvider": "Dostawca wysyłania",
"appSettings_uploadIpfsGateway": "Bramka wysyłania",
-3
View File
@@ -3338,9 +3338,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Carrega as imagens de links em cada chat, a menos que as tenha desativado lá. Isto partilha o seu endereço IP com os servidores de imagens em todos os chats.",
"appSettings_publicIpfsGateway": "Gateway público",
"appSettings_ipfsGatewayDeactivated": "Desativado",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Personalizado (Kubo)",
"appSettings_uploadIpfsProvider": "Provedor de envio",
"appSettings_uploadIpfsGateway": "Gateway de envio",
-3
View File
@@ -1421,9 +1421,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Загружать изображения из ссылок в каждом чате, если вы не отключили это в нём. Ваш IP-адрес будет виден хостингам изображений во всех чатах.",
"appSettings_publicIpfsGateway": "Публичный шлюз",
"appSettings_ipfsGatewayDeactivated": "Отключён",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Свой (Kubo)",
"appSettings_uploadIpfsProvider": "Провайдер загрузки",
"appSettings_uploadIpfsGateway": "Шлюз загрузки",
-3
View File
@@ -2249,9 +2249,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Načítať obrázky z odkazov v každom chate, ak ste ich tam nevypli. Vaša IP adresa sa tak zdieľa s hostiteľmi obrázkov vo všetkých chatoch.",
"appSettings_publicIpfsGateway": "Verejná brána",
"appSettings_ipfsGatewayDeactivated": "Deaktivované",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Vlastná (Kubo)",
"appSettings_uploadIpfsProvider": "Poskytovateľ nahrávania",
"appSettings_uploadIpfsGateway": "Brána nahrávania",
-3
View File
@@ -3339,9 +3339,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Naloži slike iz povezav v vsakem klepetu, razen če ste jih tam izklopili. To deli vaš naslov IP z gostitelji slik v vsakem klepetu.",
"appSettings_publicIpfsGateway": "Javni prehod",
"appSettings_ipfsGatewayDeactivated": "Deaktivirano",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Po meri (Kubo)",
"appSettings_uploadIpfsProvider": "Ponudnik nalaganja",
"appSettings_uploadIpfsGateway": "Prehod za nalaganje",
-3
View File
@@ -3333,9 +3333,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Ladda länkbilder i alla chattar om du inte har stängt av det där. Det delar din IP-adress med bildhostar i varje chatt.",
"appSettings_publicIpfsGateway": "Offentlig gateway",
"appSettings_ipfsGatewayDeactivated": "Avaktiverad",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Egen (Kubo)",
"appSettings_uploadIpfsProvider": "Uppladdningsleverantör",
"appSettings_uploadIpfsGateway": "Uppladdningsgateway",
-3
View File
@@ -2252,9 +2252,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "Завантажувати зображення з посилань у кожному чаті, якщо ви не вимкнули це там. Це передає вашу IP-адресу хостам зображень у кожному чаті.",
"appSettings_publicIpfsGateway": "Публічний шлюз",
"appSettings_ipfsGatewayDeactivated": "Деактивовано",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "Власний (Kubo)",
"appSettings_uploadIpfsProvider": "Провайдер завантаження",
"appSettings_uploadIpfsGateway": "Шлюз завантаження",
-3
View File
@@ -3343,9 +3343,6 @@
"appSettings_showLinkImagesByDefaultSubtitle": "在每个聊天中加载链接图片,除非你在该聊天中已将其关闭。这会在每个聊天中向图片托管方暴露你的 IP 地址。",
"appSettings_publicIpfsGateway": "公共网关",
"appSettings_ipfsGatewayDeactivated": "已停用",
"appSettings_ipfsGatewayIpfsIo": "ipfs.io",
"appSettings_ipfsGatewayPinata": "Pinata",
"appSettings_ipfsGatewayFilebase": "Filebase",
"appSettings_ipfsGatewayCustom": "自定义 (Kubo)",
"appSettings_uploadIpfsProvider": "上传提供商",
"appSettings_uploadIpfsGateway": "上传网关",
+2 -1
View File
@@ -95,7 +95,8 @@ class Cyr2LatProfile {
class AppSettings {
static const Object _unset = Object();
static const String stadiaDemo = '51bd0381-4685-4666-bae8-48940f6d77c0';
static const String defaultPublicIpfsGateway = 'https://ipfs.io/ipfs/';
static const String defaultPublicIpfsGateway =
'https://ipfs.filebase.io/ipfs/';
final bool clearPathOnMaxRetry;
final bool mapShowRepeaters;
+4 -20
View File
@@ -1684,17 +1684,10 @@ class _IpfsImageLinksDialogState extends State<_IpfsImageLinksDialog> {
value: 'deactivated',
child: Text(l10n.appSettings_ipfsGatewayDeactivated),
),
DropdownMenuItem(
value: 'ipfsio',
child: Text(l10n.appSettings_ipfsGatewayIpfsIo),
),
DropdownMenuItem(
value: 'pinata',
child: Text(l10n.appSettings_ipfsGatewayPinata),
),
DropdownMenuItem(value: 'pinata', child: const Text('Pinata')),
DropdownMenuItem(
value: 'filebase',
child: Text(l10n.appSettings_ipfsGatewayFilebase),
child: const Text('Filebase'),
),
DropdownMenuItem(
value: 'custom',
@@ -1725,13 +1718,10 @@ class _IpfsImageLinksDialogState extends State<_IpfsImageLinksDialog> {
labelText: l10n.appSettings_uploadIpfsProvider,
),
items: [
DropdownMenuItem(
value: 'pinata',
child: Text(l10n.appSettings_ipfsGatewayPinata),
),
DropdownMenuItem(value: 'pinata', child: const Text('Pinata')),
DropdownMenuItem(
value: 'filebase',
child: Text(l10n.appSettings_ipfsGatewayFilebase),
child: const Text('Filebase'),
),
DropdownMenuItem(
value: 'custom',
@@ -1854,10 +1844,6 @@ class _IpfsImageLinksDialogState extends State<_IpfsImageLinksDialog> {
String _gatewayPreset(String value) {
if (value.isEmpty) return 'deactivated';
if (value == AppSettings.defaultPublicIpfsGateway ||
value == 'https://ipfs.io/ipfs') {
return 'ipfsio';
}
if (value == 'https://gateway.pinata.cloud/ipfs/' ||
value == 'https://gateway.pinata.cloud/ipfs') {
return 'pinata';
@@ -1873,8 +1859,6 @@ class _IpfsImageLinksDialogState extends State<_IpfsImageLinksDialog> {
switch (preset) {
case 'deactivated':
return '';
case 'ipfsio':
return AppSettings.defaultPublicIpfsGateway;
case 'pinata':
return 'https://gateway.pinata.cloud/ipfs/';
case 'filebase':
+16 -9
View File
@@ -359,14 +359,27 @@ class NotificationService {
),
];
// Always MessagingStyle: Android Auto only handles messaging notifications
// in that style, so an image preview is shown as the large icon instead.
AndroidNotificationDetails _androidConversationDetails(
_Conversation conversation, {
int? badgeCount,
bool silent = false,
}) {
final imagePath = conversation.imagePath;
final styleInformation = imagePath != null
? BigPictureStyleInformation(
FilePathAndroidBitmap(imagePath),
contentTitle: conversation.title,
summaryText: _collapsedBody(conversation),
showBigPictureWhenCollapsed: true,
)
: MessagingStyleInformation(
Person(key: 'self', name: _selfName ?? _l10n.notification_you),
conversationTitle: conversation.isChannel
? conversation.title
: null,
groupConversation: conversation.isChannel,
messages: List<Message>.of(conversation.messages),
);
return AndroidNotificationDetails(
conversation.isChannel ? 'channel_messages' : 'messages',
conversation.isChannel ? 'Channel Messages' : 'Messages',
@@ -379,13 +392,7 @@ class NotificationService {
number: badgeCount,
silent: silent,
category: AndroidNotificationCategory.message,
largeIcon: imagePath != null ? FilePathAndroidBitmap(imagePath) : null,
styleInformation: MessagingStyleInformation(
Person(key: 'self', name: _selfName ?? _l10n.notification_you),
conversationTitle: conversation.isChannel ? conversation.title : null,
groupConversation: conversation.isChannel,
messages: List<Message>.of(conversation.messages),
),
styleInformation: styleInformation,
actions: _conversationActions(conversation.isChannel),
);
}
+70 -46
View File
@@ -109,6 +109,35 @@ Color networkMapStatusColor(NetworkMapRepeaterStatus status) {
};
}
/// Above this many in-view repeaters, hexagons and marker shadows are skipped.
const int networkMapDenseNodeCount = 30;
/// Above this many in-view links, each line is one stroke at half width
const int networkMapDenseLinkCount = 70;
/// Full style is a 3.5 px confirmed stroke or a 2.5 px unconfirmed stroke,
/// each with a 1 px border. Simple style keeps the pattern and drops the
/// border, so the painter records the line once, at half the stroke width.
Polyline _onlineLinkPolyline(NetworkMapLink link, {required bool simple}) {
final confirmed = link.confirmed;
final strokeWidth = confirmed ? 3.5 : 2.5;
return Polyline(
points: [link.aCell.center, link.bCell.center],
strokeWidth: simple ? strokeWidth / 2 : strokeWidth,
color: MapPalette.router.withValues(alpha: confirmed ? 0.85 : 0.6),
borderStrokeWidth: simple ? 0 : 1,
borderColor: MapPalette.markerOutline.withValues(alpha: 0.7),
pattern: confirmed
? const StrokePattern.solid()
: StrokePattern.dashed(segments: const [10, 8]),
);
}
/// Map layers for the online network: links, repeater hexagons and a
/// tappable center marker so small cells stay visible when zoomed out.
///
@@ -120,51 +149,44 @@ List<Widget> buildNetworkMapOnlineLayers({
required ValueChanged<NetworkMapRepeater> onTap,
}) {
final repeaters = controller.repeaters;
final links = controller.links;
final dropHexagons = repeaters.length > networkMapDenseNodeCount;
final simpleLines = links.length > networkMapDenseLinkCount;
return [
PolylineLayer(
polylines: [
for (final link in controller.links)
Polyline(
points: [link.aCell.center, link.bCell.center],
strokeWidth: link.confirmed ? 3.5 : 2.5,
color: MapPalette.router.withValues(
alpha: link.confirmed ? 0.85 : 0.6,
),
borderStrokeWidth: 1,
borderColor: MapPalette.markerOutline.withValues(alpha: 0.7),
pattern: link.confirmed
? const StrokePattern.solid()
: StrokePattern.dashed(segments: const [10, 8]),
),
for (final link in links)
_onlineLinkPolyline(link, simple: simpleLines),
],
),
GestureDetector(
onTap: () {
final hits = controller.hitNotifier.value?.hitValues;
if (hits != null && hits.isNotEmpty) onTap(hits.first);
},
child: PolygonLayer<NetworkMapRepeater>(
hitNotifier: controller.hitNotifier,
polygons: [
for (final repeater in repeaters)
if (repeater.cell.boundary.length >= 3)
Polygon<NetworkMapRepeater>(
points: repeater.cell.boundary,
hitValue: repeater,
color: localMarkerKeys.contains(repeater.key)
? null
: networkMapStatusColor(
repeater.status,
).withValues(alpha: 0.22),
borderColor: networkMapStatusColor(repeater.status),
borderStrokeWidth: 2.5,
pattern: repeater.confirmed
? const StrokePattern.solid()
: StrokePattern.dashed(segments: const [8, 6]),
),
],
if (!dropHexagons)
GestureDetector(
onTap: () {
final hits = controller.hitNotifier.value?.hitValues;
if (hits != null && hits.isNotEmpty) onTap(hits.first);
},
child: PolygonLayer<NetworkMapRepeater>(
hitNotifier: controller.hitNotifier,
polygons: [
for (final repeater in repeaters)
if (repeater.cell.boundary.length >= 3)
Polygon<NetworkMapRepeater>(
points: repeater.cell.boundary,
hitValue: repeater,
color: localMarkerKeys.contains(repeater.key)
? null
: networkMapStatusColor(
repeater.status,
).withValues(alpha: 0.22),
borderColor: networkMapStatusColor(repeater.status),
borderStrokeWidth: 2.5,
pattern: repeater.confirmed
? const StrokePattern.solid()
: StrokePattern.dashed(segments: const [8, 6]),
),
],
),
),
),
MarkerLayer(
markers: [
for (final repeater in repeaters)
@@ -183,13 +205,15 @@ List<Widget> buildNetworkMapOnlineLayers({
color: MapPalette.markerOutline,
width: 2.5,
),
boxShadow: const [
BoxShadow(
color: MapPalette.markerShadow,
blurRadius: 6,
offset: Offset(0, 2),
),
],
boxShadow: dropHexagons
? null
: const [
BoxShadow(
color: MapPalette.markerShadow,
blurRadius: 6,
offset: Offset(0, 2),
),
],
),
child: Icon(
repeater.type == advTypeRoom
@@ -51,18 +51,18 @@ void main() {
);
});
test('resolves ipfs cid links with the default ipfs.io gateway', () async {
test('resolves ipfs cid links with the default Filebase gateway', () async {
expect(
await MessageUrlImageHelper.parse(
'my picture: ipfs://bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly text',
),
'https://ipfs.io/ipfs/bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly',
'https://ipfs.filebase.io/ipfs/bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly',
);
expect(
await MessageUrlImageHelper.parse(
'my picture: ipfs:bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly text',
),
'https://ipfs.io/ipfs/bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly',
'https://ipfs.filebase.io/ipfs/bafybeibq75ws6nwk6wi473dch42wwy6woyj4dwdfy7nfz3buqx2caieoly',
);
});
+5 -9
View File
@@ -457,12 +457,12 @@ void main() {
expect(AppSettings.fromJson(saved).showLinkImagesByDefault, isTrue);
});
test('public IPFS gateway defaults to ipfs.io when never set', () {
test('public IPFS gateway defaults to Filebase when never set', () {
expect(
AppSettings.fromJson({}).publicIpfsGateway,
'https://ipfs.io/ipfs/',
'https://ipfs.filebase.io/ipfs/',
);
expect(AppSettings().publicIpfsGateway, 'https://ipfs.io/ipfs/');
expect(AppSettings().publicIpfsGateway, 'https://ipfs.filebase.io/ipfs/');
});
test('public IPFS gateway keeps a saved empty value as deactivated', () {
@@ -470,12 +470,8 @@ void main() {
expect(AppSettings.fromJson(saved).publicIpfsGateway, isEmpty);
});
test('public IPFS gateway keeps saved ipfs.io and dweb.link values', () {
for (final gateway in [
'https://ipfs.io/ipfs/',
'https://dweb.link/ipfs/',
'https://gateway.example.com/ipfs/',
]) {
test('public IPFS gateway keeps saved custom values', () {
for (final gateway in ['https://gateway.example.com/ipfs/']) {
final saved = AppSettings(publicIpfsGateway: gateway).toJson();
expect(AppSettings.fromJson(saved).publicIpfsGateway, gateway);
}
@@ -61,34 +61,30 @@ int _readIntOption(Socket socket, int level, int option) {
}
void main() {
test(
'connect enables TCP keepalive with short probe timings',
() async {
final server = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
final overrides = _CapturingConnectOverrides();
final service = TcpTransportService();
try {
await IOOverrides.runZoned(
() => service.connect(
host: InternetAddress.loopbackIPv4.address,
port: server.port,
),
socketConnect: overrides.socketConnect,
);
final socket = overrides.socket!;
// Linux values: SO_KEEPALIVE 9, TCP_KEEPIDLE 4, TCP_KEEPINTVL 5,
// TCP_KEEPCNT 6.
expect(_readIntOption(socket, RawSocketOption.levelSocket, 9), 1);
expect(_readIntOption(socket, RawSocketOption.levelTcp, 4), 30);
expect(_readIntOption(socket, RawSocketOption.levelTcp, 5), 10);
expect(_readIntOption(socket, RawSocketOption.levelTcp, 6), 3);
} finally {
await service.disconnect();
await server.close();
}
},
skip: Platform.isLinux ? false : 'Option numbers checked are Linux ones',
);
test('connect enables TCP keepalive with short probe timings', () async {
final server = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
final overrides = _CapturingConnectOverrides();
final service = TcpTransportService();
try {
await IOOverrides.runZoned(
() => service.connect(
host: InternetAddress.loopbackIPv4.address,
port: server.port,
),
socketConnect: overrides.socketConnect,
);
final socket = overrides.socket!;
// Linux values: SO_KEEPALIVE 9, TCP_KEEPIDLE 4, TCP_KEEPINTVL 5,
// TCP_KEEPCNT 6.
expect(_readIntOption(socket, RawSocketOption.levelSocket, 9), 1);
expect(_readIntOption(socket, RawSocketOption.levelTcp, 4), 30);
expect(_readIntOption(socket, RawSocketOption.levelTcp, 5), 10);
expect(_readIntOption(socket, RawSocketOption.levelTcp, 6), 3);
} finally {
await service.disconnect();
await server.close();
}
}, skip: Platform.isLinux ? false : 'Option numbers checked are Linux ones');
test('connect/disconnect updates TCP transport state', () async {
final server = await ServerSocket.bind(InternetAddress.loopbackIPv4, 0);
+6 -1
View File
@@ -154,7 +154,12 @@ FFI_PLUGIN_EXPORT int fl_open(int flh, char *portname, int baudrate)
port->serialport = new serial::Serial();
#if !defined(__linux__) && !defined(__APPLE__)
port->serialport->setTimeout(serial::Timeout(0, 2, 0, 0, 0));
#endif // #if defined(__linux__)
#else
// With a zero read timeout, read() returns immediately on an idle
// O_NONBLOCK port and SerialThread spins. A short timeout lets select()
// sleep; arriving data still wakes it immediately.
port->serialport->setTimeout(10, 10, 0, 0, 0);
#endif
port->serialport->setPort(portname);
port->serialport->setBaudrate(baudrate);
+6 -1
View File
@@ -167,7 +167,12 @@ FFI_PLUGIN_EXPORT int fl_open(int flh, char *portname, int baudrate)
port->serialport = new serial::Serial();
#if !defined(__linux__) && !defined(__APPLE__)
port->serialport->setTimeout(serial::Timeout(0, 2, 0, 0, 0));
#endif // #if defined(__linux__)
#else
// With a zero read timeout, read() returns immediately on an idle
// O_NONBLOCK port and SerialThread spins. A short timeout lets select()
// sleep; arriving data still wakes it immediately.
port->serialport->setTimeout(10, 10, 0, 0, 0);
#endif
port->serialport->setPort(portname);
port->serialport->setBaudrate(baudrate);