Compare commits

..

1 Commits
trunk ... trunk

407 changed files with 6153 additions and 34784 deletions

View File

@ -8,7 +8,7 @@ clone:
steps:
- name: clone
image: openpriv/flutter-desktop:linux-fstable-3.19.3
image: cirrusci/flutter:dev
environment:
buildbot_key_b64:
from_secret: buildbot_key_b64
@ -20,18 +20,18 @@ steps:
# force by pass of ssh host key check, less secure
- ssh-keyscan -H git.openprivacy.ca >> ~/.ssh/known_hosts
# use Drone ssh var instead of hardcode to allow forks to build (gogs@git.openprivacy.ca:cwtch.im/cwtch-ui.git)
- git clone gogs@git.openprivacy.ca:$DRONE_REPO.git .
- git clone $DRONE_GIT_SSH_URL .
- git checkout $DRONE_COMMIT
- name: fetch
image: openpriv/flutter-desktop:linux-fstable-3.19.3
image: cirrusci/flutter:2.5.0-6.0.pre
volumes:
- name: deps
path: /root/.pub-cache
commands:
- ./fetch-tor.sh
- echo `git describe --tags --abbrev=1` > VERSION
- echo `git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M` > COMMIT_DATE
- echo `date +%G-%m-%d-%H-%M` > BUILDDATE
- flutter pub get
- mkdir deploy
- ./fetch-libcwtch-go.sh
@ -47,46 +47,21 @@ steps:
# #Todo: fix all the lint errors and add `-set_exit_status` above to enforce linting
- name: build-linux
image: openpriv/flutter-desktop:linux-fstable-3.19.3
image: openpriv/flutter-desktop:linux-fdev2.5rc
volumes:
- name: deps
path: /root/.pub-cache
commands:
- flutter build linux --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat COMMIT_DATE`
- flutter build linux --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat BUILDDATE`
- linux/package-release.sh
- mkdir -p deploy/cwtch
- mkdir -p deploy/deb/cwtch/usr
- mkdir -p deploy/deb/cwtch/DEBIAN
- export VERSION=`cat VERSION | tr -d 'v'`
- sed "s|VERSION|$VERSION|g" linux/deb/control > deploy/deb/cwtch/DEBIAN/control
- cp -r build/linux/x64/release/bundle/* deploy/cwtch
- cd deploy
- cd cwtch
- INSTALL_PREFIX=./../deb/cwtch/usr DESKTOP_PREFIX=/usr/ ./install.sh
- cd ..
# we depend on tor, get it from the tor project apt repo
- rm -r deb/cwtch/usr/lib/cwtch/Tor
# Tar archives need a few tricks to make this deterministic, see https://reproducible-builds.org/docs/archives/
- tar --sort=name --mtime=`cat COMMIT_DATE` --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime -czf cwtch-`cat ../VERSION`.tar.gz cwtch
- tar -czf cwtch-`cat ../VERSION`.tar.gz cwtch
- rm -r cwtch
- cd deb
- dpkg-deb --build cwtch
- cd ..
- mv deb/cwtch.deb cwtch-$VERSION.deb
- rm -r deb
- name: linux-ui-tests
image: openpriv/flutter-desktop:linux-fstable-3.19.3
volumes:
- name: deps
path: /root/.pub-cache
commands:
# Run 01_general, 01_tor, 02_global_settings, and 04_profile_mgmt features...
- ./run-tests-headless.sh "01_general|01_tor|02_global_settings|04_profile_mgmt"
- name: test-build-android
image: openpriv/flutter-desktop:linux-fstable-3.19.3
image: cirrusci/flutter:2.5.0-6.0.pre
when:
event: pull_request
volumes:
@ -96,7 +71,7 @@ steps:
- flutter build apk --debug
- name: build-android
image: openpriv/flutter-desktop:linux-fstable-3.19.3
image: cirrusci/flutter:2.5.0-6.0.pre
when:
event: push
environment:
@ -111,16 +86,16 @@ steps:
- echo $upload_jks_file_b64 > upload-keystore.jks.b64
- base64 -i --decode upload-keystore.jks.b64 > android/app/upload-keystore.jks
- sed -i "s/%jks-password%/$upload_jks_pass/g" android/key.properties
- flutter build appbundle --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat COMMIT_DATE`
- flutter build appbundle --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat BUILDDATE`
# cant do debug for final release, this is just a stop gap
- flutter build apk --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat COMMIT_DATE`
- flutter build apk --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat BUILDDATE`
# or build apk --split-per-abi ?
- cp build/app/outputs/bundle/release/app-release.aab deploy/cwtch-`cat VERSION`.aab
- cp build/app/outputs/apk/release/app-release.apk deploy/cwtch-`cat VERSION`.apk
- cp build/app/outputs/bundle/release/app-release.aab deploy/
- cp build/app/outputs/apk/release/app-release.apk deploy/
#- cp build/app/outputs/flutter-apk/app-debug.apk deploy/android
- name: widget-tests
image: openpriv/flutter-desktop:linux-fstable-3.19.3
image: cirrusci/flutter:2.5.0-6.0.pre
volumes:
- name: deps
path: /root/.pub-cache
@ -129,24 +104,8 @@ steps:
- flutter test --coverage
- genhtml coverage/lcov.info -o coverage/html
- name: upload-nightlies
image: openpriv/flutter-desktop:linux-fstable-3.19.3
environment:
GOGS_ACCOUNT_TOKEN:
from_secret: gogs_account_token
secrets: [gogs_account_token]
volumes:
- name: deps
path: /root/.pub-cache
when:
event: push
status: [ success ]
commands:
- ./upload-releases.sh deploy/cwtch-`cat VERSION`.apk application/vnd.android.package-archive cwtch-`cat VERSION`.apk
- name: deploy-buildfiles
image: kroniak/ssh-client
pull: if-not-exists
environment:
BUILDFILES_KEY:
from_secret: buildfiles_key
@ -158,21 +117,29 @@ steps:
- echo $BUILDFILES_KEY > ~/id_rsab64
- base64 -d ~/id_rsab64 > ~/id_rsa
- chmod 400 ~/id_rsa
- export DIR=flwtch-`cat COMMIT_DATE`-`cat VERSION`
- export DIR=flwtch-`cat VERSION`-`cat BUILDDATE`
- mv deploy $DIR
- cp -r coverage/html $DIR/coverage-tests
- cp -r test/failures $DIR/test-failures || true
- cd $DIR
- find . -type f -exec sha512sum {} \; > ./../sha512s.txt
- mv ./../sha512s.txt .
- find . -type f -exec sha256sum {} \; > ./../sha256s.txt
- mv ./../sha256s.txt .
- cd ..
# TODO: do deployment once files actaully compile
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/
- ./gen-nightly-index.sh $DIR
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa cwtch-nightly.html buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/
- name: notify-email
image: drillster/drone-email
settings:
host: build.openprivacy.ca
port: 25
skip_verify: true
from: drone@openprivacy.ca
when:
status: [ failure ]
- name: notify-gogs
image: openpriv/drone-gogs
pull: if-not-exists
when:
event: pull_request
status: [ success, changed, failure ]
@ -187,7 +154,7 @@ volumes:
temp: {}
trigger:
#repo: cwtch.im/cwtch-ui # allow forks to build?
repo: cwtch.im/cwtch-ui
branch: trunk
event:
- push
@ -208,7 +175,7 @@ clone:
steps:
- name: clone
image: openpriv/flutter-desktop:windows-sdk30-fstable-3.19.3
image: openpriv/flutter-desktop:windows-sdk30-fdev2.5rc
environment:
buildbot_key_b64:
from_secret: buildbot_key_b64
@ -220,78 +187,78 @@ steps:
- git init
# -o UserKnownHostsFile=../known_hosts
- git config core.sshCommand 'ssh -o StrictHostKeyChecking=no -i ../id_rsa'
- git remote add origin gogs@git.openprivacy.ca:$Env:DRONE_REPO.git
- git remote add origin $Env:DRONE_GIT_SSH_URL
- git pull origin trunk
- git fetch --tags
- git checkout $Env:DRONE_COMMIT
- name: fetch
image: openpriv/flutter-desktop:windows-sdk30-fstable-3.19.3
image: openpriv/flutter-desktop:windows-sdk30-fdev2.5rc
commands:
- powershell -command "Invoke-WebRequest -Uri https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-win64-0.4.6.5.zip -OutFile tor.zip"
- powershell -command "if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne '7917561a7a063440a1ddfa9cb544ab9ffd09de84cea3dd66e3cc9cd349dd9f85b74a522ec390d7a974bc19b424c4d53af60e57bbc47e763d13cab6a203c4592f' ) { Write-Error 'tor.zip sha512sum mismatch' }"
- git describe --tags --abbrev=1 > VERSION
- git log -1 --format=%cd --date=format:'%Y-%m-%d-%H-%M' > COMMIT_DATE
- .\fetch-tor-win.ps1
- powershell -command "Get-Date -Format 'yyyy-MM-dd-HH-mm'" > BUILDDATE
- .\fetch-libcwtch-go.ps1
- name: build-windows
image: openpriv/flutter-desktop:windows-sdk30-fstable-3.19.3
image: openpriv/flutter-desktop:windows-sdk30-fdev2.5rc
commands:
- flutter pub get
- $Env:version += type .\VERSION
- $Env:commitdate += type .\COMMIT_DATE
- $Env:releasedir = "build\\windows\\x64\\runner\\Release\\"
- flutter build windows --dart-define BUILD_VER=$Env:version --dart-define BUILD_DATE=$Env:commitdate
- $Env:builddate += type .\BUILDDATE
- $Env:releasedir = "build\\windows\\runner\\Release\\"
- flutter build windows --dart-define BUILD_VER=$Env:version --dart-define BUILD_DATE=$Env:builddate
- copy windows\libCwtch.dll $Env:releasedir
# flutter hasn't worked out it's packaging of required dll's so we have to resort to this manual nonsense
# https://github.com/google/flutter-desktop-embedding/issues/587
# https://github.com/flutter/flutter/issues/53167
- copy 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Redist\MSVC\14.36.32532\x64\Microsoft.VC143.CRT\vcruntime140.dll' $Env:releasedir
- copy 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Redist\MSVC\14.36.32532\x64\Microsoft.VC143.CRT\vcruntime140_1.dll' $Env:releasedir
- copy 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Redist\MSVC\14.36.32532\x64\Microsoft.VC143.CRT\msvcp140.dll' $Env:releasedir
- copy C:\BuildTools\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.CRT\vcruntime140.dll $Env:releasedir
- copy C:\BuildTools\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.CRT\vcruntime140_1.dll $Env:releasedir
- copy C:\BuildTools\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.CRT\msvcp140.dll $Env:releasedir
- copy README.md $Env:releasedir\
- copy windows\*.bat $Env:releasedir\
- powershell -command "Expand-Archive -Path tor.zip -DestinationPath $Env:releasedir\Tor"
- name: package-windows
image: openpriv/nsis
pull: if-not-exists
image: openpriv/nsis:latest
when:
event: push
status: [ success ]
environment:
pfx:
from_secret: pfx2022_b64
from_secret: pfx
pfx_pass:
from_secret: pfx_pass
commands:
- $Env:version += type .\VERSION
- $Env:commitdate += type .\COMMIT_DATE
- $Env:releasedir = "build\\windows\\x64\\runner\\Release\\"
- $Env:builddate += type .\BUILDDATE
- $Env:releasedir = "build\\windows\\runner\\Release\\"
- $Env:zip = 'cwtch-' + $Env:version + '.zip'
- $Env:zipsha = $Env:zip + '.sha512.txt'
- $Env:buildname = 'flwtch-' + $Env:commitdate + '-' + $Env:version
- $Env:zipsha = $Env:zip + '.sha512'
- $Env:msix = 'cwtch-install-' + $Env:version + '.msix'
- $Env:msixsha = $Env:msix + '.sha512'
- $Env:buildname = 'flwtch-win-' + $Env:version + '-' + $Env:builddate
- $Env:builddir = $Env:buildname
- echo $Env:pfx > codesign.pfx.b64
- certutil -decode codesign.pfx.b64 codesign.pfx
- signtool sign /v /fd sha256 /a /f codesign.pfx /p $Env:pfx_pass /tr http://timestamp.digicert.com $Env:releasedir\cwtch.exe
- signtool sign /v /fd sha256 /a /f codesign.pfx /p $Env:pfx_pass /tr http://timestamp.digicert.com $Env:releasedir\libCwtch.dll
- signtool sign /v /fd sha256 /a /f codesign.pfx /p $Env:pfx_pass /tr http://timestamp.digicert.com $Env:releasedir\flutter_windows.dll
- copy windows\runner\resources\knot_128.ico $Env:releasedir\cwtch.ico
- makensis windows\nsis\cwtch-installer.nsi
- move windows\nsis\cwtch-installer.exe cwtch-installer.exe
- signtool sign /v /fd sha256 /a /f codesign.pfx /p $Env:pfx_pass /tr http://timestamp.digicert.com cwtch-installer.exe
- powershell -command "(Get-FileHash cwtch-installer.exe -Algorithm sha512).Hash" > cwtch-installer.sha512.txt
- powershell -command "(Get-FileHash cwtch-installer.exe -Algorithm sha512).Hash" > cwtch-installer.sha512
- mkdir deploy
- mkdir deploy\$Env:builddir
- move $Env:releasedir $Env:builddir
- powershell -command "Compress-Archive -Path $Env:builddir -DestinationPath cwtch.zip"
- powershell -command "(Get-FileHash cwtch.zip -Algorithm sha512).Hash" > $Env:zipsha
- move cwtch-installer.exe deploy\$Env:builddir\cwtch-installer-$Env:version.exe
- move cwtch-installer.exe deploy\$Env:builddir\cwtch-installer.exe
- move cwtch.zip deploy\$Env:builddir\$Env:zip
- move *.sha512.txt deploy\$Env:builddir
- move *.sha512 deploy\$Env:builddir
- name: deploy-windows
image: openpriv/flutter-desktop:windows-sdk30-fstable-3.19.3
image: openpriv/flutter-desktop:windows-sdk30-fdev2.5rc
when:
event: push
status: [ success ]
@ -304,93 +271,7 @@ steps:
- scp -r -o StrictHostKeyChecking=no -i id_rsa deploy\\* buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/
trigger:
# repo: cwtch.im/cwtch-ui # allow forks to build?
branch: trunk
event:
- push
- pull_request
---
kind: pipeline
type: exec
name: macos
platform:
os: darwin
arch: amd64
clone:
disable: true
steps:
- name: clone
environment:
buildbot_key_b64:
from_secret: buildbot_key_b64
commands:
- mkdir ~/.ssh
- echo $buildbot_key_b64 > ~/.ssh/id_rsa.b64
- ls -lh ~/.ssh/id_rsa.b64
- base64 -d -i ~/.ssh/id_rsa.b64 -o ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa
# force by pass of ssh host key check, less secure
- ssh-keyscan -H git.openprivacy.ca >> ~/.ssh/known_hosts
- git init
- git config core.sshCommand 'ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa'
- git remote add origin gogs@git.openprivacy.ca:$DRONE_REPO.git
- git pull origin trunk
- git fetch --tags
- git checkout $DRONE_COMMIT
# use Drone ssh var instead of hardcode to allow forks to build (gogs@git.openprivacy.ca:cwtch.im/cwtch-ui.git)
#- git clone gogs@git.openprivacy.ca:$DRONE_REPO.git .
#- git checkout $DRONE_COMMIT
- name: fetch
commands:
- ./fetch-tor-macos.sh
- echo `git describe --tags --abbrev=1` > VERSION
- echo `git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M` > COMMIT_DATE
- export PATH=$PATH:/Users/drone/development/flutter/bin
- flutter pub get
- mkdir deploy
- ./fetch-libcwtch-go-macos.sh
# Drone builds in container directories and gem seems to have some weird side effects so have to manually re install these locally
- gem install --user-install ffi -v 1.15.5 -- --enable-libffi-alloc
# currently unneeded to reinstall but was, and may be again? so saving
#- gem install --user-install cocoapods -v 1.11.3
- name: build-macos
commands:
- export PATH=$PATH:/Users/drone/bin/flutter/bin
- export PATH=$GEM_HOME/ruby/2.6.0/bin:$PATH
- flutter doctor
- flutter build macos --dart-define BUILD_VER=`cat VERSION` --dart-define BUILD_DATE=`cat COMMIT_DATE`
- export PATH=$PATH:/opt/homebrew/bin/ #create-dmg
- macos/package-release.sh
- mkdir -p deploy
- mv Cwtch.dmg deploy/Cwtch-`cat VERSION`.dmg
- name: deploy-buildfiles
environment:
BUILDFILES_KEY:
from_secret: buildfiles_key
when:
event: push
status: [ success ]
commands:
- echo $BUILDFILES_KEY > ~/id_rsab64
- base64 -d -i ~/id_rsab64 -o ~/id_rsa
- chmod 400 ~/id_rsa
- export DIR=flwtch-`cat COMMIT_DATE`-`cat VERSION`
- mv deploy $DIR
- cd $DIR
- find . -type f -exec shasum -a 512 {} \; > ./../Cwtch.dmg.sha512.txt
- mv ./../Cwtch.dmg.sha512.txt .
- cd ..
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/
trigger:
#repo: cwtch.im/cwtch-ui # allow forks to build?
repo: cwtch.im/cwtch-ui
branch: trunk
event:
- push

38
.gitignore vendored
View File

@ -3,16 +3,11 @@
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
package.json
package-lock.json
libCwtch*
cwtch.aar
node_modules
test_home
# IntelliJ related
*.iml
@ -35,7 +30,6 @@ test_home
.pub-cache/
.pub/
/build/
./lib/gen/
# Web related
lib/generated_plugin_registrant.dart
@ -46,32 +40,8 @@ app.*.symbols
# Obfuscation related
app.*.map.json
# Tor
*data-dir*
# Test Artificats
*.log
flutter_gherkin
run-tests.env
report.json
package.
# Compiled Libs
linux/tor
linux/libCwtch.so
android/app/cwtch/cwtch.aar
android/app/src/main/jniLibs/*/libtor.so
*.dylib
integration_test/gherkin_suite_test.g.dart
integration_test/gherkin_suite_test.dart
integration_test/gherkin/
integration_test/CustomSteps.md
analysis_options.yaml
integration_test/env/default/tor
integration_test/env/temp*
linux/Tor
linux/tor.tar.gz
libCwtch.so
android/cwtch/cwtch.aar
coverage
test/failures
.gradle
.gradle

View File

@ -1,30 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.
version:
revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
revision: 78910062997c3a836feee883712c241a5fd22983
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: macos
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

View File

@ -1 +1 @@
2024-02-26-18-01-v0.0.14
v1.1.1-16-g7376218-2021-08-25-16-54

View File

@ -1,5 +1,5 @@
MIT License
Copyright (c) 2021-2024 Open Privacy Research Society
Copyright (c) 2021 Open Privacy Research Society
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@ -1,8 +0,0 @@
# NSIS Notes
## Images
Requires Windows 3 Compatible Bitmaps.
Can convert to the correct format with e.g. `mogrify -compress none -format bmp3 windows/nsis/cwtch_title.bmp
`

View File

@ -12,76 +12,40 @@ This README covers build instructions, for information on Cwtch itself please go
- `install.home.sh` installs the app into your home directory
- `install.sys.sh` as root to install system wide
- or run out of the unziped directory
- MacOS: Available from [https://cwtch.im/download/](https://cwtch.im/download/) as a .dmg
## Running
Cwtch processes the following environment variables:
- `CWTCH_HOME=` overrides the default storage path of `~/.cwtch` with what ever you choose
- `LOG_FILE=` will reroute all of libcwtch-go's logging to the specified file instead of the console
- `LOG_FILE=` will reroute all of libcwtch-go's logging to the specified file instead of the console
- `LOG_LEVEL=debug` will set the log level to debug instead of info
## Running Tests
You can run specific tests with `./run-tests-headless.sh`. See also the `.drone.yml` file for information on the specific tests that run.1
The gherkin test framework will occasionally fail silently with incomplete test. This is usually because a previous run resulted in an exception and the underlying Tor
process was not cleaned up (See #711).
## Building
### Getting Started
First you will need a valid [flutter sdk installation](https://flutter.dev/docs/get-started/install).
First you will need a valid [flutter sdk installation](https://flutter.dev/docs/get-started/install)
and run `flutter pub get` to fetch dependencies.
You will probably want to disable Analytics on the Flutter Tool: `flutter config --no-analytics`
This project uses the flutter `stable` channel
Once flutter is set up, run `flutter pub get` from this project folder to fetch dependencies.
By default a development version is built, which loads profiles from `$CWTCH_HOME/dev/`. This is so that you can build
and test development builds with alternative profiles while running a release/stable version of Cwtch uninterrupted.
To build a release version and load normal profiles, use `build-release.sh X` instead of `flutter build X`
### Building on Linux (for Linux)
- copy `libCwtch-go.so` to `linux/`, or run `fetch-libcwtch-go.sh` to download it
- set `LD_LIBRARY_PATH="$PWD/linux"`
- copy a `tor` binary to `linux/` or run `fetch-tor.sh` to download one
- run `flutter config --enable-linux-desktop` if you've never done so before
- optional: launch cwtch-ui debug build by running `flutter run -d linux`
- to build cwtch-ui, run `flutter build linux`
- optional: launch cwtch-ui release build with `env LD_LIBRARY_PATH=linux ./build/linux/x64/release/bundle/cwtch`
- to package the build, run `linux/package-release.sh`
- run `fetch-libcwtch-go.sh`libCwtch-go to fetch a prebuild version of `libCwtch-go.so` go to `./linux`. Include `./linux` in `LD_LIBRARY_PATH`
- run `fetch-tor.sh` and/or ensure that `tor` is in `$PATH`
- run `flutter run -d linux`
### Building on Windows (for Windows)
- copy `libCwtch.dll` to `windows/`, or run `fetch-libcwtch-go.ps1` to download it
- run `fetch-libcwtch-go.ps1` to fetch a prebuild version of `libCwtch.dll`
- run `fetch-tor-win.ps1` to fetch Tor for windows
- optional: launch cwtch-ui debug build by running `flutter run -d windows`
- to build cwtch-ui, run `flutter build windows`
- optional: to run the release build:
- `cp windows/libCwtch.dll .`
- `./build/windows/runner/Release/cwtch.exe`
- run `flutter run -d windows`
### Building on Linux/Windows (for Android)
- Follow the steps above to fetch `libCwtch-go` and `tor` (these will fetch Android versions of these binaries also)
- run `flutter run` with an Android phone connect via USB (or some other valid debug mode)
### Building on MacOS
- Cocoapods is required. Mac and Ruby don't seem to care about version stability and compatibility so good luck. The version of Ruby Mac seems to ship is very incompatible with software in the gem repo. You will probablly need to manually specify a specific older version of cocoapods that is compatible with your system. First you will also probably need to make sure you are on the latest MacOS version and then try `gem install cocoapods -v 1.x.x`
- For MacOS 13.4 `gem install cocoapods -v 1.11.3` worked on 2023.05.28
- copy `libCwtch.x64.dylib` and `libCwtch.arm.dylib` into the root folder, or run `fetch-libcwtch-go-macos.sh` to download it
- The error 'Podfile not found' has still been seen on fresh repos, depending on varios versions. To fix run `flutter create --platforms=macos . --org im.cwtch`
- You may have to temporarily rename the project folder a "dart project suitable name" like "cwtch"
- run `fetch-tor-macos.sh` to fetch Tor or Download and install Tor Browser and `cp -r /Applications/Tor\ Browser.app/Contents/MacOS/Tor ./macos/`
- `flutter build macos`
- If you are building on Mac Arm Silicon you may need to append `--no-tree-shake-icons` as the build seems to invoke a mac x64 binary that Arm Mac "cannot verify" and therefor will not run on some versions of Flutter
- optional: launch cwtch-ui release build with `./build/macos/Build/Products/Release/Cwtch.app/Contents/MacOS/Cwtch`
- To package the UI: `./macos/package-release.sh`, which results in a Cwtch.dmg that has libCwtch.dylib and tor in it as well and can be installed into Applications
### Known Platform Issues
- **Windows**: Flutter engine has a [known bug](https://github.com/flutter/flutter/issues/75675) around the Right Shift key being sticky.

View File

@ -1,9 +1,3 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
@ -12,6 +6,11 @@ if (localPropertiesFile.exists()) {
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
@ -22,6 +21,10 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
// key.properties MUST have password placeholders filled in (via drone with secrets) and cwtch-upload.jks file must be added (from drone secret)
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
@ -30,7 +33,7 @@ if (keystorePropertiesFile.exists()) {
}
android {
compileSdkVersion 34
compileSdkVersion 29
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -39,23 +42,15 @@ android {
lintOptions {
disable 'InvalidPackage'
// For some reason we get Error: LottieAnimationView must extend android.view.View
// Given the newer gradle build...I'm not sure why, but it does impact functionality at all
// there is no information about this error and the command output suggests including the
// following:
abortOnError false
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "im.cwtch.flwtch"
minSdkVersion 19
targetSdkVersion 34
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
signingConfigs {
@ -90,31 +85,20 @@ flutter {
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.21" // same as kotlin version in settings.gradle
implementation fileTree( dir: 'cwtch')
implementation files ('cwtch/cwtch.aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation project(':cwtch')
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2"
implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0"
implementation "com.airbnb.android:lottie:3.5.0"
implementation "com.android.support.constraint:constraint-layout:2.0.4"
// Test Dependencies
testImplementation 'junit:junit:4.12'
// https://developer.android.com/jetpack/androidx/releases/test/#1.2.0
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// WorkManager
// (Java only)
//implementation("androidx.work:work-runtime:$work_version")
// Kotlin + coroutines
// 2022.06: upgraded from 2.5 to 2.7 for android 12
// err: "requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent"
// as per https://github.com/flutter/flutter/issues/93609
implementation 'androidx.work:work-runtime-ktx:2.7.0'
implementation("androidx.work:work-runtime-ktx:2.5.0")
// optional - RxJava2 support
//implementation("androidx.work:work-rxjava2:$work_version")
@ -132,5 +116,5 @@ dependencies {
// needed to prevent a ListenableFuture dependency conflict/bug
// see https://github.com/google/ExoPlayer/issues/7905#issuecomment-692637059
implementation "com.google.guava:guava:31.0.1-android"
implementation 'com.google.guava:guava:any'
}

View File

@ -1,12 +0,0 @@
package im.cwtch.flwtch;
import androidx.test.rule.ActivityTestRule;
import dev.flutter.plugins.integration_test.FlutterTestRunner;
import org.junit.Rule;
import org.junit.runner.RunWith;
@RunWith(FlutterTestRunner.class)
public class MainActivityTest {
@Rule
public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class, true, false);
}

View File

@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="im.cwtch.flwtch">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
@ -6,18 +6,17 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="${applicationName}"
android:name="io.flutter.app.FlutterApplication"
android:label="Cwtch"
android:extractNativeLibs="true"
android:icon="@mipmap/knott">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:theme="@style/NormalTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:exported="true">
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
@ -38,38 +37,15 @@
android:name="flutterEmbedding"
android:value="2" />
<!--Needed to run in background (lol)-->
<service
android:name="androidx.work.impl.foreground.SystemForegroundService"
android:foregroundServiceType="dataSync"
tools:node="merge" />
</application>
<!--Needed to access Tor socket-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Needed for running in the background -->
<!--Needed to run in background (lol)-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- As of Android 13 this permission is required -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<!-- Ability to ask user to exempt app from power management (which can kill it more frequently especially on some devices.
Allows app to use ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS -->
<uses-permission-sdk-23 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission-sdk-23 android:name="android.permission.HIDE_OVERLAY_WINDOWS" />
<!--Needed to check if activity is foregrounded or if messages from the service should be queued-->
<!--Meeded to check if activity is foregrounded or if messages from the service should be queued-->
<uses-permission android:name="android.permission.GET_TASKS" />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
</manifest>

View File

@ -1,25 +0,0 @@
// Generated file.
//
// If you wish to remove Flutter's multidex support, delete this entire file.
//
// Modifications to this file should be done in a copy under a different name
// as this file may be regenerated.
package io.flutter.app;
import android.app.Application;
import android.content.Context;
import androidx.annotation.CallSuper;
import androidx.multidex.MultiDex;
/**
* Extension of {@link android.app.Application}, adding multidex support.
*/
public class FlutterMultiDexApplication extends Application {
@Override
@CallSuper
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}

View File

@ -1,34 +1,19 @@
package im.cwtch.flwtch
import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.app.*
import android.content.Context
import android.content.Intent
import android.graphics.BitmapFactory
import android.graphics.Color
import android.net.Uri
import android.os.Build
import android.util.Log
import android.content.pm.ServiceInfo
import androidx.annotation.RequiresApi
import androidx.core.app.NotificationCompat
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import androidx.work.CoroutineWorker
import androidx.work.ForegroundInfo
import androidx.work.WorkerParameters
import androidx.work.*
import cwtch.Cwtch
import io.flutter.FlutterInjector
import org.json.JSONObject
import java.nio.file.Files
import java.nio.file.Paths
import java.io.FileInputStream
import java.io.File
class FlwtchWorker(context: Context, parameters: WorkerParameters) :
@ -40,26 +25,13 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
private var notificationID: MutableMap<String, Int> = mutableMapOf()
private var notificationIDnext: Int = 1
private var notificationSimple: String? = null
private var notificationConversationInfo: String? = null
private val TAG: String = "FlwtchWorker.kt"
override suspend fun doWork(): Result {
// Hack to uncomment and deploy if your device has zombie workers you need to kill
// We need a proper solution but this will clear those out for now
/*if (notificationSimple == null) {
Log.e("FlwtchWorker", "doWork found notificationSimple is null, app has not started, this is a stale thread, terminating")
return Result.failure()
}*/
val method = inputData.getString(KEY_METHOD)
?: return Result.failure()
val args = inputData.getString(KEY_ARGS)
?: return Result.failure()
// Mark the Worker as important
val progress = "Cwtch is keeping Tor running in the background" // TODO: translate
val progress = "Cwtch is keeping Tor running in the background"//todo:translate
setForeground(createForegroundInfo(progress))
return handleCwtch(method, args)
}
@ -73,219 +45,183 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
}
private fun handleCwtch(method: String, args: String): Result {
if (method != "Start") {
if (Cwtch.started() != 1.toLong()) {
Log.e(TAG, "libCwtch-go reports it is not initialized yet")
return Result.failure()
}
}
val a = JSONObject(args)
when (method) {
"Start" -> {
Log.i("FlwtchWorker.kt", "handleAppInfo Start")
val appDir = (a.get("appDir") as? String) ?: ""
val torPath = (a.get("torPath") as? String) ?: "tor"
Log.i("FlwtchWorker.kt", "appDir: '$appDir' torPath: '$torPath'")
val a = JSONObject(args)
when (method) {
"Start" -> {
Log.i(TAG, "handleAppInfo Start")
val appDir = (a.get("appDir") as? String) ?: ""
val torPath = (a.get("torPath") as? String) ?: "tor"
Log.i(TAG, "appDir: '$appDir' torPath: '$torPath'")
if (Cwtch.startCwtch(appDir, torPath) != 0.toLong()) return Result.failure()
if (Cwtch.startCwtch(appDir, torPath) != 0.toLong()) return Result.failure()
Log.i(TAG, "startCwtch success, starting coroutine AppbusEvent loop...")
val downloadIDs = mutableMapOf<String, Int>()
val downloadFinishedIDs = mutableMapOf<String, Int>()
var flags = PendingIntent.FLAG_UPDATE_CURRENT
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
flags = flags or PendingIntent.FLAG_IMMUTABLE
}
while (true) {
try {
val evt = MainActivity.AppbusEvent(Cwtch.getAppBusEvent())
// TODO replace this notification block with the NixNotification manager in dart as it has access to contact names and also needs less working around
if (evt.EventType == "NewMessageFromPeer" || evt.EventType == "NewMessageFromGroup") {
val data = JSONObject(evt.Data)
val handle = data.getString("RemotePeer");
val conversationId = data.getInt("ConversationID").toString();
val notificationChannel = if (evt.EventType == "NewMessageFromPeer") handle else conversationId
if (data["RemotePeer"] != data["ProfileOnion"]) {
val notification = data["notification"]
if (notification == "SimpleEvent") {
val channelId =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
createMessageNotificationChannel("Cwtch", "Cwtch")
} else {
// If earlier version channel ID is not used
// https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#NotificationCompat.Builder(android.content.Context)
""
}
val clickIntent = Intent(applicationContext, MainActivity::class.java).also { intent ->
intent.action = Intent.ACTION_RUN
intent.putExtra("EventType", "NotificationClicked")
}
val newNotification = NotificationCompat.Builder(applicationContext, channelId)
.setContentTitle("Cwtch")
.setContentText(notificationSimple ?: "New Message")
.setSmallIcon(R.mipmap.knott_transparent)
.setContentIntent(PendingIntent.getActivity(applicationContext, 1, clickIntent, flags))
.setAutoCancel(true)
.build()
notificationManager.notify(getNotificationID("Cwtch", "Cwtch"), newNotification)
} else if (notification == "ContactInfo") {
val channelId =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
createMessageNotificationChannel(notificationChannel, notificationChannel)
} else {
// If earlier version channel ID is not used
// https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#NotificationCompat.Builder(android.content.Context)
""
}
val loader = FlutterInjector.instance().flutterLoader()
Log.i(TAG, "notification for " + evt.EventType + " " + handle + " " + conversationId + " " + channelId)
Log.i(TAG, data.toString());
val key = loader.getLookupKeyForAsset(data.getString("picture"))//"assets/profiles/001-centaur.png")
var fh : java.io.InputStream? = null;
try {
fh = applicationContext.assets.open(key)
} catch (e: Exception) {
Log.d("FlwtchWorker->ContactInfo", e.toString() + " :: " + e.getStackTrace());
}
try {
val file = File(data.getString("picture"))
fh = FileInputStream(file)
} catch (e: Exception) {
Log.d("FlwtchWorker->ContactInfo", e.toString() + " :: " + e.getStackTrace());
}
val clickIntent = Intent(applicationContext, MainActivity::class.java).also { intent ->
intent.action = Intent.ACTION_RUN
intent.putExtra("EventType", "NotificationClicked")
intent.putExtra("ProfileOnion", data.getString("ProfileOnion"))
intent.putExtra("Handle", handle)
}
val image : android.graphics.Bitmap? = if (fh != null) BitmapFactory.decodeStream(fh ) else null;
val newNotification = NotificationCompat.Builder(applicationContext, channelId)
.setContentTitle(data.getString("Nick"))
.setContentText((notificationConversationInfo
?: "New Message From %1").replace("%1", data.getString("Nick")))
.setLargeIcon(image)
.setSmallIcon(R.mipmap.knott_transparent)
.setContentIntent(PendingIntent.getActivity(applicationContext, 1, clickIntent, flags))
.setAutoCancel(true)
.build()
notificationManager.notify(getNotificationID(data.getString("ProfileOnion"), channelId), newNotification)
if (fh != null) {
fh.close()
}
Log.i("FlwtchWorker.kt", "startCwtch success, starting coroutine AppbusEvent loop...")
while(true) {
val evt = MainActivity.AppbusEvent(Cwtch.getAppBusEvent())
if (evt.EventType == "NewMessageFromPeer" || evt.EventType == "NewMessageFromGroup") {
val data = JSONObject(evt.Data)
val handle = if (evt.EventType == "NewMessageFromPeer") data.getString("RemotePeer") else data.getString("GroupID");
if (data["RemotePeer"] != data["ProfileOnion"]) {
val channelId =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
createMessageNotificationChannel(handle, handle)
} else {
// If earlier version channel ID is not used
// https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#NotificationCompat.Builder(android.content.Context)
""
}
}
} else if (evt.EventType == "FileDownloadProgressUpdate") {
try {
val data = JSONObject(evt.Data);
val fileKey = data.getString("FileKey");
val title = data.getString("NameSuggestion");
val progress = data.getString("Progress").toInt();
val progressMax = data.getString("FileSizeInChunks").toInt();
val loader = FlutterInjector.instance().flutterLoader()
val key = loader.getLookupKeyForAsset("assets/" + data.getString("Picture"))//"assets/profiles/001-centaur.png")
val fh = applicationContext.assets.open(key)
// if we have seen a download finished update for this key then ignore it
if (!downloadFinishedIDs.containsKey(fileKey)) {
if (!downloadIDs.containsKey(fileKey)) {
downloadIDs.put(fileKey, downloadIDs.count());
}
var dlID = downloadIDs.get(fileKey);
if (dlID == null) {
dlID = 0;
}
if (progress >= 0) {
val channelId =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
createDownloadNotificationChannel(fileKey, fileKey)
} else {
// If earlier version channel ID is not used
// https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#NotificationCompat.Builder(android.content.Context)
""
};
val newNotification = NotificationCompat.Builder(applicationContext, channelId)
.setOngoing(true)
.setContentTitle("Downloading")//todo: translate
.setContentText(title)
.setSmallIcon(android.R.drawable.stat_sys_download)
.setProgress(progressMax, progress, false)
.setSound(null)
//.setSilent(true)
.build();
notificationManager.notify(dlID, newNotification);
}
}
} catch (e: Exception) {
Log.d("FlwtchWorker->FileDownloadProgressUpdate", e.toString() + " :: " + e.getStackTrace());
}
} else if (evt.EventType == "FileDownloaded") {
Log.d(TAG, "file downloaded!");
val data = JSONObject(evt.Data);
val tempFile = data.getString("TempFile");
val fileKey = data.getString("FileKey");
if (tempFile != "" && tempFile != data.getString("FilePath")) {
val filePath = data.getString("FilePath");
Log.i(TAG, "moving " + tempFile + " to " + filePath);
val sourcePath = Paths.get(tempFile);
val targetUri = Uri.parse(filePath);
val os = this.applicationContext.getContentResolver().openOutputStream(targetUri);
val bytesWritten = Files.copy(sourcePath, os);
Log.d("TAG", "copied " + bytesWritten.toString() + " bytes");
if (bytesWritten != 0L) {
os?.flush();
os?.close();
Files.delete(sourcePath);
}
}
// Suppress future notifications...
downloadFinishedIDs.put(fileKey, downloadIDs.count());
if (downloadIDs.containsKey(fileKey)) {
notificationManager.cancel(downloadIDs.get(fileKey) ?: 0);
}
val clickIntent = Intent(applicationContext, MainActivity::class.java).also { intent ->
intent.action = Intent.ACTION_RUN
intent.putExtra("EventType", "NotificationClicked")
intent.putExtra("ProfileOnion", data.getString("ProfileOnion"))
intent.putExtra("Handle", handle)
}
Intent().also { intent ->
intent.action = "im.cwtch.flwtch.broadcast.SERVICE_EVENT_BUS"
intent.putExtra("EventType", evt.EventType)
intent.putExtra("Data", evt.Data)
intent.putExtra("EventID", evt.EventID)
LocalBroadcastManager.getInstance(applicationContext).sendBroadcast(intent)
}
if (evt.EventType == "Shutdown") {
Log.i(TAG, "processing shutdown event, exiting FlwtchWorker/Start()...");
return Result.success()
}
} catch (e: Exception) {
Log.e(TAG, "Error in handleCwtch: " + e.toString() + " :: " + e.getStackTrace());
val newNotification = NotificationCompat.Builder(applicationContext, channelId)
.setContentTitle(data.getString("Nick"))
.setContentText("New message")//todo: translate
.setLargeIcon(BitmapFactory.decodeStream(fh))
.setSmallIcon(R.mipmap.knott_transparent)
.setContentIntent(PendingIntent.getActivity(applicationContext, 1, clickIntent, PendingIntent.FLAG_UPDATE_CURRENT))
.setAutoCancel(true)
.build()
notificationManager.notify(getNotificationID(data.getString("ProfileOnion"), handle), newNotification)
}
}
}
// Event passing translations from Flutter to Kotlin worker scope so the worker can use them
"L10nInit" -> {
notificationSimple = (a.get("notificationSimple") as? String) ?: "New Message"
notificationConversationInfo = (a.get("notificationConversationInfo") as? String)
?: "New Message From "
}
else -> {
Log.i(TAG, "unknown command: " + method);
return Result.failure()
Intent().also { intent ->
intent.action = "im.cwtch.flwtch.broadcast.SERVICE_EVENT_BUS"
intent.putExtra("EventType", evt.EventType)
intent.putExtra("Data", evt.Data)
intent.putExtra("EventID", evt.EventID)
LocalBroadcastManager.getInstance(applicationContext).sendBroadcast(intent)
}
}
}
return Result.success()
"ReconnectCwtchForeground" -> {
Cwtch.reconnectCwtchForeground()
}
"CreateProfile" -> {
val nick = (a.get("nick") as? String) ?: ""
val pass = (a.get("pass") as? String) ?: ""
Cwtch.createProfile(nick, pass)
}
"LoadProfiles" -> {
val pass = (a.get("pass") as? String) ?: ""
Cwtch.loadProfiles(pass)
}
"GetMessage" -> {
val profile = (a.get("profile") as? String) ?: ""
val handle = (a.get("contact") as? String) ?: ""
val indexI = a.getInt("index")
return Result.success(Data.Builder().putString("result", Cwtch.getMessage(profile, handle, indexI.toLong())).build())
}
"GetMessageByContentHash" -> {
val profile = (a.get("profile") as? String) ?: ""
val handle = (a.get("contact") as? String) ?: ""
val contentHash = (a.get("contentHash") as? String) ?: ""
return Result.success(Data.Builder().putString("result", Cwtch.getMessagesByContentHash(profile, handle, contentHash)).build())
}
"UpdateMessageFlags" -> {
val profile = (a.get("profile") as? String) ?: ""
val handle = (a.get("contact") as? String) ?: ""
val midx = (a.get("midx") as? Long) ?: 0
val flags = (a.get("flags") as? Long) ?: 0
Cwtch.updateMessageFlags(profile, handle, midx, flags)
}
"AcceptContact" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val handle = (a.get("handle") as? String) ?: ""
Cwtch.acceptContact(profile, handle)
}
"BlockContact" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val handle = (a.get("handle") as? String) ?: ""
Cwtch.blockContact(profile, handle)
}
"SendMessage" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val handle = (a.get("handle") as? String) ?: ""
val message = (a.get("message") as? String) ?: ""
Cwtch.sendMessage(profile, handle, message)
}
"SendInvitation" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val handle = (a.get("handle") as? String) ?: ""
val target = (a.get("target") as? String) ?: ""
Cwtch.sendInvitation(profile, handle, target)
}
"SendProfileEvent" -> {
val onion = (a.get("onion") as? String) ?: ""
val jsonEvent = (a.get("jsonEvent") as? String) ?: ""
Cwtch.sendProfileEvent(onion, jsonEvent)
}
"SendAppEvent" -> {
val jsonEvent = (a.get("jsonEvent") as? String) ?: ""
Cwtch.sendAppEvent(jsonEvent)
}
"ResetTor" -> {
Cwtch.resetTor()
}
"ImportBundle" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val bundle = (a.get("bundle") as? String) ?: ""
Cwtch.importBundle(profile, bundle)
}
"SetGroupAttribute" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val groupHandle = (a.get("groupHandle") as? String) ?: ""
val key = (a.get("key") as? String) ?: ""
val value = (a.get("value") as? String) ?: ""
Cwtch.setGroupAttribute(profile, groupHandle, key, value)
}
"CreateGroup" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val server = (a.get("server") as? String) ?: ""
val groupName = (a.get("groupName") as? String) ?: ""
Cwtch.createGroup(profile, server, groupName)
}
"DeleteProfile" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val pass = (a.get("pass") as? String) ?: ""
Cwtch.deleteProfile(profile, pass)
}
"LeaveConversation" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val contactHandle = (a.get("contactHandle") as? String) ?: ""
Cwtch.leaveConversation(profile, contactHandle)
}
"LeaveGroup" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val groupHandle = (a.get("groupHandle") as? String) ?: ""
Cwtch.leaveGroup(profile, groupHandle)
}
"RejectInvite" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val groupHandle = (a.get("groupHandle") as? String) ?: ""
Cwtch.rejectInvite(profile, groupHandle)
}
"Shutdown" -> {
Cwtch.shutdownCwtch();
return Result.success()
}
else -> return Result.failure()
}
return Result.success()
}
// Creates an instance of ForegroundInfo which can be used to update the
// ongoing notification.
private fun createForegroundInfo(progress: String): ForegroundInfo {
val id = "flwtch"
val title = "Flwtch" // TODO: change
val cancel = "Shut down" // TODO: translate
val title = "Flwtch"
val cancel = "Shut down"//todo: translate
val channelId =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
createForegroundNotificationChannel(id, id)
@ -299,10 +235,6 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
intent.action = Intent.ACTION_RUN
intent.putExtra("EventType", "ShutdownClicked")
}
var flags = PendingIntent.FLAG_UPDATE_CURRENT
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
flags = flags or PendingIntent.FLAG_IMMUTABLE
}
val notification = NotificationCompat.Builder(applicationContext, channelId)
.setContentTitle(title)
@ -312,10 +244,10 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
.setOngoing(true)
// Add the cancel action to the notification which can
// be used to cancel the worker
.addAction(android.R.drawable.ic_delete, cancel, PendingIntent.getActivity(applicationContext, 2, cancelIntent, flags))
.addAction(android.R.drawable.ic_delete, cancel, PendingIntent.getActivity(applicationContext, 2, cancelIntent, PendingIntent.FLAG_UPDATE_CURRENT))
.build()
return ForegroundInfo(101, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)
return ForegroundInfo(101, notification)
}
@RequiresApi(Build.VERSION_CODES.O)
@ -336,15 +268,6 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
return channelId
}
@RequiresApi(Build.VERSION_CODES.O)
private fun createDownloadNotificationChannel(channelId: String, channelName: String): String{
val chan = NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_LOW)
chan.lightColor = Color.MAGENTA
chan.lockscreenVisibility = Notification.VISIBILITY_PRIVATE
notificationManager.createNotificationChannel(chan)
return channelId
}
companion object {
const val KEY_METHOD = "KEY_METHOD"
const val KEY_ARGS = "KEY_ARGS"

View File

@ -1,45 +1,34 @@
package im.cwtch.flwtch
import android.annotation.TargetApi
import SplashView
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import androidx.annotation.NonNull
import android.content.pm.PackageManager
import android.net.Uri
import android.os.PowerManager
import android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
import android.util.Log
import android.view.Window
import android.view.WindowManager
import androidx.annotation.NonNull
import androidx.lifecycle.Observer
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import androidx.work.*
import cwtch.Cwtch
import io.flutter.embedding.android.SplashScreen
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.ErrorLogResult
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel.Result
import org.json.JSONObject
import java.nio.file.Files
import java.nio.file.Paths
import java.util.concurrent.TimeUnit
import kotlinx.coroutines.*
class MainActivity: FlutterActivity() {
override fun provideSplashScreen(): SplashScreen? = SplashView()
// Channel to get app info
private val CHANNEL_APP_INFO = "test.flutter.dev/applicationInfo"
private val CALL_APP_INFO = "getNativeLibDir"
private val CALL_SERVICE_INFO = "getForegroundServiceInfo"
private val ANDROID_SETTINGS_CHANNEL_NAME = "androidSettings"
private val ANDROID_SETTINGS_CHANGE_NAME= "androidSettingsChanged"
private var andoidSettingsChangeChannel: MethodChannel? = null
private val CALL_ASK_BATTERY_EXEMPTION = "requestBatteryExemption"
private val CALL_IS_BATTERY_EXEMPT = "isBatteryExempt"
// Channel to get cwtch api calls on
private val CHANNEL_CWTCH = "cwtch"
@ -51,7 +40,6 @@ class MainActivity: FlutterActivity() {
private val CHANNEL_NOTIF_CLICK = "im.cwtch.flwtch/notificationClickHandler"
private val CHANNEL_SHUTDOWN_CLICK = "im.cwtch.flwtch/shutdownClickHandler"
private val TAG: String = "MainActivity.kt"
// WorkManager tag applied to all Start() infinite coroutines
val WORKER_TAG = "cwtchEventBusWorker"
@ -59,32 +47,6 @@ class MainActivity: FlutterActivity() {
private var notificationClickChannel: MethodChannel? = null
private var shutdownClickChannel: MethodChannel? = null
// "Download to..." prompt extra arguments
private val FILEPICKER_REQUEST_CODE = 234
private val PREVIEW_EXPORT_REQUEST_CODE = 235
private val PROFILE_EXPORT_REQUEST_CODE = 236
private val REQUEST_DOZE_WHITELISTING_CODE:Int = 9
private var dlToProfile = ""
private var dlManifestPath = ""
private var dlToHandle = 0
private var dlToFileKey = ""
private var exportFromPath = ""
override fun onCreate(savedInstanceState: android.os.Bundle?) {
super.onCreate(savedInstanceState)
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
// Todo: when we support SDK 31
// hideOverlay()
}
/*
@TargetApi(31)
fun hideOverlay() {
window.setHideOverlayWindows(true);
}
*/
// handles clicks received from outside the app (ie, notifications)
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
if (notificationClickChannel == null || intent.extras == null) return
@ -106,68 +68,6 @@ class MainActivity: FlutterActivity() {
}
}
// handles return values from the system file picker
override fun onActivityResult(requestCode: Int, result: Int, intent: Intent?) {
super.onActivityResult(requestCode, result, intent);
// has null intent and data
if (requestCode == REQUEST_DOZE_WHITELISTING_CODE) {
// 0 == "battery optimized" (still)
// -1 == "no battery optimization" (exempt!)
andoidSettingsChangeChannel!!.invokeMethod("powerExemptionChange", result == -1)
return;
}
if (intent == null || intent!!.getData() == null) {
Log.i(TAG, "user canceled activity");
return;
}
if (requestCode == FILEPICKER_REQUEST_CODE) {
val filePath = intent!!.getData().toString();
Log.d("MainActivity:FILEPICKER_REQUEST_CODE", "DownloadableFileCreated");
handleCwtch(MethodCall("DownloadFile", mapOf(
"ProfileOnion" to this.dlToProfile,
"conversation" to this.dlToHandle.toInt(),
"filepath" to filePath,
"manifestpath" to this.dlManifestPath,
"filekey" to this.dlToFileKey
)), ErrorLogResult(""));//placeholder; this Result is never actually invoked
} else if (requestCode == PREVIEW_EXPORT_REQUEST_CODE) {
try {
val sourcePath = Paths.get(this.exportFromPath);
val targetUri = intent!!.getData();
val os = this.applicationContext.getContentResolver().openOutputStream(targetUri!!);
val bytesWritten = Files.copy(sourcePath, os);
Log.d("MainActivity:PREVIEW_EXPORT", "copied " + bytesWritten.toString() + " bytes");
if (bytesWritten != 0L) {
os?.flush();
os?.close();
//Files.delete(sourcePath);
}
} catch (e: Exception) {
Log.d("MainActivity:PREVIEW_EXPORT FAILED", e.toString());
}
} else if (requestCode == PROFILE_EXPORT_REQUEST_CODE ) {
val srcFile = StringBuilder().append(this.applicationContext.cacheDir).append("/").append(this.exportFromPath).toString();
Log.i("MainActivity:EXPORT_PROFILE", "exporting profile: " + srcFile);
try {
val sourcePath = Paths.get(srcFile);
val targetUri = intent!!.getData();
val os = this.applicationContext.getContentResolver().openOutputStream(targetUri!!);
val bytesWritten = Files.copy(sourcePath, os);
Log.d("MainActivity:EXPORT_PROFILE", "copied " + bytesWritten.toString() + " bytes");
if (bytesWritten != 0L) {
os?.flush();
os?.close();
//Files.delete(sourcePath);
}
} catch (e: Exception) {
Log.d("MainActivity:EXPORT_PROFILE FAILED", e.toString());
}
}
}
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
// Note: this methods are invoked on the main thread.
@ -175,47 +75,18 @@ class MainActivity: FlutterActivity() {
requestWindowFeature(Window.FEATURE_NO_TITLE)
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL_APP_INFO).setMethodCallHandler { call, result -> handleAppInfo(call, result) }
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL_CWTCH).setMethodCallHandler { call, result -> handleCwtch(call, result) }
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, ANDROID_SETTINGS_CHANNEL_NAME).setMethodCallHandler { call, result -> handleAndroidSettings(call, result) }
notificationClickChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL_NOTIF_CLICK)
shutdownClickChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL_SHUTDOWN_CLICK)
andoidSettingsChangeChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, ANDROID_SETTINGS_CHANGE_NAME)
}
// MethodChannel CHANNEL_APP_INFO handler (Flutter Channel for requests for Android environment info)
private fun handleAppInfo(@NonNull call: MethodCall, @NonNull result: Result) {
when (call.method) {
CALL_APP_INFO -> result.success(getNativeLibDir())
?: result.error("Unavailable", "nativeLibDir not available", null);
CALL_SERVICE_INFO -> result.success(getForegroundServiceInfo())
?: result.error("Unavailable", "getForegroundServiceInfo not available", null);
else -> result.notImplemented()
}
}
// MethodChannel ANDROID_SETTINGS_CHANNEL_NAME handler (Flutter Channel for requests for Android settings)
// Called from lib/view/globalsettingsview.dart
private fun handleAndroidSettings(@NonNull call: MethodCall, @NonNull result: Result) {
when (call.method) {
CALL_IS_BATTERY_EXEMPT -> result.success(checkIgnoreBatteryOpt() ?: false);
CALL_ASK_BATTERY_EXEMPTION -> { requestBatteryExemption(); result.success(null); }
else -> result.notImplemented()
}
}
@TargetApi(23)
private fun checkIgnoreBatteryOpt(): Boolean {
val powerManager = getSystemService(Context.POWER_SERVICE) as PowerManager
return powerManager.isIgnoringBatteryOptimizations(this.packageName) ?: false;
}
@TargetApi(23)
private fun requestBatteryExemption() {
val i = Intent()
i.action = ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
i.data = Uri.parse("package:" + this.packageName)
startActivityForResult(i, REQUEST_DOZE_WHITELISTING_CODE);
}
private fun getNativeLibDir(): String {
val ainfo = this.applicationContext.packageManager.getApplicationInfo(
"im.cwtch.flwtch", // Must be app name
@ -223,376 +94,51 @@ class MainActivity: FlutterActivity() {
return ainfo.nativeLibraryDir
}
fun getForegroundServiceInfo(): HashMap<String,String> {
var hashMap : HashMap<String, String>
= HashMap<String, String> ();
val workmanager = WorkManager.getInstance(this);
if (workmanager != null) {
runBlocking {
var lastCancelAllTime = workmanager.getLastCancelAllTimeMillis().await();
hashMap.put("workmanager.lastCancelAllTime", lastCancelAllTime.toString());
}
val works = workmanager.getWorkInfosByTag(WORKER_TAG).get()
for (workInfo in works) {
hashMap.put("workmanager.${workInfo.id}.state", workInfo.state.toString());
}
}
return hashMap
}
// receives messages from the ForegroundService (which provides, ironically enough, the backend)
private fun handleCwtch(@NonNull call: MethodCall, @NonNull result: Result) {
var method = call.method
// todo change usage patern to match that in FlwtchWorker
// Unsafe for anything using int args, causes access time attempt to cast to string which will fail
val argmap: Map<String, String> = call.arguments as Map<String,String>
val argmap: Map<String, String> = call.arguments as Map<String, String>
// the frontend calls Start every time it fires up, but we don't want to *actually* call Cwtch.Start()
// in case the ForegroundService is still running. in both cases, however, we *do* want to re-register
// the eventbus listener.
if (call.method == "Start") {
val uniqueTag = argmap["torPath"] ?: "nullEventBus"
when (call.method) {
"Start" -> {
val uniqueTag = argmap["torPath"] ?: "nullEventBus"
// note: because the ForegroundService is specified as UniquePeriodicWork, it can't actually get
// accidentally duplicated. however, we still need to manually check if it's running or not, so
// that we can divert this method call to ReconnectCwtchForeground instead if so.
val works = WorkManager.getInstance(this).getWorkInfosByTag(WORKER_TAG).get()
for (workInfo in works) {
// note: because the ForegroundService is specified as UniquePeriodicWork, it can't actually get
// accidentally duplicated. however, we still need to manually check if it's running or not, so
// that we can divert this method call to ReconnectCwtchForeground instead if so.
val works = WorkManager.getInstance(this).getWorkInfosByTag(WORKER_TAG).get()
for (workInfo in works) {
Log.i("handleCwtch:WorkManager", "$workInfo")
if (!workInfo.tags.contains(uniqueTag)) {
Log.i("handleCwtch:WorkManager", "canceling ${workInfo.id} bc tags don't include $uniqueTag")
WorkManager.getInstance(this).cancelWorkById(workInfo.id)
}
WorkManager.getInstance(this).pruneWork()
}
WorkManager.getInstance(this).pruneWork()
Log.i("MainActivity.kt", "Start() launching foregroundservice")
// this is where the eventbus ForegroundService gets launched. WorkManager should keep it alive after this
val data: Data = Data.Builder().putString(FlwtchWorker.KEY_METHOD, call.method).putString(FlwtchWorker.KEY_ARGS, JSONObject(argmap).toString()).build()
// 15 minutes is the shortest interval you can request
val workRequest = PeriodicWorkRequestBuilder<FlwtchWorker>(15, TimeUnit.MINUTES).setInputData(data).addTag(WORKER_TAG).addTag(uniqueTag).build()
WorkManager.getInstance(this).enqueueUniquePeriodicWork("req_$uniqueTag", ExistingPeriodicWorkPolicy.REPLACE, workRequest)
}
"CreateDownloadableFile" -> {
this.dlToProfile = argmap["ProfileOnion"] ?: ""
this.dlToHandle = call.argument("conversation")!!
this.dlManifestPath = argmap["manifestpath"] ?: ""
val suggestedName = argmap["filename"] ?: "filename.ext"
this.dlToFileKey = argmap["filekey"] ?: ""
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = "application/octet-stream"
putExtra(Intent.EXTRA_TITLE, suggestedName)
}
startActivityForResult(intent, FILEPICKER_REQUEST_CODE)
}
"ExportPreviewedFile" -> {
this.exportFromPath = argmap["Path"] ?: ""
val suggestion = argmap["FileName"] ?: "filename.ext"
var imgType = "jpeg"
if (suggestion.endsWith("png")) {
imgType = "png"
} else if (suggestion.endsWith("webp")) {
imgType = "webp"
} else if (suggestion.endsWith("bmp")) {
imgType = "bmp"
} else if (suggestion.endsWith("gif")) {
imgType = "gif"
}
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = "image/" + imgType
putExtra(Intent.EXTRA_TITLE, suggestion)
}
startActivityForResult(intent, PREVIEW_EXPORT_REQUEST_CODE)
}
"ExportProfile" -> {
val profileOnion: String = call.argument("ProfileOnion") ?: ""
val file: String = StringBuilder().append(this.applicationContext.cacheDir).append("/").append(call.argument("file") ?: "").toString()
Log.i("FlwtchWorker", "constructing exported file " + file);
Cwtch.exportProfile(profileOnion,file)
this.exportFromPath = argmap["file"] ?: ""
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = "application/gzip"
putExtra(Intent.EXTRA_TITLE, argmap["file"])
}
startActivityForResult(intent, PROFILE_EXPORT_REQUEST_CODE)
}
"GetMessages" -> {
Log.d("MainActivity.kt", "Cwtch GetMessages")
val profile = argmap["ProfileOnion"] ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val indexI: Int = call.argument("index") ?: 0
val count: Int = call.argument("count") ?: 1
val ucount : Int = maxOf(1, count) // don't allow negative counts
result.success(Cwtch.getMessages(profile, conversation.toLong(), indexI.toLong(), ucount.toLong()))
return
}
"SendMessage" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val message: String = call.argument("message") ?: ""
result.success(Cwtch.sendMessage(profile, conversation.toLong(), message))
return
}
"SendInvitation" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val target: Int = call.argument("target") ?: 0
result.success(Cwtch.sendInviteMessage(profile, conversation.toLong(), target.toLong()))
return
}
"ShareFile" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val filepath: String = call.argument("filepath") ?: ""
result.success(Cwtch.shareFile(profile, conversation.toLong(), filepath))
return
}
"GetSharedFiles" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
result.success(Cwtch.getSharedFiles(profile, conversation.toLong()))
return
}
"RestartFileShare" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val filepath: String = call.argument("filekey") ?: ""
result.success(Cwtch.restartFileShare(profile, filepath))
return
}
"StopSharing" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val filepath: String = call.argument("filekey") ?: ""
result.success(Cwtch.stopFileShare(profile, filepath))
return
}
"DeleteServerInfo" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val handle: String = call.argument("handle") ?: ""
result.success(Cwtch.deleteServerInfo(profile, handle))
return
}
"PublishServerUpdate" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
result.success(Cwtch.publishServerUpdate(profile))
return
}
"PeerWithOnion" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val onion: String = call.argument("onion") ?: ""
Cwtch.peerWithOnion(profile, onion)
}
"QueueJoinServer" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val onion: String = call.argument("onion") ?: ""
Cwtch.peerWithOnion(profile, onion)
}
"DisconnectFromPeer" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val onion: String = call.argument("onion") ?: ""
Cwtch.peerWithOnion(profile, onion)
}
"DisconnectFromServer" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val onion: String = call.argument("onion") ?: ""
Cwtch.peerWithOnion(profile, onion)
}
"CreateProfile" -> {
val nick: String = call.argument("nick") ?: ""
val pass: String = call.argument("pass") ?: ""
val autostart: Boolean = call.argument("autostart") ?: true
Cwtch.createProfile(nick, pass, autostart)
}
"LoadProfiles" -> {
val pass: String = call.argument("pass") ?: ""
Cwtch.loadProfiles(pass)
}
"ActivatePeerEngine" -> {
val profile: String = call.argument("profile") ?: ""
Cwtch.activatePeerEngine(profile)
}
"ConfigureConnections" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val listen: Boolean = call.argument("listen") ?: false
val peers: Boolean = call.argument("peers") ?: false
val servers: Boolean = call.argument("servers") ?: false
Cwtch.configureConnections(profile, listen, peers, servers)
}
"DeactivatePeerEngine" -> {
val profile: String = call.argument("profile") ?: ""
Cwtch.deactivatePeerEngine(profile)
}
"ChangePassword" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val pass: String = call.argument("OldPass") ?: ""
val passNew: String = call.argument("NewPass") ?: ""
val passNew2: String = call.argument("NewPassAgain") ?: ""
Cwtch.changePassword(profile, pass, passNew, passNew2)
}
"GetMessageByID" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val id: Int = call.argument("id") ?: 0
result.success(Cwtch.getMessageById(profile, conversation.toLong(), id.toLong()))
return
}
"GetMessageByContentHash" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val contentHash: String = call.argument("contentHash") ?: ""
result.success(Cwtch.getMessageByContentHash(profile, conversation.toLong(), contentHash))
return
}
"SetMessageAttribute" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val channel: Int = call.argument("Chanenl") ?: 0
val midx: Int = call.argument("Message") ?: 0
val key: String = call.argument("key") ?: ""
val value: String = call.argument("value") ?: ""
Cwtch.updateMessageAttribute(profile, conversation.toLong(), channel.toLong(), midx.toLong(), key, value)
}
"AcceptConversation" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
Cwtch.acceptConversation(profile, conversation.toLong())
}
"BlockContact" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
Cwtch.blockConversation(profile, conversation.toLong())
}
"UnblockContact" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
Cwtch.unblockConversation(profile, conversation.toLong())
}
"DownloadFile" -> {
Log.d("MainActivity.kt", "Cwtch Download File Called...")
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val filepath: String = call.argument("filepath") ?: ""
val manifestpath: String = call.argument("manifestpath") ?: ""
val filekey: String = call.argument("filekey") ?: ""
// FIXME: Prevent spurious calls by Intent
if (profile != "") {
Cwtch.downloadFileDefaultLimit(profile, conversation.toLong(), filepath, manifestpath, filekey)
}
}
"CheckDownloadStatus" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val fileKey: String = call.argument("fileKey") ?: ""
Cwtch.checkDownloadStatus(profile, fileKey)
}
"VerifyOrResumeDownload" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val fileKey: String = call.argument("fileKey") ?: ""
Cwtch.verifyOrResumeDownloadDefaultLimit(profile, conversation.toLong(), fileKey)
}
"UpdateSettings" -> {
val json: String = call.argument("json") ?: ""
Cwtch.updateSettings(json)
}
"ResetTor" -> {
Cwtch.resetTor()
}
"ImportBundle" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val bundle: String = call.argument("bundle") ?: ""
result.success(Cwtch.importBundle(profile, bundle))
}
"CreateGroup" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val server: String = call.argument("server") ?: ""
val groupName: String = call.argument("groupName") ?: ""
Cwtch.startGroup(profile, groupName, server)
}
"DeleteProfile" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val pass: String = call.argument("pass") ?: ""
Cwtch.deleteProfile(profile, pass)
}
"ArchiveConversation" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
Cwtch.archiveConversation(profile, conversation.toLong())
}
"DeleteConversation" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
Cwtch.deleteConversation(profile, conversation.toLong())
}
"SetProfileAttribute" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val key: String = call.argument("Key") ?: ""
val v: String = call.argument("Val") ?: ""
Cwtch.setProfileAttribute(profile, key, v)
}
"GetProfileAttribute" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val key: String = call.argument("key") ?: ""
var resultjson = Cwtch.getProfileAttribute(profile, key);
return result.success(resultjson)
}
"GetConversationAttribute" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val key: String = call.argument("key") ?: ""
var resultjson = Cwtch.getConversationAttribute(profile, conversation.toLong(), key);
result.success(resultjson)
return
}
"SetConversationAttribute" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val conversation: Int = call.argument("conversation") ?: 0
val key: String = call.argument("Key") ?: ""
val v: String = call.argument("Val") ?: ""
Cwtch.setConversationAttribute(profile, conversation.toLong(), key, v)
}
"ImportProfile" -> {
val file: String = call.argument("file") ?: ""
val pass: String = call.argument("pass") ?: ""
result.success(Cwtch.importProfile(file, pass))
return
}
"SearchConversations" -> {
val profile: String = call.argument("ProfileOnion") ?: ""
val pattern: String = call.argument("pattern") ?: ""
result.success(Cwtch.searchConversations(profile, pattern))
return
}
"Shutdown" -> {
Cwtch.shutdownCwtch();
}
else -> {
// ...otherwise fallthru to a normal ffi method call (and return the result using the result callback)
val data: Data = Data.Builder().putString(FlwtchWorker.KEY_METHOD, method).putString(FlwtchWorker.KEY_ARGS, JSONObject(argmap).toString()).build()
val workRequest = OneTimeWorkRequestBuilder<FlwtchWorker>().setInputData(data).build()
WorkManager.getInstance(this).enqueue(workRequest)
WorkManager.getInstance(applicationContext).getWorkInfoByIdLiveData(workRequest.id).observe(
this, Observer { workInfo ->
if (workInfo != null && workInfo.state == WorkInfo.State.SUCCEEDED) {
val res = workInfo.outputData.keyValueMap.toString()
result.success(workInfo.outputData.getString("result"))
}
}
)
return
}
Log.i("MainActivity.kt", "Start() launching foregroundservice")
// this is where the eventbus ForegroundService gets launched. WorkManager should keep it alive after this
val data: Data = Data.Builder().putString(FlwtchWorker.KEY_METHOD, call.method).putString(FlwtchWorker.KEY_ARGS, JSONObject(argmap).toString()).build()
// 15 minutes is the shortest interval you can request
val workRequest = PeriodicWorkRequestBuilder<FlwtchWorker>(15, TimeUnit.MINUTES).setInputData(data).addTag(WORKER_TAG).addTag(uniqueTag).build()
WorkManager.getInstance(this).enqueueUniquePeriodicWork("req_$uniqueTag", ExistingPeriodicWorkPolicy.REPLACE, workRequest)
return
}
result.success(null)
// ...otherwise fallthru to a normal ffi method call (and return the result using the result callback)
val data: Data = Data.Builder().putString(FlwtchWorker.KEY_METHOD, method).putString(FlwtchWorker.KEY_ARGS, JSONObject(argmap).toString()).build()
val workRequest = OneTimeWorkRequestBuilder<FlwtchWorker>().setInputData(data).build()
WorkManager.getInstance(this).enqueue(workRequest)
WorkManager.getInstance(applicationContext).getWorkInfoByIdLiveData(workRequest.id).observe(
this, Observer { workInfo ->
if (workInfo.state == WorkInfo.State.SUCCEEDED) {
val res = workInfo.outputData.keyValueMap.toString()
result.success(workInfo.outputData.getString("result"))
}
}
)
}
// using onresume/onstop for broadcastreceiver because of extended discussion on https://stackoverflow.com/questions/7439041/how-to-unregister-broadcastreceiver
@ -601,22 +147,19 @@ class MainActivity: FlutterActivity() {
Log.i("MainActivity.kt", "onResume")
if (myReceiver == null) {
Log.i("MainActivity.kt", "onResume registering local broadcast receiver / event bus forwarder")
val bm = flutterEngine?.dartExecutor?.binaryMessenger;
if (bm != null) {
val mc = MethodChannel(bm, CWTCH_EVENTBUS)
val filter = IntentFilter("im.cwtch.flwtch.broadcast.SERVICE_EVENT_BUS")
myReceiver = MyBroadcastReceiver(mc)
LocalBroadcastManager.getInstance(applicationContext)
.registerReceiver(myReceiver!!, filter)
}
val mc = MethodChannel(flutterEngine?.dartExecutor?.binaryMessenger, CWTCH_EVENTBUS)
val filter = IntentFilter("im.cwtch.flwtch.broadcast.SERVICE_EVENT_BUS")
myReceiver = MyBroadcastReceiver(mc)
LocalBroadcastManager.getInstance(applicationContext).registerReceiver(myReceiver!!, filter)
}
// ReconnectCwtchForeground which will resync counters and settings...
// We need to do this here because after a "pause" flutter is still running
// but we might have lost sync with the background process...
Log.i("MainActivity.kt", "Call ReconnectCwtchForeground")
Cwtch.reconnectCwtchForeground()
val data: Data = Data.Builder().putString(FlwtchWorker.KEY_METHOD, "ReconnectCwtchForeground").putString(FlwtchWorker.KEY_ARGS, "{}").build()
val workRequest = OneTimeWorkRequestBuilder<FlwtchWorker>().setInputData(data).build()
WorkManager.getInstance(applicationContext).enqueue(workRequest)
}
override fun onStop() {
@ -628,7 +171,6 @@ class MainActivity: FlutterActivity() {
}
}
override fun onDestroy() {
super.onDestroy()
Log.i("MainActivity.kt", "onDestroy - cancelling all WORKER_TAG and pruning old work")
@ -636,6 +178,20 @@ class MainActivity: FlutterActivity() {
WorkManager.getInstance(this).pruneWork()
}
// source: https://web.archive.org/web/20210203022531/https://stackoverflow.com/questions/41928803/how-to-parse-json-in-kotlin/50468095
// for reference:
//
// class Response(json: String) : JSONObject(json) {
// val type: String? = this.optString("type")
// val data = this.optJSONArray("data")
// ?.let { 0.until(it.length()).map { i -> it.optJSONObject(i) } } // returns an array of JSONObject
// ?.map { Foo(it.toString()) } // transforms each JSONObject of the array into Foo
// }
//
// class Foo(json: String) : JSONObject(json) {
// val id = this.optInt("id")
// val title: String? = this.optString("title")
// }
class AppbusEvent(json: String) : JSONObject(json) {
val EventType = this.optString("EventType")
val EventID = this.optString("EventID")

View File

@ -0,0 +1,15 @@
import android.content.Context
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import im.cwtch.flwtch.R
import io.flutter.embedding.android.SplashScreen
class SplashView : SplashScreen {
override fun createSplashView(context: Context, savedInstanceState: Bundle?): View? =
LayoutInflater.from(context).inflate(R.layout.splash_view, null, false)
override fun transitionToFlutter(onTransitionComplete: Runnable) {
onTransitionComplete.run()
}
}

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/darkGreyPurple" />
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<item>
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/knott" />
</item>
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -1,81 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="500dp"
android:height="500dp"
android:viewportWidth="500"
android:viewportHeight="500">
<path
android:pathData="M436.2,215c-0.6,3 -2,6.4 -4.3,10.4l18.2,18.2c2.4,-4.8 6.2,-13.1 8.2,-22.9c4.1,-20.2 -0.5,-37.1 -13.7,-50.3c-24.2,-24.2 -49.4,-26.4 -81.8,-7.3c-7.8,4.6 -16.1,10.6 -24.6,17.7c-19.5,16.3 -41.3,39.5 -64.9,69.2c15.4,19.4 30.2,36.2 43.8,49.8c6.3,6.3 12.4,12 18.3,17.1l16.2,-16.2c-5.9,-5 -12.1,-10.7 -18.4,-17c-9,-9 -18.5,-19.5 -28.4,-31.2l-2.1,-2.5l2.1,-2.5c18.1,-21.5 35,-38.6 50.1,-50.9c9.6,-7.8 18.6,-13.8 26.7,-17.7c7,-3.4 13.4,-5.3 19,-5.6c2.7,-0.2 6.9,-0.1 12.1,2c5,2.1 10.2,5.8 15.7,11.3c2.1,2.1 5,5.4 6.8,10.4C437.1,202.1 437.5,208 436.2,215L436.2,215z"
android:fillColor="#242425"/>
<path
android:pathData="M340.9,354.7l81.5,-81.5c-4.8,-7.1 -11.1,-14 -14.6,-17.7L327.3,336C332.5,342.4 337.1,348.6 340.9,354.7z"
android:fillColor="#242425"/>
<path
android:pathData="M444.6,329.6c13.2,-13.2 17.8,-30.1 13.7,-50.3c-2.8,-14 -9.1,-24.9 -10.3,-26.9L382.6,187c-6,3.1 -12.5,7.4 -19.4,12.8l50.1,50.1l0,0c4.1,4.3 12.1,13 17.4,21.6c3.2,5.2 5.1,9.7 5.6,13.5c1.2,6.9 0.9,12.7 -0.9,17.9c-1.8,5 -4.8,8.3 -6.8,10.4c-5.9,5.9 -11.3,9.7 -16.7,11.7c-5.5,2 -10,1.8 -13.3,1.4c-4.4,-0.5 -9.2,-2 -14.3,-4.2l-17,17C397.5,355.7 421.5,352.7 444.6,329.6z"
android:fillColor="#242425"/>
<path
android:pathData="M303.1,64.7c5,1.8 8.3,4.8 10.4,6.8c5.9,5.9 9.7,11.3 11.7,16.7c2,5.5 1.8,10 1.4,13.3c-0.5,4.4 -2,9.2 -4.2,14.3l17,17c16.4,-30.3 13.3,-54.4 -9.7,-77.4c-13.2,-13.2 -30.1,-17.8 -50.3,-13.7c-14,2.8 -24.9,9.1 -26.9,10.3L187,117.4c3.1,6 7.4,12.5 12.8,19.4L250,86.7l0,0c4.3,-4.1 13,-12.1 21.6,-17.4c5.2,-3.2 9.7,-5.1 13.5,-5.6C292,62.6 297.9,62.9 303.1,64.7z"
android:fillColor="#242425"/>
<path
android:pathData="M170.4,55.4c-24.2,24.2 -26.4,49.4 -7.3,81.8c4.6,7.8 10.6,16.1 17.7,24.6c16.3,19.5 39.5,41.3 69.2,64.9c19.4,-15.4 36.2,-30.2 49.8,-43.8c6.3,-6.3 12,-12.4 17.1,-18.3l-16.2,-16.2c-5,5.9 -10.7,12.1 -17,18.4c-9,9 -19.5,18.5 -31.2,28.4l-2.5,2.1l-2.5,-2.1c-21.5,-18.1 -38.6,-35 -50.9,-50.1c-7.8,-9.6 -13.8,-18.6 -17.7,-26.7c-3.4,-7 -5.3,-13.4 -5.6,-19c-0.2,-2.7 -0.1,-6.9 2,-12.1c2.1,-5 5.8,-10.2 11.3,-15.7c2.1,-2.1 5.4,-5 10.4,-6.8c5.2,-1.9 11.1,-2.2 18,-0.9l0.1,0c3,0.6 6.4,2 10.4,4.3l18.2,-18.2c-4.8,-2.4 -13.1,-6.2 -23,-8.2C200.5,37.6 183.6,42.2 170.4,55.4z"
android:fillColor="#242425"/>
<path
android:pathData="M273.2,77.6c-7.1,4.8 -14,11.1 -17.7,14.6l80.5,80.5c6.4,-5.2 12.7,-9.7 18.7,-13.6L273.2,77.6z"
android:fillColor="#242425"/>
<path
android:pathData="M55.4,329.6c24.2,24.2 49.4,26.4 81.8,7.3c7.8,-4.6 16.1,-10.6 24.6,-17.7c19.5,-16.3 41.3,-39.5 64.9,-69.2c-15.4,-19.4 -30.2,-36.2 -43.8,-49.8c-6.3,-6.3 -12.4,-12 -18.3,-17.1l-16.2,16.2c5.9,5 12.1,10.7 18.4,17c9,9 18.5,19.5 28.4,31.2l2.1,2.5l-2.1,2.5c-18.1,21.5 -35,38.6 -50.1,50.9c-9.6,7.8 -18.6,13.8 -26.7,17.7c-7,3.4 -13.4,5.3 -19,5.6c-2.7,0.2 -6.9,0.1 -12.1,-2c-5,-2.1 -10.2,-5.8 -15.7,-11.3c-2.1,-2.1 -5,-5.4 -6.8,-10.4c-1.9,-5.2 -2.2,-11.1 -0.9,-18l0,-0.1c0.6,-3 2,-6.4 4.3,-10.4l-18.2,-18.2c-2.4,4.8 -6.2,13.1 -8.2,23C37.6,299.5 42.2,316.4 55.4,329.6z"
android:fillColor="#242425"/>
<path
android:pathData="M86.7,250L86.7,250c-4.1,-4.4 -12,-13.1 -17.3,-21.6c-3.2,-5.2 -5.1,-9.7 -5.6,-13.5c-1.2,-6.9 -0.9,-12.7 0.9,-17.9c1.8,-5 4.8,-8.3 6.8,-10.4c5.9,-5.9 11.3,-9.7 16.7,-11.7c5.5,-2 10,-1.8 13.3,-1.4c4.4,0.5 9.2,2 14.3,4.2l17,-17c-30.3,-16.4 -54.4,-13.3 -77.4,9.7c-13.2,13.2 -17.8,30.1 -13.7,50.3c2.8,14 9.1,24.9 10.3,26.9l65.4,65.4c6,-3.1 12.5,-7.4 19.4,-12.8L86.7,250z"
android:fillColor="#242425"/>
<path
android:pathData="M92.2,244.5l80.5,-80.5c-5.2,-6.4 -9.7,-12.7 -13.6,-18.7l-81.5,81.5C82.4,233.9 88.6,240.8 92.2,244.5z"
android:fillColor="#242425"/>
<path
android:pathData="M329.6,444.6c24.2,-24.2 26.4,-49.4 7.3,-81.8c-4.6,-7.8 -10.6,-16.1 -17.7,-24.6c-16.3,-19.5 -39.5,-41.3 -69.2,-64.9c-19.4,15.4 -36.2,30.2 -49.8,43.8c-6.3,6.3 -12,12.4 -17.1,18.3l16.2,16.2c5,-5.9 10.7,-12.1 17,-18.4c9,-9 19.5,-18.5 31.2,-28.4l2.5,-2.1l2.5,2.1c21.5,18.1 38.6,35 50.9,50.1c7.8,9.6 13.8,18.6 17.7,26.7c3.4,7 5.3,13.4 5.6,19c0.2,2.7 0.1,6.9 -2,12.1c-2.1,5 -5.8,10.2 -11.3,15.7c-2.1,2.1 -5.4,5 -10.4,6.8c-5.2,1.9 -11.1,2.2 -18,0.9l-0.1,0c-3,-0.6 -6.4,-2 -10.4,-4.3l-18.2,18.2c4.7,2.4 13.1,6.1 22.9,8.2C299.4,462.4 316.4,457.8 329.6,444.6z"
android:fillColor="#242425"/>
<path
android:pathData="M244.5,407.8L164,327.3c-6.4,5.2 -12.7,9.7 -18.7,13.6l81.5,81.5C233.9,417.6 240.8,411.4 244.5,407.8z"
android:fillColor="#242425"/>
<path
android:pathData="M483.4,250c2.6,-6.3 5.3,-14 7.1,-22.7c6.3,-30.8 -1.8,-59.2 -22.7,-80.1c-19.7,-19.7 -41.7,-29.7 -65.5,-29.7c-7.5,0 -15.1,1 -22.8,3c2.9,-11.3 3.7,-22.3 2.3,-33.2c-2.5,-19.8 -12.3,-38.3 -29,-55.1C336.6,15.9 315.9,7.4 293,7.4c-6.6,0 -13.4,0.7 -20.2,2.1c-8.7,1.8 -16.5,4.5 -22.7,7.1c-6.3,-2.6 -14.1,-5.3 -22.8,-7.1c-6.9,-1.4 -13.7,-2.1 -20.2,-2.1c-22.9,0 -43.6,8.6 -59.9,24.8c-17.6,17.6 -27.5,37.2 -29.4,58.1c-0.9,9.9 0,19.9 2.7,30.2c-7.7,-2 -15.3,-3 -22.8,-3c-23.8,0 -45.8,10 -65.5,29.7c-20.9,20.9 -28.9,49.3 -22.7,80.1c1.8,8.7 4.5,16.5 7.1,22.7c-2.6,6.3 -5.3,14.1 -7.1,22.8c-6.2,30.8 1.8,59.2 22.7,80.1c19.7,19.7 41.7,29.7 65.5,29.7c0,0 0,0 0,0c7.5,0 15.1,-1 22.8,-3c-2.9,11.3 -3.7,22.3 -2.3,33.2c2.5,19.8 12.3,38.3 29,55.1c16.2,16.2 36.9,24.8 59.8,24.8c0,0 0,0 0,0c6.6,0 13.4,-0.7 20.2,-2.1c8.7,-1.8 16.5,-4.4 22.7,-7.1c6.3,2.6 14,5.3 22.7,7.1c6.9,1.4 13.7,2.1 20.3,2.1c0,0 0,0 0,0c22.9,0 43.6,-8.6 59.9,-24.8c17.6,-17.6 27.5,-37.2 29.4,-58.1c0.9,-9.9 0,-19.9 -2.7,-30.2c7.7,2 15.3,3 22.8,3c0,0 0,0 0,0c23.8,0 45.8,-10 65.5,-29.7c20.9,-20.9 29,-49.3 22.7,-80.1C488.8,264 486.1,256.3 483.4,250z"
android:fillColor="#242425"/>
<path
android:pathData="M170.4,444.6c13.2,13.2 30.1,17.8 50.3,13.7c14,-2.8 24.9,-9.1 26.9,-10.3l65.4,-65.4c-3.1,-6 -7.4,-12.5 -12.8,-19.4L250,413.3l0,0c-4.3,4.1 -13,12.1 -21.6,17.4c-5.2,3.2 -9.7,5.1 -13.5,5.6c-6.9,1.2 -12.7,0.9 -17.9,-0.9c-5,-1.8 -8.3,-4.8 -10.4,-6.8c-5.9,-5.9 -9.7,-11.3 -11.7,-16.7c-2,-5.5 -1.8,-10 -1.4,-13.3c0.5,-4.4 2,-9.2 4.2,-14.3l-17,-17C144.3,397.5 147.3,421.5 170.4,444.6z"
android:fillColor="#242425"/>
<path
android:pathData="M436.2,215c-0.6,3 -2,6.4 -4.3,10.4l18.2,18.2c2.4,-4.8 6.2,-13.1 8.2,-22.9c4.1,-20.2 -0.5,-37.1 -13.7,-50.3c-24.2,-24.2 -49.4,-26.4 -81.8,-7.3c-7.8,4.6 -16.1,10.6 -24.6,17.7c-19.5,16.3 -41.3,39.5 -64.9,69.2c15.4,19.4 30.2,36.2 43.8,49.8c6.3,6.3 12.4,12 18.3,17.1l16.2,-16.2c-5.9,-5 -12.1,-10.7 -18.4,-17c-9,-9 -18.5,-19.5 -28.4,-31.2l-2.1,-2.5l2.1,-2.5c18.1,-21.5 35,-38.6 50.1,-50.9c9.6,-7.8 18.6,-13.8 26.7,-17.7c7,-3.4 13.4,-5.3 19,-5.6c2.7,-0.2 6.9,-0.1 12.1,2c5,2.1 10.2,5.8 15.7,11.3c2.1,2.1 5,5.4 6.8,10.4C437.1,202.1 437.5,208 436.2,215L436.2,215z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M340.9,354.7l81.5,-81.5c-4.8,-7.1 -11.1,-14 -14.6,-17.7L327.3,336C332.5,342.4 337.1,348.6 340.9,354.7z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M444.6,329.6c13.2,-13.2 17.8,-30.1 13.7,-50.3c-2.8,-14 -9.1,-24.9 -10.3,-26.9L382.6,187c-6,3.1 -12.5,7.4 -19.4,12.8l50.1,50.1l0,0c4.1,4.3 12.1,13 17.4,21.6c3.2,5.2 5.1,9.7 5.6,13.5c1.2,6.9 0.9,12.7 -0.9,17.9c-1.8,5 -4.8,8.3 -6.8,10.4c-5.9,5.9 -11.3,9.7 -16.7,11.7c-5.5,2 -10,1.8 -13.3,1.4c-4.4,-0.5 -9.2,-2 -14.3,-4.2l-17,17C397.5,355.7 421.5,352.7 444.6,329.6z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M303.1,64.7c5,1.8 8.3,4.8 10.4,6.8c5.9,5.9 9.7,11.3 11.7,16.7c2,5.5 1.8,10 1.4,13.3c-0.5,4.4 -2,9.2 -4.2,14.3l17,17c16.4,-30.3 13.3,-54.4 -9.7,-77.4c-13.2,-13.2 -30.1,-17.8 -50.3,-13.7c-14,2.8 -24.9,9.1 -26.9,10.3L187,117.4c3.1,6 7.4,12.5 12.8,19.4L250,86.7l0,0c4.3,-4.1 13,-12.1 21.6,-17.4c5.2,-3.2 9.7,-5.1 13.5,-5.6C292,62.6 297.9,62.9 303.1,64.7z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M170.4,55.4c-24.2,24.2 -26.4,49.4 -7.3,81.8c4.6,7.8 10.6,16.1 17.7,24.6c16.3,19.5 39.5,41.3 69.2,64.9c19.4,-15.4 36.2,-30.2 49.8,-43.8c6.3,-6.3 12,-12.4 17.1,-18.3l-16.2,-16.2c-5,5.9 -10.7,12.1 -17,18.4c-9,9 -19.5,18.5 -31.2,28.4l-2.5,2.1l-2.5,-2.1c-21.5,-18.1 -38.6,-35 -50.9,-50.1c-7.8,-9.6 -13.8,-18.6 -17.7,-26.7c-3.4,-7 -5.3,-13.4 -5.6,-19c-0.2,-2.7 -0.1,-6.9 2,-12.1c2.1,-5 5.8,-10.2 11.3,-15.7c2.1,-2.1 5.4,-5 10.4,-6.8c5.2,-1.9 11.1,-2.2 18,-0.9l0.1,0c3,0.6 6.4,2 10.4,4.3l18.2,-18.2c-4.8,-2.4 -13.1,-6.2 -23,-8.2C200.5,37.6 183.6,42.2 170.4,55.4z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M273.2,77.6c-7.1,4.8 -14,11.1 -17.7,14.6l80.5,80.5c6.4,-5.2 12.7,-9.7 18.7,-13.6L273.2,77.6z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M55.4,329.6c24.2,24.2 49.4,26.4 81.8,7.3c7.8,-4.6 16.1,-10.6 24.6,-17.7c19.5,-16.3 41.3,-39.5 64.9,-69.2c-15.4,-19.4 -30.2,-36.2 -43.8,-49.8c-6.3,-6.3 -12.4,-12 -18.3,-17.1l-16.2,16.2c5.9,5 12.1,10.7 18.4,17c9,9 18.5,19.5 28.4,31.2l2.1,2.5l-2.1,2.5c-18.1,21.5 -35,38.6 -50.1,50.9c-9.6,7.8 -18.6,13.8 -26.7,17.7c-7,3.4 -13.4,5.3 -19,5.6c-2.7,0.2 -6.9,0.1 -12.1,-2c-5,-2.1 -10.2,-5.8 -15.7,-11.3c-2.1,-2.1 -5,-5.4 -6.8,-10.4c-1.9,-5.2 -2.2,-11.1 -0.9,-18l0,-0.1c0.6,-3 2,-6.4 4.3,-10.4l-18.2,-18.2c-2.4,4.8 -6.2,13.1 -8.2,23C37.6,299.5 42.2,316.4 55.4,329.6z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M86.7,250L86.7,250c-4.1,-4.4 -12,-13.1 -17.3,-21.6c-3.2,-5.2 -5.1,-9.7 -5.6,-13.5c-1.2,-6.9 -0.9,-12.7 0.9,-17.9c1.8,-5 4.8,-8.3 6.8,-10.4c5.9,-5.9 11.3,-9.7 16.7,-11.7c5.5,-2 10,-1.8 13.3,-1.4c4.4,0.5 9.2,2 14.3,4.2l17,-17c-30.3,-16.4 -54.4,-13.3 -77.4,9.7c-13.2,13.2 -17.8,30.1 -13.7,50.3c2.8,14 9.1,24.9 10.3,26.9l65.4,65.4c6,-3.1 12.5,-7.4 19.4,-12.8L86.7,250z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M92.2,244.5l80.5,-80.5c-5.2,-6.4 -9.7,-12.7 -13.6,-18.7l-81.5,81.5C82.4,233.9 88.6,240.8 92.2,244.5z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M329.6,444.6c24.2,-24.2 26.4,-49.4 7.3,-81.8c-4.6,-7.8 -10.6,-16.1 -17.7,-24.6c-16.3,-19.5 -39.5,-41.3 -69.2,-64.9c-19.4,15.4 -36.2,30.2 -49.8,43.8c-6.3,6.3 -12,12.4 -17.1,18.3l16.2,16.2c5,-5.9 10.7,-12.1 17,-18.4c9,-9 19.5,-18.5 31.2,-28.4l2.5,-2.1l2.5,2.1c21.5,18.1 38.6,35 50.9,50.1c7.8,9.6 13.8,18.6 17.7,26.7c3.4,7 5.3,13.4 5.6,19c0.2,2.7 0.1,6.9 -2,12.1c-2.1,5 -5.8,10.2 -11.3,15.7c-2.1,2.1 -5.4,5 -10.4,6.8c-5.2,1.9 -11.1,2.2 -18,0.9l-0.1,0c-3,-0.6 -6.4,-2 -10.4,-4.3l-18.2,18.2c4.7,2.4 13.1,6.1 22.9,8.2C299.4,462.4 316.4,457.8 329.6,444.6z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M244.5,407.8L164,327.3c-6.4,5.2 -12.7,9.7 -18.7,13.6l81.5,81.5C233.9,417.6 240.8,411.4 244.5,407.8z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M170.4,444.6c13.2,13.2 30.1,17.8 50.3,13.7c14,-2.8 24.9,-9.1 26.9,-10.3l65.4,-65.4c-3.1,-6 -7.4,-12.5 -12.8,-19.4L250,413.3l0,0c-4.3,4.1 -13,12.1 -21.6,17.4c-5.2,3.2 -9.7,5.1 -13.5,5.6c-6.9,1.2 -12.7,0.9 -17.9,-0.9c-5,-1.8 -8.3,-4.8 -10.4,-6.8c-5.9,-5.9 -9.7,-11.3 -11.7,-16.7c-2,-5.5 -1.8,-10 -1.4,-13.3c0.5,-4.4 2,-9.2 4.2,-14.3l-17,-17C144.3,397.5 147.3,421.5 170.4,444.6z"
android:fillColor="#FFFFFF"/>
</vector>

View File

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/darkGreyPurple" />
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<item android:drawable="@drawable/knott"
android:gravity="center"
/>
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:lottie_autoPlay="true"
app:lottie_rawRes="@raw/cwtch_animated_logo_op"
app:lottie_loop="true"
app:lottie_speed="1.00" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/knott"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,23 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
</resources>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowSplashScreenBackground">@color/darkGreyPurple</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/knott</item>
<item name="android:windowSplashScreenIconBackgroundColor">@color/darkGreyPurple</item>
</style>
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -1,5 +0,0 @@
<resources>
<color name="darkGreyPurple">#281831</color>
<color name="testGreen">#00ff00</color>
<color name="ic_launcher_background">@color/darkGreyPurple</color>
</resources>

View File

@ -1,7 +1,21 @@
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
@ -13,6 +27,7 @@ subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
//removed due to gradle namespace conflicts that are beyond erinn's mere mortal understanding
//task clean(type: Delete) {
// delete rootProject.buildDir
//}

View File

@ -1,8 +1,6 @@
#Mon Jun 20 10:33:21 PDT 2022
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
# third party plugin connectivity_plus should match, so when updating, also update
# lib/third_party/connectivity_plus/connectivity_plus/android/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

View File

@ -1,25 +1,11 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
include ':app', ':cwtch'
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.2" apply false
id "org.jetbrains.kotlin.android" version "1.8.21" apply false
}
include ":app"
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

BIN
assets/fonts/CwtchIcons.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,93 +0,0 @@
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -1,93 +0,0 @@
Copyright 2021 Google Inc. All Rights Reserved.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,107 +0,0 @@
---
colors:
darkGreyPurple: 0x281831
deepPurple: 0x422850
mauvePurple: 0x8E64A5
whiteishPurple: 0xE3DFE4
lightGrey: 0x9E9E9E
softGreen: 0xA0FFB0
softRed: 0xFFA0B0
whitePurple: 0xFFFDFF
softPurple: 0xFDF3FC
purple: 0xDFB9DE
brightPurple: 0xD1B0E0 # not in new: portrait badge color
darkPurple: 0x350052
greyPurple: 0x775F84 # not in new: portrait borders
pink: 0xE85DA1 # not in new: active button color
hotPink: 0xD20070 # #D01972)
softGrey: 0xB3B6B3 # not in new theme: blocked
themes:
name: cwtch
dark:
colors:
background: darkGreyPurple
header: darkGreyPurple
userBubble: mauvePurple
peerBubble: deepPurple
font: whiteishPurple
settings: whiteishPurple
accent: hotPink
theme:
backgroundHilightElementColor: deepPurple
backgroundMainColor: background # darkGreyPurple
backgroundPaneColor: header # darkGreyPurple
defaultButtonColor: accent # hotPink
defaultButtonDisabledColor: lightGrey
defaultButtonDisabledTextColor: darkGreyPurple
defaultButtonTextColor: whiteishPurple
dropShadowColor: mauvePurple
hilightElementColor: purple
mainTextColor: font # whiteishPurple
messageFromMeBackgroundColor: userBubble # mauvePurple
messageFromMeTextColor: font # whiteishPurple
messageFromOtherBackgroundColor: peerBubble # deepPurple
messageFromOtherTextColor: font # whiteishPurple
portraitBackgroundColor: deepPurple
portraitBlockedBorderColor: lightGrey
portraitBlockedTextColor: lightGrey
portraitContactBadgeColor: hotPink
portraitContactBadgeTextColor: whiteishPurple
portraitOfflineBorderColor: purple
portraitOnlineBorderColor: whiteishPurple
portraitProfileBadgeColor: hotPink
portraitProfileBadgeTextColor: whiteishPurple
scrollbarDefaultColor: purple
sendHintTextColor: mauvePurple
chatReactionIconColor: mauvePurple
textfieldBackgroundColor: deepPurple
textfieldBorderColor: deepPurple
textfieldErrorColor: hotPink
textfieldHintColor: mainTextColor
toolbarIconColor: settings # whiteishPurple
topbarColor: header # darkGreyPurple
chatImage: Cwtch.png
chatImageColor: peerBubble
light:
colors:
background: whitePurple
header: softPurple
userBubble: purple
peerBubble: softPurple
font: 0x281831
settings: 0x281831
accent: hotPink
theme:
backgroundHilightElementColor: softPurple
backgroundMainColor: background # whitePurple
backgroundPaneColor: background # whitePurple
defaultButtonColor: accent # hotPink
defaultButtonDisabledColor: softGrey
defaultButtonTextColor: whitePurple # ?
dropShadowColor: purple
hilightElementColor: purple
mainTextColor: settings
messageFromMeBackgroundColor: userBubble # brightPurple
messageFromMeTextColor: font # mainTextColor
messageFromOtherBackgroundColor: peerBubble # purple
messageFromOtherTextColor: font # darkPurple
portraitBackgroundColor: softPurple
portraitBlockedBorderColor: softGrey
portraitBlockedTextColor: softGrey
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: whitePurple
portraitOfflineBorderColor: greyPurple
portraitOnlineBorderColor: font
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: whitePurple
scrollbarDefaultColor: accent
sendHintTextColor: purple
chatReactionIconColor: purple
textfieldBackgroundColor: purple
textfieldBorderColor: purple
textfieldErrorColor: hotPink
textfieldHintColor: font
toolbarIconColor: background # darkPurple
topbarColor: header # softPurple
chatImage: Cwtch.png
chatImageColor: 0xf1dff0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,86 +0,0 @@
---
colors:
darkDarkBlue: 0x0E1628
darkLightBlue: 0x19243E
white: 0xE6E9F4
darkBlue: 0x131B2E
lighterDarkBlue: 0x19243E
lightBlue: 0xC0C8E5
themes:
name: ghost
dark:
colors:
background: 0x131B2E
header: 0x0E1628
userBubble: 0x25355A
peerBubble: 0x19243E
font: 0xE6E9F4
settings: 0xE6E9F4
accent: 0xD20070
reaction: 0x96A5D4
theme:
backgroundHilightElementColor: darkDarkBlue
backgroundMainColor: background
backgroundPaneColor: header
defaultButtonColor: accent
dropShadowColor: darkBlue
mainTextColor: font
messageFromMeBackgroundColor: userBubble
messageFromMeTextColor: font
messageFromOtherBackgroundColor: peerBubble
messageFromOtherTextColor: font
portraitOfflineBorderColor: 0x96A5D4
portraitOnlineBorderColor: font
portraitBackgroundColor: background
scrollbarDefaultColor: darkLightBlue
sendHintTextColor: userBubble
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
textfieldHintColor: font
toolbarIconColor: settings
topbarColor: header
chatReactionIconColor: reaction
chatImage: Ghost.png
chatImageColor: userBubble
snackbarBackgroundColor: accent
snackbarTextColor: 0xE6E9F4
light:
colors:
background: 0xE6E9F4
header: 0x96A5D4
userBubble: 0x96A5D4
peerBubble: 0xC0C8E5
font: 0x131B2E
settings: 0x131B2E
accent: 0xD20070
reaction: 0x96A5D4
theme:
backgroundHilightElementColor: peerBubble
backgroundMainColor: background
backgroundPaneColor: background
defaultButtonColor: accent
defaultButtonActiveColor: lighterDarkBlue
defaultButtonDisabledColor: userBubble
dropShadowColor: darkBlue
mainTextColor: settings
messageFromMeBackgroundColor: userBubble
messageFromMeTextColor: font
messageFromOtherBackgroundColor: peerBubble
messageFromOtherTextColor: font
portraitContactBadgeColor: accent
portraitOfflineBorderColor: header
portraitOnlineBorderColor: font
portraitBackgroundColor: background
scrollbarDefaultColor: accent
sendHintTextColor: peerBubble
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
textfieldHintColor: font
toolbarIconColor: 0xffffff
topbarColor: header
chatReactionIconColor: reaction
chatImage: Ghost.png
chatImageColor: peerBubble
snackbarBackgroundColor: accent
snackbarTextColor: background

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,53 +0,0 @@
---
themes:
name: juniper
dark:
colors:
background: 0x1B1B1B
backgroundAlt: 0x494949
header: 0x1B1B1B
userBubble: 0x373737
peerBubble: 0x494949
font: 0xFFFFFF
settings: 0xFFFDFF
accent: 0x9E6A56
accentAlt: 0x9E6A56
theme:
backgroundMainColor: background
backgroundPaneColor: header
topbarColor: header
mainTextColor: font
defaultButtonColor: accent
textfieldHintColor: mainTextColor
toolbarIconColor: settings
messageFromMeBackgroundColor: userBubble
messageFromMeTextColor: font
messageFromOtherBackgroundColor: peerBubble
messageFromOtherTextColor: font
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
backgroundHilightElementColor: accent
sendHintTextColor: accentAlt
hilightElementColor: accentAlt
defaultButtonTextColor: mainTextColor
defaultButtonDisabledColor: peerBubble
defaultButtonDisabledTextColor: peerBubble
textfieldErrorColor: accent
scrollbarDefaultColor: accent
portraitBackgroundColor: header
portraitOnlineBorderColor: font
portraitOfflineBorderColor: peerBubble
portraitBlockedBorderColor: peerBubble
portraitBlockedTextColor: peerBubble
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: mainTextColor
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: mainTextColor
dropShadowColor: accentAlt
chatReactionIconColor: accentAlt
chatImage: JuniperDark.png
chatImageColor: userBubble
messageSelectionColor: accent
textfieldSelectionColor: accent
menuBackgroundColor: accent

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,91 +0,0 @@
---
colors:
lavender: 0xB194C1
themes:
name: mermaid
dark:
colors:
background: 0x15282A
header: 0x15282A
userBubble: 0x1d5754
peerBubble: 0x253D3F
font: 0xEDFAFC
settings: 0xEDFAFC
accent: 0x8E64A5
reaction: 0x8E64A5
theme:
backgroundHilightElementColor: peerBubble
backgroundMainColor: background # darkGreyPurple
backgroundPaneColor: header # darkGreyPurple
defaultButtonColor: accent # hotPink
dropShadowColor: lavender
mainTextColor: font # whiteishPurple
messageFromMeBackgroundColor: userBubble # mauvePurple
messageFromMeTextColor: font # whiteishPurple
messageFromOtherBackgroundColor: peerBubble # deepPurple
messageFromOtherTextColor: font # whiteishPurple
portraitOfflineBorderColor: userBubble
portraitOnlineBorderColor: font
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: 0xffffff
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: 0xffffff
portraitBackgroundColor: background
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
textfieldHintColor: mainTextColor
toolbarIconColor: settings # whiteishPurple
topbarColor: header # darkGreyPurple
sendHintTextColor: userBubble
chatReactionIconColor: reaction
chatImage: Mermaid.png
chatImageColor: peerBubble
snackbarBackgroundColor: accent
snackbarTextColor: 0xEDFAFC
messageSelectionColor: accent
textfieldSelectionColor: accent
menuBackgroundColor: accent
light:
colors:
background: 0xEDFAFC
header: 0x71C1BF
userBubble: 0x71C1BF
peerBubble: 0xD2EFF3
font: 0x15282A
settings: 0x15282A
accent: 0x8E64A5
reaction: 0x71C1BF
theme:
backgroundHilightElementColor: peerBubble
backgroundMainColor: background # whitePurple
backgroundPaneColor: background # whitePurple
defaultButtonColor: accent # hotPink
dropShadowColor: peerBubble
mainTextColor: settings
messageFromMeBackgroundColor: userBubble # brightPurple
messageFromMeTextColor: font # mainTextColor
messageFromOtherBackgroundColor: peerBubble # purple
messageFromOtherTextColor: font # darkPurple
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: 0xffffff
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: 0xffffff
portraitOfflineBorderColor: userBubble
portraitOnlineBorderColor: font
portraitBackgroundColor: background
scrollbarDefaultColor: accent
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
textfieldHintColor: font
toolbarIconColor: 0xffffff
topbarColor: header # softPurple
sendHintTextColor: userBubble
chatReactionIconColor: reaction
chatImage: Mermaid.png
chatImageColor: peerBubble
snackbarBackgroundColor: accent
snackbarTextColor: background
messageSelectionColor: 0xb1e3ea
textfieldSelectionColor: 0xb1e3ea
menuBackgroundColor: 0xb1e3ea

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,77 +0,0 @@
---
themes:
name: midnight
dark:
colors:
accentGray: 0xE0E0E0
background: 0x111111
backgroundAlt: 0x494949
header: 0x111111
userBubble: 0x2D2D2D
peerBubble: 0x1B1B1B
font: 0xF0F1F1
settings: 0xF0F1F1
accent: 0xD20070
reaction: 0xD20070
theme:
backgroundHilightElementColor: backgroundAlt
backgroundMainColor: background # darkGreyPurple
backgroundPaneColor: header # darkGreyPurple
defaultButtonColor: accent # hotPink
dropShadowColor: accentGray
mainTextColor: font # whiteishPurple
messageFromMeBackgroundColor: userBubble # mauvePurple
messageFromMeTextColor: font # whiteishPurple
messageFromOtherBackgroundColor: peerBubble # deepPurple
messageFromOtherTextColor: font # whiteishPurple
scrollbarDefaultColor: accentGray
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
textfieldHintColor: mainTextColor
portraitOfflineBorderColor: 0x676767
portraitOnlineBorderColor: font
portraitBackgroundColor: background
toolbarIconColor: settings # whiteishPurple
topbarColor: header # darkGreyPurple
sendHintTextColor: userBubble
chatReactionIconColor: reaction
chatImage: Midnight.png
chatImageColor: userBubble
snackbarBackgroundColor: accent
snackbarTextColor: 0xF0F1F1
light:
colors:
background: 0xF0F1F1 # Color( 0xFFFDFF)
header: 0xE0E0E0
userBubble: 0xBABDBE
peerBubble: 0xE0E0E0
font: 0x111111
settings: 0x111111
accent: 0xD20070
reaction: 0xD20070
theme:
backgroundHilightElementColor: peerBubble
backgroundMainColor: background # whitePurple
backgroundPaneColor: background # whitePurple
defaultButtonColor: accent # hotPink
mainTextColor: settings
messageFromMeBackgroundColor: userBubble # brightPurple
messageFromMeTextColor: font # mainTextColor
messageFromOtherBackgroundColor: peerBubble # purple
messageFromOtherTextColor: font # darkPurple
portraitContactBadgeColor: accent
portraitOfflineBorderColor: userBubble
portraitOnlineBorderColor: font
portraitBackgroundColor: background
scrollbarDefaultColor: accent
textfieldBackgroundColor: userBubble
textfieldHintColor: font
toolbarIconColor: 0xffffff
topbarColor: header # softPurple
sendHintTextColor: userBubble
chatReactionIconColor: reaction
chatImage: Midnight.png
chatImageColor: peerBubble
snackbarBackgroundColor: accent
snackbarTextColor: background

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,86 +0,0 @@
---
themes:
name: neon1
dark:
colors:
background: 0x281831
header: 0x281831
userBubble: 0x7F00C5
peerBubble: 0x422850
font: 0xFBF3FF
settings: 0x281831
accent: 0x56DCD8
reaction: 0xD891FF
theme:
backgroundMainColor: background # darkGreyPurple
backgroundPaneColor: header # darkGreyPurple
defaultButtonColor: accent # hotPink
mainTextColor: 0xFBF3FF # whiteishPurple
messageFromMeBackgroundColor: userBubble # mauvePurple
messageFromMeTextColor: font # whiteishPurple
messageFromOtherBackgroundColor: peerBubble # deepPurple
messageFromOtherTextColor: font # whiteishPurple
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: background
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: background
portraitBackgroundColor: background
portraitOfflineBorderColor: 0x775F84
portraitOnlineBorderColor: font
scrollbarDefaultColor: accent
textfieldHintColor: mainTextColor
toolbarIconColor: settings # whiteishPurple
topbarColor: header # darkGreyPurple
sendHintTextColor: userBubble
chatReactionIconColor: reaction
defaultButtonTextColor: 0x281831
chatImage: Neon1.png
chatImageColor: 0x4f3060
snackbarBackgroundColor: accent
snackbarTextColor: background
messageSelectionColor: 0x775F84
textfieldSelectionColor: 0x775F84
menuBackgroundColor: 0x775F84
light:
colors:
background: 0xFBF3FF
header: 0x56DCD8
userBubble: 0x56DCD8
peerBubble: 0xF5E1FF
font: 0x281831
settings: 0x281831
accent: 0xD891FF
reaction: 0xD891FF
theme:
backgroundMainColor: background # whitePurple
backgroundPaneColor: background # whitePurple
defaultButtonColor: accent # hotPink
dropShadowColor: userBubble
mainTextColor: settings
messageFromMeBackgroundColor: userBubble # brightPurple
messageFromMeTextColor: font # mainTextColor
messageFromOtherBackgroundColor: peerBubble # purple
messageFromOtherTextColor: font # darkPurple
portraitOfflineBorderColor: 0xeac1ff
portraitOnlineBorderColor: font
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: font
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: font
scrollbarDefaultColor: accent
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
textfieldHintColor: font
toolbarIconColor: settings # darkPurple
topbarColor: header # softPurple
sendHintTextColor: 0xeac1ff
chatReactionIconColor: reaction
chatImage: Neon1.png
chatImageColor: 0xeac1ff
defaultButtonTextColor: font
snackbarBackgroundColor: accent
snackbarTextColor: font
messageSelectionColor: accent
textfieldSelectionColor: accent
menuBackgroundColor: accent

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,83 +0,0 @@
---
themes:
name: neon2
dark:
colors:
background: 0x281831
header: 0x281831
userBubble: 0x7F00C5
peerBubble: 0x422850
font: 0xFBF3FF
settings: 0x281831
accent: 0x90EE02
reaction: 0xD891FF
theme:
backgroundMainColor: background # darkGreyPurple
backgroundPaneColor: header # darkGreyPurple
defaultButtonColor: accent # hotPink
mainTextColor: font # whiteishPurple
messageFromMeBackgroundColor: userBubble # mauvePurple
messageFromMeTextColor: font # whiteishPurple
messageFromOtherBackgroundColor: peerBubble # deepPurple
messageFromOtherTextColor: font # whiteishPurple
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: 0x281831
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: 0x281831
scrollbarDefaultColor: accent
textfieldHintColor: mainTextColor
toolbarIconColor: settings # whiteishPurple
topbarColor: header # darkGreyPurple
sendHintTextColor: userBubble
chatReactionIconColor: reaction
defaultButtonTextColor: background
chatImage: Neon2.png
chatImageColor: 0x573569
snackbarBackgroundColor: accent
snackbarTextColor: background
messageSelectionColor: 0x775F84
textfieldSelectionColor: 0x775F84
menuBackgroundColor: 0x775F84
light:
colors:
paleGreen: 0xE7F6F6
background: 0xFBFFF6
header: 0x90EE02
userBubble: 0x90EE02
peerBubble: 0xF3FFE4
font: 0x281831
settings: 0x281831
accent: 0x7F00C5
reaction: 0x7F00C5
theme:
backgroundMainColor: background # whitePurple
backgroundPaneColor: background # whitePurple
defaultButtonColor: accent # hotPink
dropShadowColor: userBubble
mainTextColor: settings
messageFromMeBackgroundColor: userBubble # brightPurple
messageFromMeTextColor: font # mainTextColor
messageFromOtherBackgroundColor: peerBubble # purple
messageFromOtherTextColor: font # darkPurple
portraitOfflineBorderColor: 0x775F84
portraitOnlineBorderColor: font
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: background
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: background
portraitBackgroundColor: background
scrollbarDefaultColor: accent
textfieldBackgroundColor: paleGreen
textfieldBorderColor: peerBubble
textfieldHintColor: font
toolbarIconColor: background # darkPurple
topbarColor: header # softPurple
chatReactionIconColor: accent
chatImage: Neon2.png
chatImageColor: 0xd9ffa8
snackbarBackgroundColor: accent
snackbarTextColor: background
messageSelectionColor: 0xd9ffa8
textfieldSelectionColor: 0xd9ffa8
menuBackgroundColor: 0xd9ffa8

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,84 +0,0 @@
---
themes:
name: pumpkin
dark:
colors:
background: 0x281831
header: 0x281831
userBubble: 0x873C14
peerBubble: 0x422850
font: 0xFFFAF2
settings: 0xFFFAF2
accent: 0x873C14
reaction: 0x873C14
theme:
backgroundMainColor: background # darkGreyPurple
backgroundPaneColor: header # darkGreyPurple
defaultButtonColor: accent # hotPink
mainTextColor: font # whiteishPurple
messageFromMeBackgroundColor: userBubble # mauvePurple
messageFromMeTextColor: font # whiteishPurple
messageFromOtherBackgroundColor: peerBubble # deepPurple
messageFromOtherTextColor: font # whiteishPurple
scrollbarDefaultColor: accent
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: 0xFFFAF2
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: 0xFFFAF2
portraitOfflineBorderColor: 0x775F84
portraitOnlineBorderColor: font
textfieldHintColor: mainTextColor
toolbarIconColor: settings # whiteishPurple
topbarColor: header # darkGreyPurple
sendHintTextColor: peerBubble
chatReactionIconColor: reaction
chatImage: Pumpkin.png
chatImageColor: 0x573569
snackbarBackgroundColor: accent
snackbarTextColor: 0xFFFAF2
messageSelectionColor: 0x775F84
textfieldSelectionColor: 0x775F84
menuBackgroundColor: 0x775F84
light:
colors:
background: 0xFFFAF2
header: 0xFF9800
userBubble: 0xFF9800
peerBubble: 0xFFF3E0
font: 0x281831
settings: 0x281831
accent: 0x422850
reaction: 0xFF9800
theme:
backgroundHilightElementColor: peerBubble
backgroundMainColor: background # whitePurple
backgroundPaneColor: background # whitePurple
defaultButtonColor: accent # hotPink
dropShadowColor: peerBubble
mainTextColor: settings
messageFromMeBackgroundColor: userBubble # brightPurple
messageFromMeTextColor: font # mainTextColor
messageFromOtherBackgroundColor: peerBubble # purple
messageFromOtherTextColor: font # darkPurple
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: 0xFFFAF2
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: 0xFFFAF2
portraitOfflineBorderColor: 0x775F84
portraitOnlineBorderColor: font
scrollbarDefaultColor: accent
textfieldBackgroundColor: background
textfieldBorderColor: userBubble
textfieldHintColor: mainTextColor
toolbarIconColor: background # darkPurple
topbarColor: header # softPurple
sendHintTextColor: 0xffd494
chatReactionIconColor: reaction
chatImage: Pumpkin.png
chatImageColor: 0xFFDCA8
snackbarBackgroundColor: accent
snackbarTextColor: background
messageSelectionColor: 0xFFDCA8
textfieldSelectionColor: 0xFFDCA8
menuBackgroundColor: 0xFFDCA8

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,85 +0,0 @@
---
themes:
name: vampire
dark:
colors:
background: 0x27141B
header: 0x27141B
userBubble: 0x422850
peerBubble: 0x502033
font: 0xFBF4F7
settings: 0xFBF4F7
accent: 0x502033
reaction: 0xC86B89
theme:
backgroundMainColor: background # darkGreyPurple
backgroundPaneColor: header # darkGreyPurple
defaultButtonColor: accent # hotPink
mainTextColor: font # whiteishPurple
messageFromMeBackgroundColor: userBubble # mauvePurple
messageFromMeTextColor: font # whiteishPurple
messageFromOtherBackgroundColor: peerBubble # deepPurple
messageFromOtherTextColor: font # whiteishPurple
portraitContactBadgeColor: 0x863655
portraitContactBadgeTextColor: 0xFBF4F7
portraitProfileBadgeColor: 0x863655
portraitProfileBadgeTextColor: 0xFBF4F7
portraitBackgroundColor: peerBubble
portraitOfflineBorderColor: 0x863655
portraitOnlineBorderColor: font
scrollbarDefaultColor: accent
textfieldHintColor: mainTextColor
toolbarIconColor: settings # whiteishPurple
topbarColor: header # darkGreyPurple
sendHintTextColor: peerBubble
chatReactionIconColor: reaction
chatImage: Vampire.png
chatImageColor: peerBubble
snackbarBackgroundColor: accent
snackbarTextColor: 0xFBF4F7
messageSelectionColor: 0x863655
textfieldSelectionColor: 0x863655
menuBackgroundColor: 0x863655
light:
colors:
background: 0xFBF4F7
header: 0xC86B89
userBubble: 0xDA94A9
peerBubble: 0xF7EAF0
font: 0x27141B
settings: 0xFBF4F7
accent: 0x502033
reaction: 0xDA94A9
theme:
backgroundMainColor: background # whitePurple
backgroundPaneColor: background # whitePurple
defaultButtonColor: accent # hotPink
dropShadowColor: userBubble
mainTextColor: font
messageFromMeBackgroundColor: userBubble # brightPurple
messageFromMeTextColor: font # mainTextColor
messageFromOtherBackgroundColor: peerBubble # purple
messageFromOtherTextColor: font # darkPurple
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: 0xFBF4F7
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: 0xFBF4F7
portraitOfflineBorderColor: 0x775F84
portraitOnlineBorderColor: font
portraitBackgroundColor: background
scrollbarDefaultColor: accent
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
textfieldHintColor: font
toolbarIconColor: settings # darkPurple
topbarColor: header # softPurple
sendHintTextColor: userBubble
chatReactionIconColor: reaction
chatImage: Vampire.png
chatImageColor: 0xE9BFCD
snackbarBackgroundColor: accent
snackbarTextColor: background
messageSelectionColor: header
textfieldSelectionColor: header
menuBackgroundColor: header

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,86 +0,0 @@
---
themes:
name: witch
dark:
colors:
background: 0x111b11
header: 0x0E1E0E
userBubble: 0x3B5132
peerBubble: 0x152716
font: 0xF1F3EC
settings: 0xE3ECD3
accent: 0x8E64A5
reaction: 0x97AF6E
theme:
backgroundHilightElementColor: peerBubble
backgroundMainColor: background # darkGreyPurple
backgroundPaneColor: header # darkGreyPurple
defaultButtonColor: accent # hotPink
mainTextColor: font # whiteishPurple
messageFromMeBackgroundColor: userBubble # mauvePurple
messageFromMeTextColor: font # whiteishPurple
messageFromOtherBackgroundColor: peerBubble # deepPurple
messageFromOtherTextColor: font # whiteishPurple
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: 0xF1F3EC
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: 0xF1F3EC
portraitOfflineBorderColor: 0x355934
portraitOnlineBorderColor: font
portraitBackgroundColor: peerBubble
scrollbarDefaultColor: accent
textfieldBackgroundColor: peerBubble
textfieldBorderColor: userBubble
textfieldHintColor: mainTextColor
toolbarIconColor: settings # whiteishPurple
topbarColor: header # darkGreyPurple
chatReactionIconColor: reaction
chatImage: Witch.png
chatImageColor: 0x1E321D
snackbarBackgroundColor: accent
snackbarTextColor: 0xF1F3EC
messageSelectionColor: accent
textfieldSelectionColor: accent
menuBackgroundColor: accent
light:
colors:
background: 0xF1F3EC
header: 0x97af6e
userBubble: 0x97AF6E
peerBubble: 0xE3ECD3
font: 0x111b11
settings: 0x0E1E0E
accent: 0x8E64A5
reaction: 0x97AF6E
theme:
backgroundHilightElementColor: peerBubble
backgroundMainColor: background # whitePurple
backgroundPaneColor: background # whitePurple
defaultButtonColor: accent # hotPink
mainTextColor: settings
messageFromMeBackgroundColor: userBubble # brightPurple
messageFromMeTextColor: font # mainTextColor
messageFromOtherBackgroundColor: peerBubble # purple
messageFromOtherTextColor: font # darkPurple
portraitContactBadgeColor: accent
portraitContactBadgeTextColor: 0xF1F3EC
portraitProfileBadgeColor: accent
portraitProfileBadgeTextColor: 0xF1F3EC
portraitOfflineBorderColor: userBubble
portraitOnlineBorderColor: font
portraitBackgroundColor: background
scrollbarDefaultColor: accent
textfieldBackgroundColor: background
textfieldBorderColor: userBubble
textfieldHintColor: font
toolbarIconColor: settings # darkPurple
topbarColor: header # softPurple
chatReactionIconColor: reaction
chatImage: Witch.png
chatImageColor: 0xD0DDBA
snackbarBackgroundColor: accent
snackbarTextColor: background
messageSelectionColor: accent
textfieldSelectionColor: accent
menuBackgroundColor: accent

View File

@ -1,20 +0,0 @@
#!/bin/sh
if [ -z "$1" ]; then
echo "build-release.sh [android|linux|macos|windows]"
exit 1
fi
if [ -f "VERSION" ]; then
VERSION=`cat VERSION`
else
VERSION=`git describe --tags --abbrev=1`
fi
if [ -f "BUILDDATE" ]; then
BUILDDATE=`cat BUILDDATE`
else
BUILDDATE=`date +%G-%m-%d-%H-%M`
fi
flutter build $1 --dart-define BUILD_VER=$VERSION --dart-define BUILD_DATE=$BUILDDATE

View File

@ -1,8 +0,0 @@
targets:
$default:
sources:
- lib/**
- pubspec.*
- $package$
# Allows the code generator to target files outside of the lib folder
- integration_test/**.dart

View File

@ -1,241 +0,0 @@
/* Slightly Modified Default linker script, for normal executables */
/* The only difference is that this version suppresses the .comment section. See DISCARD section`
/* Copyright (C) 2014-2022 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. */
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
"elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu"); SEARCH_DIR("=/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu64"); SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib");
SECTIONS
{
/* Read-only sections, merged into text segment: */
PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x400000)); . = SEGMENT_START("text-segment", 0x400000) + SIZEOF_HEADERS;
.interp : { *(.interp) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rela.init : { *(.rela.init) }
.rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
.rela.fini : { *(.rela.fini) }
.rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
.rela.data.rel.ro : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) }
.rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
.rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
.rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
.rela.ctors : { *(.rela.ctors) }
.rela.dtors : { *(.rela.dtors) }
.rela.got : { *(.rela.got) }
.rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
.rela.ldata : { *(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*) }
.rela.lbss : { *(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*) }
.rela.lrodata : { *(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*) }
.rela.ifunc : { *(.rela.ifunc) }
.rela.plt :
{
*(.rela.plt)
PROVIDE_HIDDEN (__rela_iplt_start = .);
*(.rela.iplt)
PROVIDE_HIDDEN (__rela_iplt_end = .);
}
.relr.dyn : { *(.relr.dyn) }
.init :
{
KEEP (*(SORT_NONE(.init)))
}
.plt : { *(.plt) *(.iplt) }
.plt.got : { *(.plt.got) }
.plt.sec : { *(.plt.sec) }
.text :
{
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
*(.text.exit .text.exit.*)
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(SORT(.text.sorted.*))
*(.text .stub .text.* .gnu.linkonce.t.*)
/* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
}
.fini :
{
KEEP (*(SORT_NONE(.fini)))
}
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
.rodata1 : { *(.rodata1) }
.eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
.gnu_extab : ONLY_IF_RO { *(.gnu_extab*) }
/* These sections are generated by the Sun/Oracle C++ compiler. */
.exception_ranges : ONLY_IF_RO { *(.exception_ranges*) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
/* Exception handling */
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
.gnu_extab : ONLY_IF_RW { *(.gnu_extab) }
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
.exception_ranges : ONLY_IF_RW { *(.exception_ranges*) }
/* Thread Local Storage sections */
.tdata :
{
PROVIDE_HIDDEN (__tdata_start = .);
*(.tdata .tdata.* .gnu.linkonce.td.*)
}
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
}
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
PROVIDE_HIDDEN (__init_array_end = .);
}
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
PROVIDE_HIDDEN (__fini_array_end = .);
}
.ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn't matter if the user does not
actually link against crtbegin.o; the
linker won't look for a file to match a
wildcard. The wildcard also means that it
doesn't matter which directory crtbegin.o
is in. */
KEEP (*crtbegin.o(.ctors))
KEEP (*crtbegin?.o(.ctors))
/* We don't want to include the .ctor section from
the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
}
.dtors :
{
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
}
.jcr : { KEEP (*(.jcr)) }
.data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
.dynamic : { *(.dynamic) }
.got : { *(.got) *(.igot) }
. = DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) >= 24 ? 24 : 0, .);
.got.plt : { *(.got.plt) *(.igot.plt) }
.data :
{
*(.data .data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
}
.data1 : { *(.data1) }
_edata = .; PROVIDE (edata = .);
. = .;
__bss_start = .;
.bss :
{
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections.
FIXME: Why do we need it? When there is no .bss section, we do not
pad the .data section. */
. = ALIGN(. != 0 ? 64 / 8 : 1);
}
.lbss :
{
*(.dynlbss)
*(.lbss .lbss.* .gnu.linkonce.lb.*)
*(LARGE_COMMON)
}
. = ALIGN(64 / 8);
. = SEGMENT_START("ldata-segment", .);
.lrodata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
{
*(.lrodata .lrodata.* .gnu.linkonce.lr.*)
}
.ldata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
{
*(.ldata .ldata.* .gnu.linkonce.l.*)
. = ALIGN(. != 0 ? 64 / 8 : 1);
}
. = ALIGN(64 / 8);
_end = .; PROVIDE (end = .);
. = DATA_SEGMENT_END (.);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1. */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions. */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2. */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2. */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions. */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* DWARF 3. */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
/* DWARF 5. */
.debug_addr 0 : { *(.debug_addr) }
.debug_line_str 0 : { *(.debug_line_str) }
.debug_loclists 0 : { *(.debug_loclists) }
.debug_macro 0 : { *(.debug_macro) }
.debug_names 0 : { *(.debug_names) }
.debug_rnglists 0 : { *(.debug_rnglists) }
.debug_str_offsets 0 : { *(.debug_str_offsets) }
.debug_sup 0 : { *(.debug_sup) }
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.comment) }
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

View File

@ -1,16 +0,0 @@
Cwtch (/kʊtʃ/ - a Welsh word roughly translating to “a hug that creates a safe place”) is a decentralized,
privacy-preserving, multi-party messaging protocol that can be used to build metadata resistant applications.
- Decentralized and Open: There is no “Cwtch service” or “Cwtch network”. Participants in Cwtch
can host their own safe spaces, or lend their infrastructure to others seeking a safe space.
The Cwtch protocol is open, and anyone is free to build bots, services and user interfaces and
integrate and interact with Cwtch.
- Privacy Preserving: All communication in Cwtch is end-to-end encrypted and takes place over Tor v3
onion services.
- Metadata Resistant: Cwtch has been designed such that no information is exchanged or available to
anyone without their explicit consent, including on-the-wire messages and protocol metadata.
For more information on how Cwtch works and a guide to metadata resistant communication please
checkout the Cwtch Handbook: https://docs.cwtch.im/

View File

@ -1 +0,0 @@
Metadata resistant privacy platform designed to help you resist surveillance

View File

@ -1 +0,0 @@
Cwtch

View File

@ -1 +0,0 @@
https://cwtch.im/cwtch-explainer.mp4

View File

@ -1,8 +0,0 @@
#!/bin/sh
VERSION=`cat LIBCWTCH-GO.version`
echo $VERSION
curl --fail https://build.openprivacy.ca/files/libCwtch-autobindings-$VERSION/macos/libCwtch.x64.dylib --output libCwtch.x64.dylib
curl --fail https://build.openprivacy.ca/files/libCwtch-autobindings-$VERSION/macos/libCwtch.arm64.dylib --output libCwtch.arm64.dylib

View File

@ -1,8 +1,7 @@
$Env:VERSION = type LIBCWTCH-GO.version
echo $Env:VERSION
# This should automatically fail on error...
Invoke-WebRequest -Uri https://build.openprivacy.ca/files/libCwtch-autobindings-$Env:VERSION/windows/libCwtch.dll -OutFile windows/libCwtch.dll
Invoke-WebRequest -Uri https://build.openprivacy.ca/files/libCwtch-go-$Env:VERSION/libCwtch.dll -OutFile windows/libCwtch.dll
#Invoke-WebRequest -Uri https://build.openprivacy.ca/files/libCwtch-go-$Env:VERSION/cwtch.aar -OutFile android/cwtch/cwtch.aar
#Invoke-WebRequest -Uri https://build.openprivacy.ca/files/libCwtch-go-$Env:VERSION/libCwtch.so -Outfile linux/libCwtch.so

View File

@ -3,6 +3,7 @@
VERSION=`cat LIBCWTCH-GO.version`
echo $VERSION
curl --fail https://build.openprivacy.ca/files/libCwtch-autobindings-$VERSION/android/cwtch.aar --output android/app/cwtch/cwtch.aar
# FIXME...at some point we need to support different linux architectures...for now rely on existing expectations and rename x64 lib
curl --fail https://build.openprivacy.ca/files/libCwtch-autobindings-$VERSION/linux/libCwtch.x64.so --output linux/libCwtch.so
wget https://build.openprivacy.ca/files/libCwtch-go-$VERSION/cwtch.aar -O android/cwtch/cwtch.aar
wget https://build.openprivacy.ca/files/libCwtch-go-$VERSION/libCwtch.so -O linux/libCwtch.so
# wget https://build.openprivacy.ca/files/libCwtch-go-$VERSION/libCwtch.dll -O windows/libCwtch.dll

View File

@ -1,7 +0,0 @@
#!/bin/sh
cd macos
curl https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.8.9-macos.tar.gz --output tor.tar.gz
tar -xzf tor.tar.gz
chmod a+x Tor/tor.real
cd ..

View File

@ -1,6 +1,6 @@
Invoke-WebRequest -Uri https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.8.9-win64.zip -OutFile tor.zip
Invoke-WebRequest -Uri https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-win64-0.4.6.5.zip -OutFile tor.zip
if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne 'a1c90d9a2f82df5f3d973e260bbfec76e413417cfa276fb70d1668214e2e607cf65be86a25e30c6f7814261dc154a02568459945f31389ae6a22e03d6d0d3c4c' ) { Write-Error 'tor.zip sha512sum mismatch' }
if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne '7917561a7a063440a1ddfa9cb544ab9ffd09de84cea3dd66e3cc9cd349dd9f85b74a522ec390d7a974bc19b424c4d53af60e57bbc47e763d13cab6a203c4592f' ) { Write-Error 'tor.zip sha512sum mismatch' }
Expand-Archive -Path tor.zip -DestinationPath Tor

View File

@ -1,14 +1,12 @@
#!/bin/sh
cd linux
wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.8.9-linux-x86_64.tar.gz -O tor.tar.gz
tar -xzf tor.tar.gz
cd ..
wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.5.9-linux-x86_64 -O linux/tor
chmod a+x linux/tor
mkdir -p android/app/src/main/jniLibs/arm64-v8a
wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.8.9-android-arm64 -O android/app/src/main/jniLibs/arm64-v8a/libtor.so
wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.4.9-arm64_pie -O android/app/src/main/jniLibs/arm64-v8a/libtor.so
chmod a+x android/app/src/main/jniLibs/arm64-v8a/libtor.so
mkdir -p android/app/src/main/jniLibs/armeabi-v7a
wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.8.9-android-arm7 -O android/app/src/main/jniLibs/armeabi-v7a/libtor.so
wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.4.9-arm_pie -O android/app/src/main/jniLibs/armeabi-v7a/libtor.so
chmod a+x android/app/src/main/jniLibs/armeabi-v7a/libtor.so

View File

@ -1,5 +0,0 @@
#!/bin/bash
# A basic script to redirect https://build.openprivacy.ca/cwtch-nightly.html to the latest nightly.
# In the future we may want to make this page nicer...
echo "<html><head><title>Cwtch Nightly</title><meta http-equiv=\"refresh\" content=\"0;URL='https://build.openprivacy.ca/files/$1'\" /> s</head></html>" > cwtch-nightly.html

View File

@ -1,20 +0,0 @@
var fs = require("fs");
var reporter = require('cucumber-html-reporter');
const reportRootDir = 'integration_test/gherkin/reports/'
const jsonReportPath = `${reportRootDir}json_report.json`;
const htmlReportPath = `${reportRootDir}cucumber_report.html`;
const reportFile = fs.readFileSync(`${reportRootDir}integration_response_data.json`);
//const jsonReport = JSON.parse(JSON.parse(reportFile).gherkin_reports)[0];
const jsonReport = JSON.parse(reportFile);
fs.writeFileSync(jsonReportPath, JSON.stringify(jsonReport));
var options = {
theme: 'bootstrap',
jsonFile: jsonReportPath,
output: htmlReportPath,
reportSuiteAsScenarios: true,
launchReport: false,
};
reporter.generate(options);

View File

@ -1,60 +0,0 @@
## Environments
Located in the `integration_test/env` folder and managed by the hooks in `integration_test/hooks/env.dart`. Specify the environment you want a feature to run in by tagging it.
* `[no tag] (env/default)`: default environment to load if none is specified
* `@env:aliceandbob1 (env/aliceandbob1)`: no-password Alice, Bob, and Carol profiles. Alice and Bob have already added each other, Carol has no contacts
* `@env:persist (env/persist)`: changes made to this profile persist between features and scenarios (but NOT between runs)
* `@env:clean`: runs the feature with no profile existing yet on disk
## Tests
[ ] 1. general
[X] splash screen + clean load
[X] setting save+load (TODO: dropdowns)
[~] tor status+reset
[~] shutdown cwtch
[ ] 2. global settings (verify functionality)
[_] language # blocked by dropdown
[_] theme+color theme # blocked by dropdown
[ ] column mode -> background? so all tests check both modes?
[X] block unknown
[X] streamer mode
[ ] 3. experiments (
[ ] group chat -> needs many
[ ] server hosting -> also many
[ ] file sharing -> a couple
[ ] image previews
[ ] clickable links (how much to test?)
[ ] 4. profile mgmt
[X] create+delete
[X] default+password load
[X] name change
[ ] password change
[ ] known server mgmt
[ ] 5. p2p chat
[ ] add, remove, block, archive
[ ] invite accept+reject
[X] send+receive
[ ] acks
[ ] try to send a long message
[ ] malformed messages, replies
[ ] overlays (invite, file/image)
[ ] send
[ ] receive
[ ] functionality
[ ] 6. p2p settings
[ ] name saving + transmission
[ ] block (ui indicators, functionality) inc in groups
[ ] history save+load
[ ] 7. groupchat
[ ] add, leave, archive
[ ] send+receive inc acks
[ ] try to send a long message
[ ] malformed messages, replies
[ ] overlays (invite, file/image) inc from non-contacts
[ ] send
[ ] receive
[ ] functionality
[ ] 8. group settings
[ ] display name

View File

@ -0,0 +1,53 @@
// This is a basic Flutter integration test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:cwtch/main_test.dart' as app;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
_testMain();
}
void _testMain() {
testWidgets('Blocked message rejection test', (WidgetTester tester) async {
final String testerProfile = "mr roboto";
final String blockedProfile = "rudey";
// start the app and render a few frames
app.main();
await tester.pump(); await tester.pump(); await tester.pump();
//await tester.pumpAndSettle();
for (var i = 0; i < 30; i++) {
print("$i pump");
await tester.pump();
}
// log in to a profile with a blocked contact
await tester.tap(find.text(testerProfile));
await tester.pump(); await tester.pump(); await tester.pump();
expect(find.byIcon(Icons.block), findsOneWidget);
// use the debug control to inject a message from the contact
await tester.tap(find.byIcon(Icons.bug_report));
await tester.pump(); await tester.pump(); await tester.pump();
// screenshot test
print(Directory.current);
//Directory.current = "/home/erinn/AndroidStudioProjects/flwtch/integration_test";
await expectLater(find.byKey(Key('app')), matchesGoldenFile('blockedcontact.png'));
// any active message badges?
expect(find.text('1'), findsNothing);
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1 +0,0 @@
_âeK%?Š!ţ~Lö9<C3B6>u×ÍlýQQż¦U•rMQCN5<4E>T-Ó/[<ń<ěn@KgŚă-ŕóŕČŃÓWÇ^l$řIC]»ÎI× ů@z¤m•Şb ŠNgířż?ő:†IşäD!ă±6ć°%čě…b

View File

@ -1 +0,0 @@
¢‰qö3‰ ÉÌ¥êÒŽB7 Å¢(ÊvQBöÞɱ<C389>øŒœ¾F±zŠ\\UƒÈG[Ü/ £Ñ?uš¼\;]y”HþG|þÛ,Þ3xÛÞeE0 !¬ÄSÍž<nÐÃòÐÉ®M~ üw “ÀëQ@6ǸËÖo£ÉüØ…ÕöÀiò

View File

@ -1 +0,0 @@
;KĄĂ”ČÓŠť\|ç<ÂŐÉ^1iRüÁw°ôFŔQĄ'¢©©z{P4ĂP(ä"5͸Qpr7˝`ŇK^uý¸ČÖ;©1&Ĺ,vŞ K/YößžŹmĄâ}±3]/§v"&ĽiѸ!3Wîyëjuvą¶D+w_'

Some files were not shown because too many files have changed in this diff Show More