Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| 29d0edda30 |
39
.github/workflows/android.yml
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
name: "Build APK"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
tags: ["*"]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-apk:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Lix GHA Installer Action
|
|
||||||
uses: samueldr/lix-gha-installer-action@v2026-02-22
|
|
||||||
with:
|
|
||||||
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
|
|
||||||
|
|
||||||
- name: Decode keystore
|
|
||||||
run: echo "$KEYSTORE_CONTENT" | base64 --decode > keystore.jks
|
|
||||||
env:
|
|
||||||
KEYSTORE_CONTENT: ${{ secrets.KEYSTORE_CONTENT }}
|
|
||||||
|
|
||||||
- name: Build app
|
|
||||||
run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build && flutter build apk --release"
|
|
||||||
env:
|
|
||||||
KEYSTORE_PATH: ../../keystore.jks
|
|
||||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Upload installer artifact
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: APK
|
|
||||||
path: build/app/outputs/flutter-apk/app-release.apk
|
|
||||||
37
.github/workflows/flatpak.yml
vendored
|
|
@ -1,37 +0,0 @@
|
||||||
name: "Build Flatpaks"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
tags: ["*"]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-flatpak:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- arch: x86_64
|
|
||||||
runner: ubuntu-latest
|
|
||||||
- arch: aarch64
|
|
||||||
runner: ubuntu-24.04-arm
|
|
||||||
runs-on: ${{ matrix.runner }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
|
|
||||||
- name: Lix GHA Installer Action
|
|
||||||
uses: samueldr/lix-gha-installer-action@v2026-02-22
|
|
||||||
with:
|
|
||||||
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
|
|
||||||
|
|
||||||
- name: Build app
|
|
||||||
run: nix build .#flatpak
|
|
||||||
|
|
||||||
- name: Upload installer artifact
|
|
||||||
uses: actions/upload-artifact@v6
|
|
||||||
with:
|
|
||||||
name: flatpak-${{ matrix.arch }}
|
|
||||||
path: result/nexus.federated.Nexus.flatpak
|
|
||||||
61
.github/workflows/windows.yml
vendored
|
|
@ -1,57 +1,46 @@
|
||||||
name: "Build EXE"
|
name: "Build Windows Version"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
tags: ["*"]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-exe:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: "windows-latest"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: "Checkout repository"
|
||||||
uses: actions/checkout@v6
|
uses: "actions/checkout@v4"
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Set up Flutter
|
- name: "Set up Flutter"
|
||||||
uses: subosito/flutter-action@v2
|
uses: "subosito/flutter-action@v2"
|
||||||
with:
|
|
||||||
flutter-version: 3.41.5
|
|
||||||
|
|
||||||
- name: Set up Go
|
- name: "Set up Rust"
|
||||||
uses: actions/setup-go@v6
|
uses: "dtolnay/rust-toolchain@stable"
|
||||||
with:
|
with:
|
||||||
go-version-file: gomuks/go.mod
|
targets: "x86_64-pc-windows-msvc"
|
||||||
|
|
||||||
- name: Go build
|
- name: "Install Flutter dependencies"
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
|
- name: "Run build_runner & build Windows EXE"
|
||||||
run: |
|
run: |
|
||||||
cd gomuks/pkg/ffi
|
flutter pub run build_runner build --delete-conflicting-outputs
|
||||||
go build -tags goolm -o ../../../libgomuks.dll -buildmode=c-shared
|
|
||||||
|
|
||||||
- name: Build with Flutter
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
dart scripts/generate.dart
|
|
||||||
flutter pub run build_runner build
|
|
||||||
flutter build windows --release
|
flutter build windows --release
|
||||||
|
|
||||||
- name: Upload exe zip
|
- name: "Upload exe zip"
|
||||||
uses: actions/upload-artifact@v6
|
uses: "actions/upload-artifact@v4"
|
||||||
with:
|
with:
|
||||||
name: windows-portable
|
name: "windows-portable"
|
||||||
path: build/windows/x64/runner/Release/
|
path: "build/windows/x64/runner/Release/"
|
||||||
|
|
||||||
- name: Install Inno Setup
|
- name: "Install Inno Setup"
|
||||||
run: choco install innosetup -y
|
run: choco install innosetup -y
|
||||||
|
|
||||||
- name: Build Inno Setup installer
|
- name: "Build Inno Setup installer"
|
||||||
run: iscc windows/installer.iss
|
run: iscc windows/installer.iss
|
||||||
|
|
||||||
- name: Upload installer artifact
|
- name: "Upload installer artifact"
|
||||||
uses: actions/upload-artifact@v6
|
uses: "actions/upload-artifact@v4"
|
||||||
with:
|
with:
|
||||||
name: windows-installer
|
name: "windows-installer"
|
||||||
path: windows/dist/Nexus-Setup.exe
|
path: "windows/dist/Nexus-Setup.exe"
|
||||||
|
|
|
||||||
6
.gitignore
vendored
|
|
@ -36,9 +36,7 @@ key.properties
|
||||||
# Generated Files
|
# Generated Files
|
||||||
*.g.dart
|
*.g.dart
|
||||||
*.freezed.dart
|
*.freezed.dart
|
||||||
|
src/
|
||||||
|
|
||||||
# Devel Password
|
# Devel Password
|
||||||
password.txt
|
password.txt
|
||||||
|
|
||||||
# Nix
|
|
||||||
/result
|
|
||||||
4
.gitmodules
vendored
|
|
@ -1,4 +0,0 @@
|
||||||
[submodule "gomuks"]
|
|
||||||
path = gomuks
|
|
||||||
url = https://github.com/gomuks/gomuks
|
|
||||||
branch = main
|
|
||||||
12
.metadata
|
|
@ -4,7 +4,7 @@
|
||||||
# This file should be version controlled and should not be manually edited.
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
version:
|
version:
|
||||||
revision: "nixpkgs000000000000000000000000000000000"
|
revision: "67323de285b00232883f53b84095eb72be97d35c"
|
||||||
channel: "stable"
|
channel: "stable"
|
||||||
|
|
||||||
project_type: app
|
project_type: app
|
||||||
|
|
@ -13,11 +13,11 @@ project_type: app
|
||||||
migration:
|
migration:
|
||||||
platforms:
|
platforms:
|
||||||
- platform: root
|
- platform: root
|
||||||
create_revision: nixpkgs000000000000000000000000000000000
|
create_revision: 67323de285b00232883f53b84095eb72be97d35c
|
||||||
base_revision: nixpkgs000000000000000000000000000000000
|
base_revision: 67323de285b00232883f53b84095eb72be97d35c
|
||||||
- platform: windows
|
- platform: macos
|
||||||
create_revision: nixpkgs000000000000000000000000000000000
|
create_revision: 67323de285b00232883f53b84095eb72be97d35c
|
||||||
base_revision: nixpkgs000000000000000000000000000000000
|
base_revision: 67323de285b00232883f53b84095eb72be97d35c
|
||||||
|
|
||||||
# User provided section
|
# User provided section
|
||||||
|
|
||||||
|
|
|
||||||
7
.vscode/settings.json
vendored
|
|
@ -2,11 +2,8 @@
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"Appbar",
|
"Appbar",
|
||||||
"Displayname",
|
"Displayname",
|
||||||
"fluttertagger",
|
|
||||||
"Gomuks",
|
|
||||||
"Homeserver",
|
"Homeserver",
|
||||||
"localpart",
|
"prefs",
|
||||||
"muks",
|
"vodozemac"
|
||||||
"prefs"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
120
README.md
|
|
@ -1,11 +1,11 @@
|
||||||
# Nexus Client
|
# Nexus Client
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> Nexus Client is still in development, and doesn't support everything needed for daily use.
|
> Nexus Client is still heavily in development, and is not ready for use!
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
A simple and user-friendly Matrix client made with Flutter and the Matrix Dart SDK.
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
@ -15,14 +15,15 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
||||||
|
|
||||||
## Progress
|
## Progress
|
||||||
|
|
||||||
- [x] New logo
|
- [ ] New logo
|
||||||
- [x] Move from the Dart SDK to the Gomuks Backend with Dart bindings: https://git.federated.nexus/Nexus/nexus/pulls/2
|
- [ ] Make context menus appear as bottom sheets on mobile
|
||||||
- [ ] Allow using remote Gomuks over websocket
|
- [x] Move from the Dart SDK to the Gomuks SDK with Dart bindings: https://git.federated.nexus/Henry-Hiles/nexus/pulls/2
|
||||||
|
- [ ] Allow using remote gomuks over websocket
|
||||||
- [ ] Platform Support
|
- [ ] Platform Support
|
||||||
- [x] Linux
|
- [x] Linux
|
||||||
- [ ] Windows (WIP)
|
- [x] Windows
|
||||||
- [ ] MacOS
|
- [ ] MacOS
|
||||||
- [x] Android
|
- [ ] Android
|
||||||
- [ ] iOS
|
- [ ] iOS
|
||||||
- [ ] Web (may not be possible)
|
- [ ] Web (may not be possible)
|
||||||
- [x] Login
|
- [x] Login
|
||||||
|
|
@ -36,7 +37,7 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
||||||
- [ ] Searching
|
- [ ] Searching
|
||||||
- [ ] Creating (Rooms, Spaces, and DMs)
|
- [ ] Creating (Rooms, Spaces, and DMs)
|
||||||
- [x] Joining
|
- [x] Joining
|
||||||
- [x] Parse vias
|
- [ ] Parse vias
|
||||||
- [x] Using a text/uri/link
|
- [x] Using a text/uri/link
|
||||||
- [x] Plain text
|
- [x] Plain text
|
||||||
- [x] `matrix:` Uri
|
- [x] `matrix:` Uri
|
||||||
|
|
@ -53,7 +54,6 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
||||||
- [x] HTML/Markdown
|
- [x] HTML/Markdown
|
||||||
- [x] Replies
|
- [x] Replies
|
||||||
- [x] Choose ping on/off
|
- [x] Choose ping on/off
|
||||||
- [ ] Per message profiles
|
|
||||||
- [ ] Attachments
|
- [ ] Attachments
|
||||||
- [ ] Commands with [MSC4391](https://github.com/matrix-org/matrix-spec-proposals/pull/4391)
|
- [ ] Commands with [MSC4391](https://github.com/matrix-org/matrix-spec-proposals/pull/4391)
|
||||||
- [x] Mentions
|
- [x] Mentions
|
||||||
|
|
@ -62,11 +62,9 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
||||||
- [ ] Inline emoji picker (Putting this here since it'll be implemented the same way as mentions)
|
- [ ] Inline emoji picker (Putting this here since it'll be implemented the same way as mentions)
|
||||||
- [ ] Custom emojis/stickers
|
- [ ] Custom emojis/stickers
|
||||||
- [ ] GIFs using Gomuks' GIF proxies
|
- [ ] GIFs using Gomuks' GIF proxies
|
||||||
- [x] Receiving
|
- [x] Recieving
|
||||||
- [x] Plain text
|
- [x] Plain text
|
||||||
- [x] Per message profiles
|
|
||||||
- [x] HTML
|
- [x] HTML
|
||||||
- [x] URL Previews
|
|
||||||
- [x] Replies
|
- [x] Replies
|
||||||
- [x] Viewing
|
- [x] Viewing
|
||||||
- [ ] Jump to original message
|
- [ ] Jump to original message
|
||||||
|
|
@ -79,34 +77,28 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
||||||
- [x] Blurhashing
|
- [x] Blurhashing
|
||||||
- [ ] Downloading attachments
|
- [ ] Downloading attachments
|
||||||
- [x] Opening attachments in their own view
|
- [x] Opening attachments in their own view
|
||||||
- [ ] Polls
|
- [ ] Polls: Waiting on https://github.com/SwanFlutter/dynamic_polls/issues/1
|
||||||
- [x] Mentions
|
- [x] Mentions
|
||||||
- [x] Users
|
- [x] Users
|
||||||
- [x] Clickable
|
|
||||||
- [x] Rooms
|
- [x] Rooms
|
||||||
- [x] Clickable
|
- [ ] Plain text (not sure if I want to add this or not, I probably won't unless there's interest)
|
||||||
- [x] Matrix URIs
|
- [x] Matrix URIs
|
||||||
- [x] Matrix.to links
|
- [x] Matrix.to links
|
||||||
- [x] Events
|
- [ ] Do some fancy fetching to get nice names
|
||||||
- [ ] Render more nicely
|
- [ ] Make clickable
|
||||||
- [ ] Clickable
|
|
||||||
- [x] Custom emojis/stickers
|
- [x] Custom emojis/stickers
|
||||||
- [x] History loading
|
- [x] History loading
|
||||||
- [x] Backwards
|
- [x] Backwards
|
||||||
- [ ] Forwards
|
- [ ] Forwards
|
||||||
- [x] Editing
|
- [x] Editing
|
||||||
- [x] Deleting
|
- [x] Deleting
|
||||||
- [x] Reactions
|
- [ ] Reactions: Waiting on https://github.com/flyerhq/flutter_chat_ui/pull/838 or me doing a custom impl
|
||||||
- [ ] Pins
|
- [ ] Pins
|
||||||
- [ ] Displaying
|
- [ ] Displaying
|
||||||
- [ ] Creating
|
- [ ] Creating
|
||||||
- [ ] Threads
|
- [ ] Threads
|
||||||
- [x] Profile popouts
|
- [ ] Profile popouts
|
||||||
- [x] Working actions
|
- [ ] Copy link to [room, space]
|
||||||
- [x] Copy link to:
|
|
||||||
- [x] Room
|
|
||||||
- [x] Space
|
|
||||||
- [x] Message
|
|
||||||
- [ ] Reporting
|
- [ ] Reporting
|
||||||
- [x] Events
|
- [x] Events
|
||||||
- [ ] Rooms
|
- [ ] Rooms
|
||||||
|
|
@ -114,16 +106,14 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
||||||
- [ ] Group calls using [MSC4195](https://github.com/matrix-org/matrix-spec-proposals/pull/4195)
|
- [ ] Group calls using [MSC4195](https://github.com/matrix-org/matrix-spec-proposals/pull/4195)
|
||||||
- [ ] Invites
|
- [ ] Invites
|
||||||
- [ ] Settings
|
- [ ] Settings
|
||||||
- [ ] Matrix: URIs vs Matrix.to links
|
|
||||||
- [ ] Light/Dark mode
|
- [ ] Light/Dark mode
|
||||||
- [ ] SSD or CSD
|
- [ ] SSD or CSD
|
||||||
- [ ] Align your message bubbles to left or right
|
|
||||||
- [ ] Show media by default
|
- [ ] Show media by default
|
||||||
- [ ] Dynamic Theming
|
- [ ] Dynamic Theming
|
||||||
- [ ] Devices
|
- [ ] Devices
|
||||||
- [ ] Viewing devices
|
- [ ] Viewing devices
|
||||||
- [ ] Verifying devices
|
- [ ] Verifying devices
|
||||||
- [ ] URL preview: Server / Sending Client (Beeper spec) / None
|
- [ ] URL preview: Server / Client / None
|
||||||
- [ ] Account changes
|
- [ ] Account changes
|
||||||
- [ ] Display name
|
- [ ] Display name
|
||||||
- [ ] Profile picture
|
- [ ] Profile picture
|
||||||
|
|
@ -133,64 +123,25 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
||||||
- [ ] About
|
- [ ] About
|
||||||
- [x] Log Out
|
- [x] Log Out
|
||||||
|
|
||||||
## Try it out
|
## Build Instructions
|
||||||
|
|
||||||
If you want to try out Nexus, grab one of the following artifacts from CI:
|
First, clone and open the repo:
|
||||||
|
|
||||||
- [Android APK](https://nightly.link/Henry-Hiles/nexus/workflows/android/main/APK.zip)
|
```sh
|
||||||
- Windows
|
git clone https://git.federated.nexus/Henry-Hiles/nexus
|
||||||
- [Portable Build](https://nightly.link/Henry-Hiles/nexus/workflows/windows/main/windows-portable.zip)
|
cd nexus
|
||||||
- [Installer](https://nightly.link/Henry-Hiles/nexus/workflows/windows/main/windows-installer.zip)
|
```
|
||||||
- Flatpak
|
|
||||||
- [AArch64/Arm64](https://nightly.link/Henry-Hiles/nexus/workflows/flatpak/main/flatpak-aarch64.zip)
|
|
||||||
- [x86_64/AMD64](https://nightly.link/Henry-Hiles/nexus/workflows/flatpak/main/flatpak-x86_64.zip)
|
|
||||||
|
|
||||||
Or, try the Nix package: `nix run git+https://git.federated.nexus/Nexus/nexus`
|
|
||||||
|
|
||||||
## Build it yourself
|
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
#### Linux
|
#### Linux
|
||||||
|
|
||||||
- With Nix: Either use direnv and `direnv allow`, or `nix flake develop`
|
- With Nix: Either use direnv, or `nix flake develop`
|
||||||
- Without Nix: Install Flutter, Go, Git, Libclang, and Glibc. Do not use any Snap packages, they cause various compilation issues.
|
- Without Nix: Install Flutter, Go, Olm, Git, Clang, and GLibc.
|
||||||
|
|
||||||
#### Windows
|
#### Windows / MacOS
|
||||||
|
|
||||||
You will need:
|
I don't really know. You will need Flutter, Git, Olm, Go, and Visual Studio tools, and otherwise I guess just keep installing stuff until there aren't any errors. I will look into this sometimeTM.
|
||||||
|
|
||||||
- Flutter
|
|
||||||
- Android SDK + NDK
|
|
||||||
- Git
|
|
||||||
- Go
|
|
||||||
- Visual Studio 2022 (Desktop development with C++)
|
|
||||||
- [MSYS2/MinGW-w64 GCC](https://www.msys2.org/) (for CGO)
|
|
||||||
- [LLVM/Clang + libclang](https://clang.llvm.org/get_started.html) (for `ffigen`)
|
|
||||||
|
|
||||||
On Windows, make sure these are available in your shell `PATH`:
|
|
||||||
|
|
||||||
- `C:\msys64\ucrt64\bin` (or your MinGW bin path containing `x86_64-w64-mingw32-gcc.exe`)
|
|
||||||
- `C:\Program Files\LLVM\bin` (contains `clang.exe` and `libclang.dll`)
|
|
||||||
|
|
||||||
For `dart scripts/generate.dart`, you may also need:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$env:CPATH = "C:\msys64\ucrt64\include"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### MacOS
|
|
||||||
|
|
||||||
Similar prerequisites apply (Flutter, Git, Go, C toolchain, LLVM/libclang), but exact setup has not been fully documented yet.
|
|
||||||
|
|
||||||
### Clone repo
|
|
||||||
|
|
||||||
First, clone and open the repo:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recurse-submodules https://git.federated.nexus/Nexus/nexus
|
|
||||||
cd nexus
|
|
||||||
```
|
|
||||||
|
|
||||||
### Set up Flutter
|
### Set up Flutter
|
||||||
|
|
||||||
|
|
@ -200,10 +151,16 @@ Get dependencies:
|
||||||
flutter pub get
|
flutter pub get
|
||||||
```
|
```
|
||||||
|
|
||||||
Generate Gomuks bindings:
|
Get dependencies:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
dart scripts/generate.dart
|
flutter pub get
|
||||||
|
```
|
||||||
|
|
||||||
|
Clone Gomuks and generate bindings:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
scripts/generate.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Build generated files, and watch for new changes:
|
Build generated files, and watch for new changes:
|
||||||
|
|
@ -221,8 +178,3 @@ flutter run
|
||||||
## Community
|
## Community
|
||||||
|
|
||||||
Join the [Nexus Client Matrix Room](https://matrix.to/#/#nexus:federated.nexus) for questions or help with developing or using Nexus Client.
|
Join the [Nexus Client Matrix Room](https://matrix.to/#/#nexus:federated.nexus) for questions or help with developing or using Nexus Client.
|
||||||
|
|
||||||
# Credits
|
|
||||||
|
|
||||||
Thank you Hylke Bons (https://planetpeanut.studio) for making the amazing icon for Nexus!
|
|
||||||
Thank you Tulir Asokan for making [Gomuks](https://github.com/gomuks/gomuks), and helping us integrate it into Nexus!
|
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,6 @@ android {
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
// do we want to update.. eventually?
|
|
||||||
jvmTarget = "17"
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "nexus.federated.Nexus"
|
applicationId = "nexus.federated.Nexus"
|
||||||
minSdk = 29
|
minSdk = 29
|
||||||
|
|
@ -55,8 +50,7 @@ android {
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
keyAlias "key"
|
keyAlias "key"
|
||||||
def storePath = keystoreProperties['path'] ?: System.getenv("KEYSTORE_PATH")
|
storeFile keystoreProperties['path'] ? file(keystoreProperties['path']) : file(System.getenv("KEYSTORE_PATH"))
|
||||||
storeFile storePath ? file(storePath) : null
|
|
||||||
keyPassword keystoreProperties['password'] ?: System.getenv("KEYSTORE_PASSWORD")
|
keyPassword keystoreProperties['password'] ?: System.getenv("KEYSTORE_PASSWORD")
|
||||||
storePassword keystoreProperties['password'] ?: System.getenv("KEYSTORE_PASSWORD")
|
storePassword keystoreProperties['password'] ?: System.getenv("KEYSTORE_PASSWORD")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
android:label="Nexus"
|
android:label="Nexus"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher"
|
android:roundIcon="@mipmap/nexus_round"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:fullBackupContent="false">
|
android:fullBackupContent="false">
|
||||||
<activity
|
<activity
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
|
@ -1,14 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground>
|
<foreground>
|
||||||
<inset
|
<inset
|
||||||
android:drawable="@drawable/ic_launcher_foreground"
|
android:drawable="@drawable/ic_launcher_foreground"
|
||||||
android:inset="16%" />
|
android:inset="16%" />
|
||||||
</foreground>
|
</foreground>
|
||||||
<monochrome>
|
|
||||||
<inset
|
|
||||||
android:drawable="@drawable/ic_launcher_monochrome"
|
|
||||||
android:inset="16%" />
|
|
||||||
</monochrome>
|
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
|
@ -1,257 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
width="512"
|
|
||||||
height="512"
|
|
||||||
viewBox="0 0 512 512"
|
|
||||||
fill="none"
|
|
||||||
version="1.1"
|
|
||||||
id="svg11"
|
|
||||||
sodipodi:docname="background.svg"
|
|
||||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
|
||||||
inkscape:export-filename="background.png"
|
|
||||||
inkscape:export-xdpi="96"
|
|
||||||
inkscape:export-ydpi="96"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview11"
|
|
||||||
pagecolor="#505050"
|
|
||||||
bordercolor="#eeeeee"
|
|
||||||
borderopacity="1"
|
|
||||||
inkscape:showpageshadow="0"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#505050"
|
|
||||||
inkscape:zoom="0.69191503"
|
|
||||||
inkscape:cx="-71.540576"
|
|
||||||
inkscape:cy="281.10388"
|
|
||||||
inkscape:window-width="2544"
|
|
||||||
inkscape:window-height="1363"
|
|
||||||
inkscape:window-x="35"
|
|
||||||
inkscape:window-y="32"
|
|
||||||
inkscape:window-maximized="0"
|
|
||||||
inkscape:current-layer="svg11" />
|
|
||||||
<defs
|
|
||||||
id="defs11">
|
|
||||||
<radialGradient
|
|
||||||
id="paint0_radial_4033_8"
|
|
||||||
cx="0"
|
|
||||||
cy="0"
|
|
||||||
r="1"
|
|
||||||
gradientTransform="matrix(3.5,24.5214,-15.8099,2.26053,80,52.9904)"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
stop-color="#72AAEE"
|
|
||||||
id="stop10" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#3584E4"
|
|
||||||
id="stop11" />
|
|
||||||
</radialGradient>
|
|
||||||
<mask
|
|
||||||
id="mask0_4033_8"
|
|
||||||
maskUnits="userSpaceOnUse"
|
|
||||||
x="56"
|
|
||||||
y="46"
|
|
||||||
width="21"
|
|
||||||
height="36">
|
|
||||||
<path
|
|
||||||
d="m 76.4223,63.1501 c 0.3482,0.5123 0.3457,1.1859 -0.0063,1.6956 L 65.0175,81.3524 C 64.7375,81.7579 64.2761,82 63.7832,82 h -5.9804 c -1.1981,0 -1.9127,-1.3352 -1.2481,-2.332 l 9.8906,-14.8359 c 0.3359,-0.5039 0.3359,-1.1603 0,-1.6641 L 57.0729,49.1094 C 56.1869,47.7803 57.1396,46 58.737,46 h 5.2334 c 0.4967,0 0.9613,0.2459 1.2405,0.6568 z"
|
|
||||||
fill="#2779dd"
|
|
||||||
id="path9" />
|
|
||||||
</mask>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath11">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect12"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath12">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect13"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath13">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect14"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath14">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect15"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath15">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect16"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath16">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect17"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<radialGradient
|
|
||||||
id="paint0_radial_4033_8-3"
|
|
||||||
cx="0"
|
|
||||||
cy="0"
|
|
||||||
r="1"
|
|
||||||
gradientTransform="matrix(3.5,24.5214,-15.8099,2.26053,174.26633,65.9904)"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
stop-color="#72AAEE"
|
|
||||||
id="stop10-6" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#3584E4"
|
|
||||||
id="stop11-7" />
|
|
||||||
</radialGradient>
|
|
||||||
<radialGradient
|
|
||||||
id="paint0_radial_4033_8-35"
|
|
||||||
cx="0"
|
|
||||||
cy="0"
|
|
||||||
r="1"
|
|
||||||
gradientTransform="matrix(3.5,24.5214,-15.8099,2.26053,80,52.9904)"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
stop-color="#72AAEE"
|
|
||||||
id="stop10-62" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#3584E4"
|
|
||||||
id="stop11-9" />
|
|
||||||
</radialGradient>
|
|
||||||
<mask
|
|
||||||
id="mask0_4033_8-1"
|
|
||||||
maskUnits="userSpaceOnUse"
|
|
||||||
x="56"
|
|
||||||
y="46"
|
|
||||||
width="21"
|
|
||||||
height="36">
|
|
||||||
<path
|
|
||||||
d="m 76.4223,63.1501 c 0.3482,0.5123 0.3457,1.1859 -0.0063,1.6956 L 65.0175,81.3524 C 64.7375,81.7579 64.2761,82 63.7832,82 h -5.9804 c -1.1981,0 -1.9127,-1.3352 -1.2481,-2.332 l 9.8906,-14.8359 c 0.3359,-0.5039 0.3359,-1.1603 0,-1.6641 L 57.0729,49.1094 C 56.1869,47.7803 57.1396,46 58.737,46 h 5.2334 c 0.4967,0 0.9613,0.2459 1.2405,0.6568 z"
|
|
||||||
fill="#2779dd"
|
|
||||||
id="path9-2" />
|
|
||||||
</mask>
|
|
||||||
<radialGradient
|
|
||||||
id="paint0_radial_4033_8-9"
|
|
||||||
cx="0"
|
|
||||||
cy="0"
|
|
||||||
r="1"
|
|
||||||
gradientTransform="matrix(14,98.0856,-63.2396,9.04212,320,211.9616)"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
stop-color="#72AAEE"
|
|
||||||
id="stop10-3" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#3584E4"
|
|
||||||
id="stop11-6" />
|
|
||||||
</radialGradient>
|
|
||||||
</defs>
|
|
||||||
<rect
|
|
||||||
width="512"
|
|
||||||
height="512"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect1"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
style="stroke-width:4" />
|
|
||||||
<rect
|
|
||||||
x="-1.5384758"
|
|
||||||
y="-122.66472"
|
|
||||||
width="35.5569"
|
|
||||||
height="291.86301"
|
|
||||||
transform="matrix(3.4641016,2,-2,3.4641016,0,0)"
|
|
||||||
fill="#9141ac"
|
|
||||||
id="rect2"
|
|
||||||
clip-path="url(#clipPath16)" />
|
|
||||||
<rect
|
|
||||||
x="34.018467"
|
|
||||||
y="-122.66468"
|
|
||||||
width="26.6677"
|
|
||||||
height="291.86301"
|
|
||||||
transform="matrix(3.4641016,2,-2,3.4641016,0,0)"
|
|
||||||
fill="#62a0ea"
|
|
||||||
id="rect3"
|
|
||||||
clip-path="url(#clipPath15)" />
|
|
||||||
<rect
|
|
||||||
x="60.68605"
|
|
||||||
y="-122.66468"
|
|
||||||
width="26.6677"
|
|
||||||
height="291.86301"
|
|
||||||
transform="matrix(3.4641016,2,-2,3.4641016,0,0)"
|
|
||||||
fill="#57e389"
|
|
||||||
id="rect4"
|
|
||||||
clip-path="url(#clipPath14)" />
|
|
||||||
<rect
|
|
||||||
x="87.353859"
|
|
||||||
y="-122.66468"
|
|
||||||
width="26.6677"
|
|
||||||
height="291.86301"
|
|
||||||
transform="matrix(3.4641016,2,-2,3.4641016,0,0)"
|
|
||||||
fill="#f5c211"
|
|
||||||
id="rect5"
|
|
||||||
clip-path="url(#clipPath13)" />
|
|
||||||
<rect
|
|
||||||
x="114.02161"
|
|
||||||
y="-122.66477"
|
|
||||||
width="26.6677"
|
|
||||||
height="291.86301"
|
|
||||||
transform="matrix(3.4641016,2,-2,3.4641016,0,0)"
|
|
||||||
fill="#ff7800"
|
|
||||||
id="rect6"
|
|
||||||
clip-path="url(#clipPath12)" />
|
|
||||||
<rect
|
|
||||||
x="140.68942"
|
|
||||||
y="-122.66477"
|
|
||||||
width="35.5569"
|
|
||||||
height="291.86301"
|
|
||||||
transform="matrix(3.4641016,2,-2,3.4641016,0,0)"
|
|
||||||
fill="#ed333b"
|
|
||||||
id="rect7"
|
|
||||||
clip-path="url(#clipPath11)" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 20 KiB |
|
|
@ -1,19 +1,20 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
<svg
|
<svg
|
||||||
width="512"
|
width="100mm"
|
||||||
height="512"
|
height="100mm"
|
||||||
viewBox="0 0 512 512"
|
viewBox="0 0 100 100"
|
||||||
fill="none"
|
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg11"
|
id="svg1"
|
||||||
sodipodi:docname="foreground.svg"
|
xml:space="preserve"
|
||||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||||
|
sodipodi:docname="nexus.svg"
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
<sodipodi:namedview
|
id="namedview1"
|
||||||
id="namedview11"
|
|
||||||
pagecolor="#505050"
|
pagecolor="#505050"
|
||||||
bordercolor="#eeeeee"
|
bordercolor="#eeeeee"
|
||||||
borderopacity="1"
|
borderopacity="1"
|
||||||
|
|
@ -21,137 +22,105 @@
|
||||||
inkscape:pageopacity="0"
|
inkscape:pageopacity="0"
|
||||||
inkscape:pagecheckerboard="0"
|
inkscape:pagecheckerboard="0"
|
||||||
inkscape:deskcolor="#505050"
|
inkscape:deskcolor="#505050"
|
||||||
inkscape:zoom="0.87695313"
|
inkscape:document-units="mm"
|
||||||
inkscape:cx="152.23163"
|
inkscape:zoom="1.0847363"
|
||||||
inkscape:cy="347.22494"
|
inkscape:cx="58.07863"
|
||||||
inkscape:window-width="2544"
|
inkscape:cy="214.3378"
|
||||||
inkscape:window-height="1363"
|
inkscape:window-width="1896"
|
||||||
|
inkscape:window-height="987"
|
||||||
inkscape:window-x="35"
|
inkscape:window-x="35"
|
||||||
inkscape:window-y="32"
|
inkscape:window-y="32"
|
||||||
inkscape:window-maximized="0"
|
inkscape:window-maximized="0"
|
||||||
inkscape:current-layer="svg11" />
|
inkscape:current-layer="layer1" /><defs
|
||||||
<path
|
id="defs1" /><g
|
||||||
d="m 256,92 c 90.5748,0 164,73.4252 164,164 0,90.5748 -73.4252,164 -164,164 -34.5828,0 -66.6592,-10.712 -93.1092,-28.9884 l -39.2072,8.7656 c -6.8668,1.5348 -12.9952,-4.594 -11.4608,-11.4608 l 8.7616,-39.2108 C 102.7104,322.6564 92,290.5808 92,256 92,165.4252 165.4252,92 256,92 Z"
|
inkscape:label="Layer 1"
|
||||||
fill="#ffffff"
|
inkscape:groupmode="layer"
|
||||||
id="path7"
|
id="layer1"><path
|
||||||
style="stroke-width:4" />
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
<path
|
d="M 19.377906,68.106953 80.937684,32.43771"
|
||||||
d="m 304.9188,251.4672 c 1.8572,2.732 1.844,6.3248 -0.0332,9.0432 L 260.6664,324.546 C 259.1728,326.7088 256.712,328 254.0836,328 H 234.948 c -6.3896,0 -10.2004,-7.1212 -6.6564,-12.4376 l 36.75,-55.1248 c 1.7916,-2.6872 1.7916,-6.188 0,-8.8752 l -36.75,-55.1248 C 224.7476,191.1212 228.5584,184 234.948,184 h 19.8748 c 2.6492,0 5.1268,1.3116 6.616,3.5028 z"
|
id="path10" /><path
|
||||||
fill="url(#paint0_radial_4033_8)"
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
id="path8"
|
d="m 19.044488,32.469148 61.61782,35.569625"
|
||||||
style="fill:url(#paint0_radial_4033_8);stroke-width:4" />
|
id="path9" /><path
|
||||||
<g
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
mask="url(#mask0_4033_8)"
|
d="M 50,85.574911 V 14.425087"
|
||||||
id="g9"
|
id="path8" /><circle
|
||||||
transform="scale(4)">
|
style="fill:none;stroke:#ffffff;stroke-width:7.11498;stroke-linecap:round;stroke-linejoin:round"
|
||||||
<rect
|
id="path1"
|
||||||
x="52"
|
cx="50"
|
||||||
y="46"
|
cy="50"
|
||||||
width="17"
|
r="35.574913" /><circle
|
||||||
height="4"
|
style="fill:#09bd05;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
fill="#2779dd"
|
id="path2"
|
||||||
id="rect9" />
|
cx="50"
|
||||||
</g>
|
cy="84.604881"
|
||||||
<defs
|
r="8.2508707" /><circle
|
||||||
id="defs11">
|
style="fill:#fe1e24;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
<radialGradient
|
id="circle2"
|
||||||
id="paint0_radial_4033_8"
|
cx="50"
|
||||||
cx="0"
|
cy="15.395123"
|
||||||
cy="0"
|
r="8.2508707" /><circle
|
||||||
r="1"
|
style="fill:#fe941d;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
gradientTransform="matrix(14,98.0856,-63.2396,9.04212,320,211.9616)"
|
id="circle3"
|
||||||
gradientUnits="userSpaceOnUse">
|
cx="-68.30127"
|
||||||
<stop
|
cy="52.906147"
|
||||||
stop-color="#72AAEE"
|
r="8.2508707"
|
||||||
id="stop10" />
|
transform="rotate(-120)" /><circle
|
||||||
<stop
|
style="fill:#001996;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
offset="1"
|
id="circle4"
|
||||||
stop-color="#3584E4"
|
cx="-68.30127"
|
||||||
id="stop11" />
|
cy="-16.30361"
|
||||||
</radialGradient>
|
r="8.2508707"
|
||||||
<mask
|
transform="rotate(-120)" /><circle
|
||||||
id="mask0_4033_8"
|
style="fill:#ffff04;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
maskUnits="userSpaceOnUse"
|
id="circle5"
|
||||||
x="56"
|
cx="-18.301271"
|
||||||
y="46"
|
cy="102.90615"
|
||||||
width="21"
|
r="8.2508707"
|
||||||
height="36">
|
transform="rotate(-60)" /><circle
|
||||||
<path
|
style="fill:#770287;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
d="m 76.4223,63.1501 c 0.3482,0.5123 0.3457,1.1859 -0.0063,1.6956 L 65.0175,81.3524 C 64.7375,81.7579 64.2761,82 63.7832,82 h -5.9804 c -1.1981,0 -1.9127,-1.3352 -1.2481,-2.332 l 9.8906,-14.8359 c 0.3359,-0.5039 0.3359,-1.1603 0,-1.6641 L 57.0729,49.1094 C 56.1869,47.7803 57.1396,46 58.737,46 h 5.2334 c 0.4967,0 0.9613,0.2459 1.2405,0.6568 z"
|
id="circle6"
|
||||||
fill="#2779dd"
|
cx="-18.301271"
|
||||||
id="path9" />
|
cy="33.696392"
|
||||||
</mask>
|
r="8.2508707"
|
||||||
<clipPath
|
transform="rotate(-60)" /><circle
|
||||||
clipPathUnits="userSpaceOnUse"
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:6.75;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
id="clipPath11">
|
id="path7"
|
||||||
<rect
|
cx="50"
|
||||||
width="128"
|
cy="50"
|
||||||
height="128"
|
r="9.7918472" /><g
|
||||||
fill="#ffffff"
|
inkscape:label="Layer 1"
|
||||||
id="rect12"
|
id="layer1-3"
|
||||||
x="0"
|
transform="matrix(0.08246781,0,0,0.08246781,38.828362,38.828362)"
|
||||||
y="0"
|
style="stroke:#ffffff"><text
|
||||||
transform="rotate(-30)" />
|
xml:space="preserve"
|
||||||
</clipPath>
|
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:96.3615px;line-height:0;font-family:'Noto Serif';-inkscape-font-specification:'Noto Serif, Heavy';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
<clipPath
|
x="-305.64749"
|
||||||
clipPathUnits="userSpaceOnUse"
|
y="194.14493"
|
||||||
id="clipPath12">
|
id="text2819"><tspan
|
||||||
<rect
|
sodipodi:role="line"
|
||||||
width="128"
|
id="tspan2817"
|
||||||
height="128"
|
style="stroke:#ffffff;stroke-width:0"
|
||||||
fill="#ffffff"
|
x="-305.64749"
|
||||||
id="rect13"
|
y="194.14493" /></text><circle
|
||||||
x="0"
|
style="fill:#354b5f;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
y="0"
|
id="path342"
|
||||||
transform="rotate(-30)" />
|
cx="135.46666"
|
||||||
</clipPath>
|
cy="135.46666"
|
||||||
<clipPath
|
r="135.46666" /><text
|
||||||
clipPathUnits="userSpaceOnUse"
|
xml:space="preserve"
|
||||||
id="clipPath13">
|
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:96.3615px;line-height:0;font-family:'Noto Serif';-inkscape-font-specification:'Noto Serif, Heavy';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
<rect
|
x="-305.64749"
|
||||||
width="128"
|
y="194.14493"
|
||||||
height="128"
|
id="text2819-3"><tspan
|
||||||
fill="#ffffff"
|
sodipodi:role="line"
|
||||||
id="rect14"
|
id="tspan2817-5"
|
||||||
x="0"
|
style="stroke:#ffffff;stroke-width:0"
|
||||||
y="0"
|
x="-305.64749"
|
||||||
transform="rotate(-30)" />
|
y="194.14493" /></text><g
|
||||||
</clipPath>
|
aria-label="❯"
|
||||||
<clipPath
|
id="text2827-6"
|
||||||
clipPathUnits="userSpaceOnUse"
|
style="font-size:132.452px;line-height:0;font-family:PowerlineSymbols;-inkscape-font-specification:'PowerlineSymbols, Normal';text-align:end;text-anchor:end;fill:#4e94e4;fill-opacity:1;stroke:#ffffff;stroke-width:0"><path
|
||||||
id="clipPath14">
|
d="M 95.096912,209.8167 143.88912,135.46666 95.096912,61.116629 h 32.818568 l 47.92093,74.350031 -47.92093,74.35004 z"
|
||||||
<rect
|
id="path2883-2"
|
||||||
width="128"
|
style="fill:#4e94e4;fill-opacity:1;stroke:#ffffff;stroke-width:0" /></g></g></g></svg>
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect15"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath15">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect16"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath16">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect17"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 6 KiB |
BIN
assets/icon.png
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 35 KiB |
448
assets/icon.svg
|
|
@ -1,22 +1,21 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
<svg
|
<svg
|
||||||
width="512"
|
width="100mm"
|
||||||
height="512"
|
height="100mm"
|
||||||
viewBox="0 0 512 512"
|
viewBox="0 0 100 100"
|
||||||
fill="none"
|
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg35"
|
id="svg1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||||
sodipodi:docname="icon.svg"
|
sodipodi:docname="icon.svg"
|
||||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
|
||||||
inkscape:export-filename="icon.png"
|
|
||||||
inkscape:export-xdpi="96"
|
|
||||||
inkscape:export-ydpi="96"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
<sodipodi:namedview
|
id="namedview1"
|
||||||
id="namedview35"
|
|
||||||
pagecolor="#505050"
|
pagecolor="#505050"
|
||||||
bordercolor="#eeeeee"
|
bordercolor="#eeeeee"
|
||||||
borderopacity="1"
|
borderopacity="1"
|
||||||
|
|
@ -24,311 +23,128 @@
|
||||||
inkscape:pageopacity="0"
|
inkscape:pageopacity="0"
|
||||||
inkscape:pagecheckerboard="0"
|
inkscape:pagecheckerboard="0"
|
||||||
inkscape:deskcolor="#505050"
|
inkscape:deskcolor="#505050"
|
||||||
inkscape:zoom="1.321682"
|
inkscape:document-units="mm"
|
||||||
inkscape:cx="69.608271"
|
inkscape:zoom="1.0847363"
|
||||||
inkscape:cy="120.67956"
|
inkscape:cx="57.61769"
|
||||||
inkscape:window-width="2544"
|
inkscape:cy="214.33781"
|
||||||
inkscape:window-height="1363"
|
inkscape:window-width="1896"
|
||||||
|
inkscape:window-height="963"
|
||||||
inkscape:window-x="35"
|
inkscape:window-x="35"
|
||||||
inkscape:window-y="32"
|
inkscape:window-y="32"
|
||||||
inkscape:window-maximized="0"
|
inkscape:window-maximized="0"
|
||||||
inkscape:current-layer="svg35" />
|
inkscape:current-layer="layer1" /><defs
|
||||||
<mask
|
id="defs1"><linearGradient
|
||||||
id="mask0_4023_558"
|
id="linearGradient10"
|
||||||
maskUnits="userSpaceOnUse"
|
inkscape:collect="always"><stop
|
||||||
x="12"
|
style="stop-color:#c7a312;stop-opacity:1;"
|
||||||
y="100"
|
offset="0"
|
||||||
width="88"
|
id="stop10" /><stop
|
||||||
height="16">
|
style="stop-color:#26a0b3;stop-opacity:1;"
|
||||||
<path
|
|
||||||
d="m 100,104 c 0,6.627 -5.3726,12 -12,12 H 24 c -6.6274,0 -12,-5.373 -12,-12 v -4 c 0,6.627 5.3726,12 12,12 h 64 c 6.6274,0 12,-5.373 12,-12 z"
|
|
||||||
fill="#d9d9d9"
|
|
||||||
id="path6" />
|
|
||||||
</mask>
|
|
||||||
<mask
|
|
||||||
id="mask1_4023_558"
|
|
||||||
maskUnits="userSpaceOnUse"
|
|
||||||
x="77"
|
|
||||||
y="27"
|
|
||||||
width="21"
|
|
||||||
height="36">
|
|
||||||
<path
|
|
||||||
d="m 97.4223,44.1501 c 0.3482,0.5122 0.3457,1.1859 -0.0063,1.6956 L 86.0175,62.3523 C 85.7375,62.7579 85.2761,63 84.7832,63 h -5.9804 c -1.1981,0 -1.9127,-1.3352 -1.2481,-2.3321 l 9.8906,-14.8358 c 0.3359,-0.5039 0.3359,-1.1603 0,-1.6642 L 78.0729,30.1094 C 77.1869,28.7803 78.1396,27 79.737,27 h 5.2334 c 0.4967,0 0.9613,0.2459 1.2405,0.6567 z"
|
|
||||||
fill="#2779dd"
|
|
||||||
id="path14" />
|
|
||||||
</mask>
|
|
||||||
<g
|
|
||||||
id="g36"
|
|
||||||
transform="scale(4)">
|
|
||||||
<g
|
|
||||||
clip-path="url(#clip0_4023_558)"
|
|
||||||
id="g6">
|
|
||||||
<rect
|
|
||||||
x="62.0205"
|
|
||||||
y="-52.425598"
|
|
||||||
width="24"
|
|
||||||
height="197"
|
|
||||||
transform="rotate(30,62.0205,-52.4256)"
|
|
||||||
fill="#9141ac"
|
|
||||||
id="rect1" />
|
|
||||||
<rect
|
|
||||||
x="82.805099"
|
|
||||||
y="-40.425598"
|
|
||||||
width="18"
|
|
||||||
height="197"
|
|
||||||
transform="rotate(30,82.8051,-40.4256)"
|
|
||||||
fill="#62a0ea"
|
|
||||||
id="rect2" />
|
|
||||||
<rect
|
|
||||||
x="98.3936"
|
|
||||||
y="-31.4256"
|
|
||||||
width="18"
|
|
||||||
height="197"
|
|
||||||
transform="rotate(30,98.3936,-31.4256)"
|
|
||||||
fill="#57e389"
|
|
||||||
id="rect3" />
|
|
||||||
<rect
|
|
||||||
x="113.982"
|
|
||||||
y="-22.4256"
|
|
||||||
width="18"
|
|
||||||
height="197"
|
|
||||||
transform="rotate(30,113.982,-22.4256)"
|
|
||||||
fill="#f5c211"
|
|
||||||
id="rect4" />
|
|
||||||
<rect
|
|
||||||
x="129.57001"
|
|
||||||
y="-13.4256"
|
|
||||||
width="18"
|
|
||||||
height="197"
|
|
||||||
transform="rotate(30,129.57,-13.4256)"
|
|
||||||
fill="#ff7800"
|
|
||||||
id="rect5" />
|
|
||||||
<rect
|
|
||||||
x="145.159"
|
|
||||||
y="-4.4256301"
|
|
||||||
width="24"
|
|
||||||
height="197"
|
|
||||||
transform="rotate(30,145.159,-4.42563)"
|
|
||||||
fill="#ed333b"
|
|
||||||
id="rect6" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
mask="url(#mask0_4023_558)"
|
|
||||||
id="g10">
|
|
||||||
<path
|
|
||||||
d="m 12,100 h 24 v 16 H 12 Z"
|
|
||||||
fill="url(#paint0_linear_4023_558)"
|
|
||||||
id="path7"
|
|
||||||
style="fill:url(#paint0_linear_4023_558)" />
|
|
||||||
<path
|
|
||||||
d="m 12,100 h 5 v 16 h -5 z"
|
|
||||||
fill="url(#paint1_linear_4023_558)"
|
|
||||||
id="path8"
|
|
||||||
style="fill:url(#paint1_linear_4023_558)" />
|
|
||||||
<rect
|
|
||||||
x="36"
|
|
||||||
y="100"
|
|
||||||
width="21"
|
|
||||||
height="16"
|
|
||||||
fill="#ca9005"
|
|
||||||
id="rect8" />
|
|
||||||
<rect
|
|
||||||
x="57"
|
|
||||||
y="100"
|
|
||||||
width="21"
|
|
||||||
height="16"
|
|
||||||
fill="#c64600"
|
|
||||||
id="rect9" />
|
|
||||||
<rect
|
|
||||||
x="78"
|
|
||||||
y="100"
|
|
||||||
width="22"
|
|
||||||
height="16"
|
|
||||||
fill="url(#paint2_linear_4023_558)"
|
|
||||||
id="rect10"
|
|
||||||
style="fill:url(#paint2_linear_4023_558)" />
|
|
||||||
</g>
|
|
||||||
<rect
|
|
||||||
opacity="0.2"
|
|
||||||
x="24.5"
|
|
||||||
y="110.5"
|
|
||||||
width="63"
|
|
||||||
height="1"
|
|
||||||
stroke="url(#paint3_linear_4023_558)"
|
|
||||||
id="rect11"
|
|
||||||
style="stroke:url(#paint3_linear_4023_558)" />
|
|
||||||
<path
|
|
||||||
d="m 85,4 c 22.644,0 41,18.3563 41,41 v 4 c 0,22.6437 -18.356,41 -41,41 -8.3322,0 -16.0825,-2.4875 -22.5526,-6.7576 -0.4653,-0.3071 -1.0341,-0.4203 -1.5783,-0.2987 l -8.8369,1.9749 C 52.0134,84.9228 52,84.9395 52,84.9588 52,84.9816 51.9816,85 51.9588,85 h -0.4617 c -0.0787,0.0036 -0.1564,0.004 -0.2334,0 H 51 c -1.1046,0 -2,-0.8954 -2,-2 v -0.2617 c -0.0043,-0.0811 -0.0042,-0.1632 0,-0.2461 V 78.9749 C 49,78.7126 49.2126,78.5 49.4749,78.5 c 0.2224,0 0.4151,-0.1543 0.4635,-0.3714 l 1.117,-4.9987 C 51.177,72.5857 51.0638,72.017 50.7567,71.5517 46.487,65.0818 44,57.3317 44,49 V 45 C 44,22.3563 62.3563,4 85,4 Z"
|
|
||||||
fill="url(#paint4_linear_4023_558)"
|
|
||||||
id="path11"
|
|
||||||
style="fill:url(#paint4_linear_4023_558)" />
|
|
||||||
<path
|
|
||||||
d="m 85,4 c 22.644,0 41,18.3563 41,41 0,22.6437 -18.356,41 -41,41 -8.6457,0 -16.6648,-2.6781 -23.2773,-7.2471 l -9.8018,2.1914 c -1.7167,0.3836 -3.2488,-1.1485 -2.8652,-2.8652 l 2.1904,-9.8027 C 46.6776,61.6641 44,53.6452 44,45 44,22.3563 62.3563,4 85,4 Z"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="path12" />
|
|
||||||
<path
|
|
||||||
d="m 97.2297,43.8668 c 0.4642,0.683 0.4609,1.5812 -0.0083,2.2608 L 86.1666,62.1365 C 85.7932,62.6772 85.178,63 84.5209,63 H 79.737 c -1.5974,0 -2.5502,-1.7803 -1.6641,-3.1094 l 9.1875,-13.7812 c 0.4478,-0.6718 0.4478,-1.547 0,-2.2188 L 78.0729,30.1094 C 77.1868,28.7803 78.1396,27 79.737,27 h 4.9687 c 0.6623,0 1.2817,0.3279 1.654,0.8757 z"
|
|
||||||
fill="url(#paint5_radial_4023_558)"
|
|
||||||
id="path13"
|
|
||||||
style="fill:url(#paint5_radial_4023_558)" />
|
|
||||||
<g
|
|
||||||
mask="url(#mask1_4023_558)"
|
|
||||||
id="g14">
|
|
||||||
<rect
|
|
||||||
x="73"
|
|
||||||
y="27"
|
|
||||||
width="17"
|
|
||||||
height="4"
|
|
||||||
fill="#2779dd"
|
|
||||||
id="rect14" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<defs
|
|
||||||
id="defs35">
|
|
||||||
<linearGradient
|
|
||||||
id="paint0_linear_4023_558"
|
|
||||||
x1="34"
|
|
||||||
y1="108"
|
|
||||||
x2="12"
|
|
||||||
y2="108"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
offset="0.401381"
|
|
||||||
stop-color="#26A269"
|
|
||||||
id="stop14" />
|
|
||||||
<stop
|
|
||||||
offset="0.801049"
|
|
||||||
stop-color="#8AEB52"
|
|
||||||
id="stop15" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
offset="1"
|
||||||
stop-color="#26A269"
|
id="stop11" /></linearGradient><linearGradient
|
||||||
id="stop16" />
|
inkscape:collect="always"
|
||||||
</linearGradient>
|
xlink:href="#linearGradient10"
|
||||||
<linearGradient
|
id="linearGradient11"
|
||||||
id="paint1_linear_4023_558"
|
x1="20.031296"
|
||||||
x1="12"
|
y1="32.697563"
|
||||||
y1="108"
|
x2="90.709213"
|
||||||
x2="17"
|
y2="66.3423"
|
||||||
y2="108"
|
gradientUnits="userSpaceOnUse" /></defs><g
|
||||||
gradientUnits="userSpaceOnUse">
|
inkscape:label="Layer 1"
|
||||||
<stop
|
inkscape:groupmode="layer"
|
||||||
stop-color="#1A5FB4"
|
id="layer1"><rect
|
||||||
id="stop17" />
|
style="fill:url(#linearGradient11);fill-opacity:1;stroke:none;stroke-width:7.99999;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
<stop
|
id="rect10"
|
||||||
offset="1"
|
width="100"
|
||||||
stop-color="#35E0F6"
|
height="100"
|
||||||
id="stop18" />
|
x="0"
|
||||||
</linearGradient>
|
y="0"
|
||||||
<linearGradient
|
ry="28.294127" /><path
|
||||||
id="paint2_linear_4023_558"
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
x1="100"
|
d="M 19.377906,68.106953 80.937684,32.43771"
|
||||||
y1="108"
|
id="path10" /><path
|
||||||
x2="78"
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
y2="108"
|
d="m 19.044488,32.469148 61.61782,35.569625"
|
||||||
gradientUnits="userSpaceOnUse">
|
id="path9" /><path
|
||||||
<stop
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
stop-color="#A51D2D"
|
d="M 50,85.574911 V 14.425087"
|
||||||
id="stop19" />
|
id="path8" /><circle
|
||||||
<stop
|
style="fill:none;stroke:#ffffff;stroke-width:7.11498;stroke-linecap:round;stroke-linejoin:round"
|
||||||
offset="0.195858"
|
id="path1"
|
||||||
stop-color="#E5673C"
|
cx="50"
|
||||||
id="stop20" />
|
cy="50"
|
||||||
<stop
|
r="35.574913" /><circle
|
||||||
offset="0.5983"
|
style="fill:#09bd05;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
stop-color="#A51D2D"
|
id="path2"
|
||||||
id="stop21" />
|
cx="50"
|
||||||
</linearGradient>
|
cy="84.604881"
|
||||||
<linearGradient
|
r="8.2508707" /><circle
|
||||||
id="paint3_linear_4023_558"
|
style="fill:#fe1e24;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
x1="88"
|
id="circle2"
|
||||||
y1="111.329"
|
cx="50"
|
||||||
x2="24"
|
cy="15.395123"
|
||||||
y2="111.329"
|
r="8.2508707" /><circle
|
||||||
gradientUnits="userSpaceOnUse">
|
style="fill:#fe941d;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
<stop
|
id="circle3"
|
||||||
offset="0.102371"
|
cx="-68.30127"
|
||||||
stop-color="white"
|
cy="52.906147"
|
||||||
stop-opacity="0"
|
r="8.2508707"
|
||||||
id="stop22" />
|
transform="rotate(-120)" /><circle
|
||||||
<stop
|
style="fill:#001996;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
offset="0.253808"
|
id="circle4"
|
||||||
stop-color="white"
|
cx="-68.30127"
|
||||||
id="stop23" />
|
cy="-16.30361"
|
||||||
<stop
|
r="8.2508707"
|
||||||
offset="0.747697"
|
transform="rotate(-120)" /><circle
|
||||||
stop-color="white"
|
style="fill:#ffff04;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
id="stop24" />
|
id="circle5"
|
||||||
<stop
|
cx="-18.301271"
|
||||||
offset="0.895556"
|
cy="102.90615"
|
||||||
stop-color="white"
|
r="8.2508707"
|
||||||
stop-opacity="0"
|
transform="rotate(-60)" /><circle
|
||||||
id="stop25" />
|
style="fill:#770287;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
|
||||||
</linearGradient>
|
id="circle6"
|
||||||
<linearGradient
|
cx="-18.301271"
|
||||||
id="paint4_linear_4023_558"
|
cy="33.696392"
|
||||||
x1="44"
|
r="8.2508707"
|
||||||
y1="48.036098"
|
transform="rotate(-60)" /><circle
|
||||||
x2="126"
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:6.75;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
||||||
y2="48.036098"
|
id="path7"
|
||||||
gradientUnits="userSpaceOnUse">
|
cx="50"
|
||||||
<stop
|
cy="50"
|
||||||
stop-color="#DBEBF4"
|
r="9.7918472" /><g
|
||||||
id="stop26" />
|
inkscape:label="Layer 1"
|
||||||
<stop
|
id="layer1-3"
|
||||||
offset="0.147387"
|
transform="matrix(0.08246781,0,0,0.08246781,38.828362,38.828362)"
|
||||||
stop-color="#B1D4E7"
|
style="stroke:#ffffff"><text
|
||||||
id="stop27" />
|
xml:space="preserve"
|
||||||
<stop
|
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:96.3615px;line-height:0;font-family:'Noto Serif';-inkscape-font-specification:'Noto Serif, Heavy';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
offset="0.186621"
|
x="-305.64749"
|
||||||
stop-color="#8DC0DC"
|
y="194.14493"
|
||||||
id="stop28" />
|
id="text2819"><tspan
|
||||||
<stop
|
sodipodi:role="line"
|
||||||
offset="0.203755"
|
id="tspan2817"
|
||||||
stop-color="#49AEE7"
|
style="stroke:#ffffff;stroke-width:0"
|
||||||
id="stop29" />
|
x="-305.64749"
|
||||||
<stop
|
y="194.14493" /></text><circle
|
||||||
offset="0.276122"
|
style="fill:#354b5f;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
stop-color="#7AB5D7"
|
id="path342"
|
||||||
id="stop30" />
|
cx="135.46666"
|
||||||
<stop
|
cy="135.46666"
|
||||||
offset="0.399628"
|
r="135.46666" /><text
|
||||||
stop-color="#B3D6E7"
|
xml:space="preserve"
|
||||||
id="stop31" />
|
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:96.3615px;line-height:0;font-family:'Noto Serif';-inkscape-font-specification:'Noto Serif, Heavy';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
<stop
|
x="-305.64749"
|
||||||
offset="0.507537"
|
y="194.14493"
|
||||||
stop-color="#B3D6E7"
|
id="text2819-3"><tspan
|
||||||
id="stop32" />
|
sodipodi:role="line"
|
||||||
<stop
|
id="tspan2817-5"
|
||||||
offset="1"
|
style="stroke:#ffffff;stroke-width:0"
|
||||||
stop-color="#DBEBF4"
|
x="-305.64749"
|
||||||
id="stop33" />
|
y="194.14493" /></text><g
|
||||||
</linearGradient>
|
aria-label="❯"
|
||||||
<radialGradient
|
id="text2827-6"
|
||||||
id="paint5_radial_4023_558"
|
style="font-size:132.452px;line-height:0;font-family:PowerlineSymbols;-inkscape-font-specification:'PowerlineSymbols, Normal';text-align:end;text-anchor:end;fill:#4e94e4;fill-opacity:1;stroke:#ffffff;stroke-width:0"><path
|
||||||
cx="0"
|
d="M 95.096912,209.8167 143.88912,135.46666 95.096912,61.116629 h 32.818568 l 47.92093,74.350031 -47.92093,74.35004 z"
|
||||||
cy="0"
|
id="path2883-2"
|
||||||
r="1"
|
style="fill:#4e94e4;fill-opacity:1;stroke:#ffffff;stroke-width:0" /></g></g></g></svg>
|
||||||
gradientTransform="matrix(3.5,24.5214,-15.8099,2.26053,101,33.9904)"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
stop-color="#72AAEE"
|
|
||||||
id="stop34" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#3584E4"
|
|
||||||
id="stop35" />
|
|
||||||
</radialGradient>
|
|
||||||
<clipPath
|
|
||||||
id="clip0_4023_558">
|
|
||||||
<rect
|
|
||||||
x="12"
|
|
||||||
y="36"
|
|
||||||
width="88"
|
|
||||||
height="80"
|
|
||||||
rx="12"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect35" />
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
|
@ -1,156 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
width="512"
|
|
||||||
height="512"
|
|
||||||
viewBox="0 0 512 512"
|
|
||||||
fill="none"
|
|
||||||
version="1.1"
|
|
||||||
id="svg11"
|
|
||||||
sodipodi:docname="mobile.svg"
|
|
||||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview11"
|
|
||||||
pagecolor="#505050"
|
|
||||||
bordercolor="#eeeeee"
|
|
||||||
borderopacity="1"
|
|
||||||
inkscape:showpageshadow="0"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#505050"
|
|
||||||
inkscape:zoom="30.03125"
|
|
||||||
inkscape:cx="14.51821"
|
|
||||||
inkscape:cy="11.038502"
|
|
||||||
inkscape:window-width="2544"
|
|
||||||
inkscape:window-height="1363"
|
|
||||||
inkscape:window-x="35"
|
|
||||||
inkscape:window-y="32"
|
|
||||||
inkscape:window-maximized="0"
|
|
||||||
inkscape:current-layer="svg11" />
|
|
||||||
<g
|
|
||||||
id="g11"
|
|
||||||
transform="scale(4)">
|
|
||||||
<g
|
|
||||||
clip-path="url(#clip0_4033_8)"
|
|
||||||
id="g10">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect1"
|
|
||||||
x="0"
|
|
||||||
y="0" />
|
|
||||||
<rect
|
|
||||||
x="60"
|
|
||||||
y="-107"
|
|
||||||
width="35.5569"
|
|
||||||
height="291.86301"
|
|
||||||
transform="rotate(30,60,-107)"
|
|
||||||
fill="#9141ac"
|
|
||||||
id="rect2" />
|
|
||||||
<rect
|
|
||||||
x="90.793198"
|
|
||||||
y="-89.221497"
|
|
||||||
width="26.6677"
|
|
||||||
height="291.86301"
|
|
||||||
transform="rotate(30,90.7932,-89.2215)"
|
|
||||||
fill="#62a0ea"
|
|
||||||
id="rect3" />
|
|
||||||
<rect
|
|
||||||
x="113.888"
|
|
||||||
y="-75.887703"
|
|
||||||
width="26.6677"
|
|
||||||
height="291.86301"
|
|
||||||
transform="rotate(30,113.888,-75.8877)"
|
|
||||||
fill="#57e389"
|
|
||||||
id="rect4" />
|
|
||||||
<rect
|
|
||||||
x="136.983"
|
|
||||||
y="-62.553799"
|
|
||||||
width="26.6677"
|
|
||||||
height="291.86301"
|
|
||||||
transform="rotate(30,136.983,-62.5538)"
|
|
||||||
fill="#f5c211"
|
|
||||||
id="rect5" />
|
|
||||||
<rect
|
|
||||||
x="160.078"
|
|
||||||
y="-49.220001"
|
|
||||||
width="26.6677"
|
|
||||||
height="291.86301"
|
|
||||||
transform="rotate(30,160.078,-49.22)"
|
|
||||||
fill="#ff7800"
|
|
||||||
id="rect6" />
|
|
||||||
<rect
|
|
||||||
x="183.173"
|
|
||||||
y="-35.886101"
|
|
||||||
width="35.5569"
|
|
||||||
height="291.86301"
|
|
||||||
transform="rotate(30,183.173,-35.8861)"
|
|
||||||
fill="#ed333b"
|
|
||||||
id="rect7" />
|
|
||||||
<path
|
|
||||||
d="m 64,23 c 22.6437,0 41,18.3563 41,41 0,22.6437 -18.3563,41 -41,41 -8.6457,0 -16.6648,-2.678 -23.2773,-7.2471 l -9.8018,2.1914 c -1.7167,0.3837 -3.2488,-1.1485 -2.8652,-2.8652 l 2.1904,-9.8027 C 25.6776,80.6641 23,72.6452 23,64 23,41.3563 41.3563,23 64,23 Z"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="path7" />
|
|
||||||
<path
|
|
||||||
d="m 76.2297,62.8668 c 0.4643,0.683 0.461,1.5812 -0.0083,2.2608 L 65.1666,81.1365 C 64.7932,81.6772 64.178,82 63.5209,82 H 58.737 c -1.5974,0 -2.5501,-1.7803 -1.6641,-3.1094 l 9.1875,-13.7812 c 0.4479,-0.6718 0.4479,-1.547 0,-2.2188 L 57.0729,49.1094 C 56.1869,47.7803 57.1396,46 58.737,46 h 4.9687 c 0.6623,0 1.2817,0.3279 1.654,0.8757 z"
|
|
||||||
fill="url(#paint0_radial_4033_8)"
|
|
||||||
id="path8"
|
|
||||||
style="fill:url(#paint0_radial_4033_8)" />
|
|
||||||
<mask
|
|
||||||
id="mask0_4033_8"
|
|
||||||
maskUnits="userSpaceOnUse"
|
|
||||||
x="56"
|
|
||||||
y="46"
|
|
||||||
width="21"
|
|
||||||
height="36">
|
|
||||||
<path
|
|
||||||
d="m 76.4223,63.1501 c 0.3482,0.5123 0.3457,1.1859 -0.0063,1.6956 L 65.0175,81.3524 C 64.7375,81.7579 64.2761,82 63.7832,82 h -5.9804 c -1.1981,0 -1.9127,-1.3352 -1.2481,-2.332 l 9.8906,-14.8359 c 0.3359,-0.5039 0.3359,-1.1603 0,-1.6641 L 57.0729,49.1094 C 56.1869,47.7803 57.1396,46 58.737,46 h 5.2334 c 0.4967,0 0.9613,0.2459 1.2405,0.6568 z"
|
|
||||||
fill="#2779dd"
|
|
||||||
id="path9" />
|
|
||||||
</mask>
|
|
||||||
<g
|
|
||||||
mask="url(#mask0_4033_8)"
|
|
||||||
id="g9">
|
|
||||||
<rect
|
|
||||||
x="52"
|
|
||||||
y="46"
|
|
||||||
width="17"
|
|
||||||
height="4"
|
|
||||||
fill="#2779dd"
|
|
||||||
id="rect9" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<defs
|
|
||||||
id="defs11">
|
|
||||||
<radialGradient
|
|
||||||
id="paint0_radial_4033_8"
|
|
||||||
cx="0"
|
|
||||||
cy="0"
|
|
||||||
r="1"
|
|
||||||
gradientTransform="matrix(3.5,24.5214,-15.8099,2.26053,80,52.9904)"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
stop-color="#72AAEE"
|
|
||||||
id="stop10" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#3584E4"
|
|
||||||
id="stop11" />
|
|
||||||
</radialGradient>
|
|
||||||
<clipPath
|
|
||||||
id="clip0_4033_8">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect11"
|
|
||||||
x="0"
|
|
||||||
y="0" />
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
|
@ -1,178 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
width="512"
|
|
||||||
height="512"
|
|
||||||
viewBox="0 0 512 512"
|
|
||||||
fill="none"
|
|
||||||
version="1.1"
|
|
||||||
id="svg11"
|
|
||||||
sodipodi:docname="monochrome.svg"
|
|
||||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
|
||||||
inkscape:export-filename="foreground.png"
|
|
||||||
inkscape:export-xdpi="96"
|
|
||||||
inkscape:export-ydpi="96"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview11"
|
|
||||||
pagecolor="#505050"
|
|
||||||
bordercolor="#eeeeee"
|
|
||||||
borderopacity="1"
|
|
||||||
inkscape:showpageshadow="0"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#505050"
|
|
||||||
inkscape:zoom="1.240199"
|
|
||||||
inkscape:cx="156.02335"
|
|
||||||
inkscape:cy="321.3194"
|
|
||||||
inkscape:window-width="2544"
|
|
||||||
inkscape:window-height="1363"
|
|
||||||
inkscape:window-x="35"
|
|
||||||
inkscape:window-y="32"
|
|
||||||
inkscape:window-maximized="0"
|
|
||||||
inkscape:current-layer="svg11" />
|
|
||||||
<path
|
|
||||||
d="m 256,92 c 90.5748,0 164,73.4252 164,164 0,90.5748 -73.4252,164 -164,164 -34.5828,0 -66.6592,-10.712 -93.1092,-28.9884 l -39.2072,8.7656 c -6.8668,1.5348 -12.9952,-4.594 -11.4608,-11.4608 l 8.7616,-39.2108 C 102.7104,322.6564 92,290.5808 92,256 92,165.4252 165.4252,92 256,92 Z"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="path7"
|
|
||||||
style="stroke-width:4"
|
|
||||||
clip-path="url(#clipPath1)"
|
|
||||||
inkscape:path-effect="#path-effect1" />
|
|
||||||
<defs
|
|
||||||
id="defs11">
|
|
||||||
<inkscape:path-effect
|
|
||||||
effect="powerclip"
|
|
||||||
message=""
|
|
||||||
id="path-effect1"
|
|
||||||
is_visible="true"
|
|
||||||
lpeversion="1"
|
|
||||||
inverse="true"
|
|
||||||
flatten="false"
|
|
||||||
hide_clip="false" />
|
|
||||||
<radialGradient
|
|
||||||
id="paint0_radial_4033_8"
|
|
||||||
cx="0"
|
|
||||||
cy="0"
|
|
||||||
r="1"
|
|
||||||
gradientTransform="matrix(14,98.0856,-63.2396,9.04212,320,211.9616)"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
stop-color="#72AAEE"
|
|
||||||
id="stop10" />
|
|
||||||
<stop
|
|
||||||
offset="1"
|
|
||||||
stop-color="#3584E4"
|
|
||||||
id="stop11" />
|
|
||||||
</radialGradient>
|
|
||||||
<mask
|
|
||||||
id="mask0_4033_8"
|
|
||||||
maskUnits="userSpaceOnUse"
|
|
||||||
x="56"
|
|
||||||
y="46"
|
|
||||||
width="21"
|
|
||||||
height="36">
|
|
||||||
<path
|
|
||||||
d="m 76.4223,63.1501 c 0.3482,0.5123 0.3457,1.1859 -0.0063,1.6956 L 65.0175,81.3524 C 64.7375,81.7579 64.2761,82 63.7832,82 h -5.9804 c -1.1981,0 -1.9127,-1.3352 -1.2481,-2.332 l 9.8906,-14.8359 c 0.3359,-0.5039 0.3359,-1.1603 0,-1.6641 L 57.0729,49.1094 C 56.1869,47.7803 57.1396,46 58.737,46 h 5.2334 c 0.4967,0 0.9613,0.2459 1.2405,0.6568 z"
|
|
||||||
fill="#2779dd"
|
|
||||||
id="path9" />
|
|
||||||
</mask>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath11">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect12"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath12">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect13"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath13">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect14"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath14">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect15"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath15">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect16"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath16">
|
|
||||||
<rect
|
|
||||||
width="128"
|
|
||||||
height="128"
|
|
||||||
fill="#ffffff"
|
|
||||||
id="rect17"
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
transform="rotate(-30)" />
|
|
||||||
</clipPath>
|
|
||||||
<clipPath
|
|
||||||
clipPathUnits="userSpaceOnUse"
|
|
||||||
id="clipPath1">
|
|
||||||
<path
|
|
||||||
d="m 304.9188,251.4672 c 1.8572,2.732 1.844,6.3248 -0.0332,9.0432 L 260.6664,324.546 C 259.1728,326.7088 256.712,328 254.0836,328 H 234.948 c -6.3896,0 -10.2004,-7.1212 -6.6564,-12.4376 l 36.75,-55.1248 c 1.7916,-2.6872 1.7916,-6.188 0,-8.8752 l -36.75,-55.1248 C 224.7476,191.1212 228.5584,184 234.948,184 h 19.8748 c 2.6492,0 5.1268,1.3116 6.616,3.5028 z"
|
|
||||||
fill="url(#paint0_radial_4033_8)"
|
|
||||||
id="path1"
|
|
||||||
style="display:none;fill:url(#radialGradient1);stroke-width:4" />
|
|
||||||
<path
|
|
||||||
id="lpe_path-effect1"
|
|
||||||
style="fill:url(#radialGradient1);stroke-width:4"
|
|
||||||
class="powerclip"
|
|
||||||
d="M 87,87 H 425 V 425 H 87 Z m 217.9188,164.4672 -43.48,-63.9644 C 259.9496,185.3116 257.472,184 254.8228,184 H 234.948 c -6.3896,0 -10.2004,7.1212 -6.6564,12.4376 l 36.75,55.1248 c 1.7916,2.6872 1.7916,6.188 0,8.8752 l -36.75,55.1248 C 224.7476,320.8788 228.5584,328 234.948,328 h 19.1356 c 2.6284,0 5.0892,-1.2912 6.5828,-3.454 l 44.2192,-64.0356 c 1.8772,-2.7184 1.8904,-6.3112 0.0332,-9.0432 z" />
|
|
||||||
</clipPath>
|
|
||||||
<radialGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#paint0_radial_4033_8"
|
|
||||||
id="radialGradient1"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(14,98.0856,-63.2396,9.04212,320,211.9616)"
|
|
||||||
cx="0"
|
|
||||||
cy="0"
|
|
||||||
r="1" />
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 13 KiB |
BIN
assets/reply-preview.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
assets/reply.webp
Normal file
|
After Width: | Height: | Size: 3.4 MiB |
81
flake.lock
generated
|
|
@ -18,54 +18,17 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731533236,
|
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix2flatpak": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1774604963,
|
|
||||||
"narHash": "sha256-MtAW1FIdirSlUAAO7s1u9auv5y3I6t3uJ+GeEbqiqxI=",
|
|
||||||
"owner": "neobrain",
|
|
||||||
"repo": "nix2flatpak",
|
|
||||||
"rev": "3e04657fbcb49956ac301410b071a7f0b2ad5988",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "neobrain",
|
|
||||||
"repo": "nix2flatpak",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773389992,
|
"lastModified": 1767640445,
|
||||||
"narHash": "sha256-wvfdLLWJ2I9oEpDd9PfMA8osfIZicoQ5MT1jIwNs9Tk=",
|
"narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c06b4ae3d6599a672a6210b7021d699c351eebda",
|
"rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
|
|
@ -86,42 +49,10 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767640445,
|
|
||||||
"narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nix2flatpak": "nix2flatpak",
|
"nixpkgs": "nixpkgs"
|
||||||
"nixpkgs": "nixpkgs_2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
42
flake.nix
|
|
@ -2,10 +2,8 @@
|
||||||
description = "Nexus Flutter Flake";
|
description = "Nexus Flutter Flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
self.submodules = true;
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
nix2flatpak.url = "github:neobrain/nix2flatpak";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
|
@ -40,37 +38,29 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages =
|
devShells =
|
||||||
let
|
let
|
||||||
default = pkgs.callPackage ./linux/nix/pkg {
|
packages = with pkgs; [
|
||||||
src = self;
|
go
|
||||||
|
git
|
||||||
|
];
|
||||||
|
|
||||||
|
env = {
|
||||||
|
LIBCLANG_PATH = lib.makeLibraryPath [ pkgs.libclang ];
|
||||||
|
LD_LIBRARY_PATH = "./build/native_assets/linux:${lib.makeLibraryPath [ pkgs.zlib ]}";
|
||||||
|
CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit default;
|
default = pkgs.mkShell {
|
||||||
|
inherit env;
|
||||||
flatpak = inputs.nix2flatpak.lib.${system}.mkFlatpak {
|
packages = packages ++ [
|
||||||
appName = "Nexus";
|
pkgs.flutter
|
||||||
developer = "QuadRadical";
|
];
|
||||||
appId = "nexus.federated.Nexus";
|
|
||||||
package = default;
|
|
||||||
runtime = "org.gnome.Platform/49";
|
|
||||||
permissions = {
|
|
||||||
share = [ "network" ];
|
|
||||||
sockets = [
|
|
||||||
"fallback-x11"
|
|
||||||
"wayland"
|
|
||||||
];
|
|
||||||
devices = [ "dri" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gomuks = pkgs.callPackage ./linux/nix/pkg/gomuks.nix {
|
nix = pkgs.mkShell { inherit packages env; };
|
||||||
src = self;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.callPackage ./linux/nix/devshell.nix { };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
gomuks
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit daa0ba028e7d89ba9fc7580fc8099348e6145cb3
|
|
||||||
107
hook/build.dart
|
|
@ -3,6 +3,9 @@ import "package:hooks/hooks.dart";
|
||||||
import "package:code_assets/code_assets.dart";
|
import "package:code_assets/code_assets.dart";
|
||||||
|
|
||||||
Future<void> main(List<String> args) => build(args, (input, output) async {
|
Future<void> main(List<String> args) => build(args, (input, output) async {
|
||||||
|
final buildDir = input.packageRoot.resolve("src/");
|
||||||
|
if (await File(buildDir.resolve("lock").toFilePath()).exists()) return;
|
||||||
|
|
||||||
final codeConfig = input.config.code;
|
final codeConfig = input.config.code;
|
||||||
final targetOS = codeConfig.targetOS;
|
final targetOS = codeConfig.targetOS;
|
||||||
final targetArch = codeConfig.targetArchitecture;
|
final targetArch = codeConfig.targetArchitecture;
|
||||||
|
|
@ -15,6 +18,15 @@ Future<void> main(List<String> args) => build(args, (input, output) async {
|
||||||
break;
|
break;
|
||||||
case OS.macOS:
|
case OS.macOS:
|
||||||
libFileName = "libgomuks.dylib";
|
libFileName = "libgomuks.dylib";
|
||||||
|
final sdkRoot = await _macSdkRoot();
|
||||||
|
final goArch = targetArch == Architecture.arm64 ? "arm64" : "amd64";
|
||||||
|
env = {
|
||||||
|
"GOARCH": goArch,
|
||||||
|
"CGO_ENABLED": "1",
|
||||||
|
"CGO_CFLAGS": "-isysroot $sdkRoot",
|
||||||
|
"CGO_CXXFLAGS": "-isysroot $sdkRoot",
|
||||||
|
"CGO_LDFLAGS": "-isysroot $sdkRoot",
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case OS.windows:
|
case OS.windows:
|
||||||
libFileName = "libgomuks.dll";
|
libFileName = "libgomuks.dll";
|
||||||
|
|
@ -22,54 +34,52 @@ Future<void> main(List<String> args) => build(args, (input, output) async {
|
||||||
case OS.android:
|
case OS.android:
|
||||||
libFileName = "libgomuks.so";
|
libFileName = "libgomuks.so";
|
||||||
|
|
||||||
|
if (targetArch != Architecture.arm64) {
|
||||||
|
throw UnsupportedError(
|
||||||
|
"only arm64 for now... got: $targetArch",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
final targetNdkApi = codeConfig.android.targetNdkApi;
|
final targetNdkApi = codeConfig.android.targetNdkApi;
|
||||||
|
|
||||||
final ndkHome =
|
final ndkHome = Platform.environment["ANDROID_NDK_HOME"]
|
||||||
Platform.environment["ANDROID_NDK_HOME"] ??
|
?? Platform.environment["ANDROID_NDK_ROOT"]
|
||||||
Platform.environment["ANDROID_NDK_ROOT"] ??
|
?? Platform.environment["NDK_HOME"];
|
||||||
Platform.environment["NDK_HOME"] ??
|
|
||||||
await _findNdkFromSdk();
|
|
||||||
if (ndkHome == null) {
|
if (ndkHome == null) {
|
||||||
throw Exception(
|
throw Exception(
|
||||||
"Could not find Android NDK. Set ANDROID_NDK_HOME or install via sdkmanager.",
|
"ANDROID_NDK_HOME, ANDROID_NDK_ROOT, or NDK_HOME must be set for Android builds",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final hostTag = _ndkHostTag();
|
final hostTag = _ndkHostTag();
|
||||||
final (goArch, ccTriple) = _androidArch(targetArch);
|
final cc = "$ndkHome/toolchains/llvm/prebuilt/$hostTag/bin/aarch64-linux-android$targetNdkApi-clang";
|
||||||
final cc =
|
|
||||||
"$ndkHome/toolchains/llvm/prebuilt/$hostTag/bin/$ccTriple$targetNdkApi-clang";
|
|
||||||
|
|
||||||
env = {"CGO_ENABLED": "1", "GOOS": "android", "GOARCH": goArch, "CC": cc};
|
env = {
|
||||||
|
"CGO_ENABLED": "1",
|
||||||
|
"GOOS": "android",
|
||||||
|
"GOARCH": "arm64",
|
||||||
|
"CC": cc,
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw UnsupportedError("Unsupported OS: $targetOS");
|
throw UnsupportedError("Unsupported OS: $targetOS");
|
||||||
}
|
}
|
||||||
|
|
||||||
var libFile = input.packageRoot.resolve(libFileName);
|
final gomuksBuildDir = buildDir.resolve("gomuks/");
|
||||||
final gomuksBuildDir = input.packageRoot.resolve("gomuks/");
|
final libFile = gomuksBuildDir.resolve("${targetArch.name}/$libFileName");
|
||||||
|
|
||||||
if (!(await File.fromUri(libFile).exists())) {
|
print("Building Gomuks shared library $libFileName (${targetOS.name}/${targetArch.name}) from source...");
|
||||||
final buildDir = input.packageRoot.resolve("build/");
|
final result = await Process.run("go", [
|
||||||
libFile = buildDir.resolve("${targetArch.name}/$libFileName");
|
"build",
|
||||||
|
"-tags", "goolm",
|
||||||
|
"-o",
|
||||||
|
libFile.path,
|
||||||
|
"-buildmode=c-shared",
|
||||||
|
], workingDirectory: gomuksBuildDir.resolve("source/pkg/ffi/").toFilePath(),
|
||||||
|
environment: env.isNotEmpty ? env : null);
|
||||||
|
|
||||||
// goheif/dav1d supported on Android would need to fix upstream
|
if (result.exitCode != 0) {
|
||||||
final tags = targetOS == OS.android ? "goolm,noheic" : "goolm";
|
throw Exception("Failed to build Gomuks shared library\n${result.stderr}");
|
||||||
print(
|
|
||||||
"Building Gomuks shared library $libFileName (${targetOS.name}/${targetArch.name}) to ${libFile.path}...",
|
|
||||||
);
|
|
||||||
final result = await Process.run(
|
|
||||||
"go",
|
|
||||||
["build", "-tags", tags, "-o", libFile.path, "-buildmode=c-shared"],
|
|
||||||
workingDirectory: gomuksBuildDir.resolve("pkg/ffi/").toFilePath(),
|
|
||||||
environment: env.isNotEmpty ? env : null,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (result.exitCode != 0) {
|
|
||||||
throw Exception(
|
|
||||||
"Failed to build Gomuks shared library\n${result.stderr}",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final generatedFile = "src/third_party/gomuks.g.dart";
|
final generatedFile = "src/third_party/gomuks.g.dart";
|
||||||
|
|
@ -88,18 +98,12 @@ Future<void> main(List<String> args) => build(args, (input, output) async {
|
||||||
print("Done!");
|
print("Done!");
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<String?> _findNdkFromSdk() async {
|
Future<String> _macSdkRoot() async {
|
||||||
// pretty sure this wont be needed with nix, i'll get this removed
|
final result = await Process.run("xcrun", ["--show-sdk-path"]);
|
||||||
final androidHome =
|
if (result.exitCode != 0) {
|
||||||
Platform.environment["ANDROID_HOME"] ??
|
throw Exception("Failed to find macOS SDK: ${result.stderr}");
|
||||||
Platform.environment["ANDROID_SDK_ROOT"];
|
}
|
||||||
if (androidHome == null) return null;
|
return (result.stdout as String).trim();
|
||||||
final ndkDir = Directory("$androidHome/ndk");
|
|
||||||
if (!await ndkDir.exists()) return null;
|
|
||||||
final versions = await ndkDir.list().toList();
|
|
||||||
if (versions.isEmpty) return null;
|
|
||||||
versions.sort((a, b) => a.path.compareTo(b.path));
|
|
||||||
return versions.last.path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String _ndkHostTag() {
|
String _ndkHostTag() {
|
||||||
|
|
@ -112,18 +116,3 @@ String _ndkHostTag() {
|
||||||
}
|
}
|
||||||
throw UnsupportedError("Unsupported host platform for Android NDK");
|
throw UnsupportedError("Unsupported host platform for Android NDK");
|
||||||
}
|
}
|
||||||
|
|
||||||
(String goArch, String ccTriple) _androidArch(Architecture arch) {
|
|
||||||
switch (arch) {
|
|
||||||
case Architecture.arm64:
|
|
||||||
return ("arm64", "aarch64-linux-android");
|
|
||||||
case Architecture.arm:
|
|
||||||
return ("arm", "armv7a-linux-androideabi");
|
|
||||||
case Architecture.x64:
|
|
||||||
return ("amd64", "x86_64-linux-android");
|
|
||||||
case Architecture.ia32:
|
|
||||||
return ("386", "i686-linux-android");
|
|
||||||
default:
|
|
||||||
throw UnsupportedError("Unsupported Android architecture: $arch");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = nexus.federated.Nexus;
|
PRODUCT_BUNDLE_IDENTIFIER = nexus.federated.nexus;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|
@ -519,7 +519,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = nexus.federated.Nexus;
|
PRODUCT_BUNDLE_IDENTIFIER = nexus.federated.nexus;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
|
@ -545,7 +545,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = nexus.federated.Nexus;
|
PRODUCT_BUNDLE_IDENTIFIER = nexus.federated.nexus;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 16 KiB |
|
|
@ -1,47 +0,0 @@
|
||||||
import "dart:async";
|
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
|
||||||
import "package:flutter_chat_core/flutter_chat_core.dart";
|
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
|
||||||
import "package:nexus/controllers/user_controller.dart";
|
|
||||||
import "package:nexus/helpers/extensions/get_localpart.dart";
|
|
||||||
import "package:nexus/models/membership.dart";
|
|
||||||
import "package:nexus/models/membership_status.dart";
|
|
||||||
|
|
||||||
class AuthorController extends AsyncNotifier<Membership> {
|
|
||||||
final Message message;
|
|
||||||
AuthorController(this.message);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<Membership> build() async {
|
|
||||||
final member = await ref.watch(
|
|
||||||
UserController.provider(message.authorId).future,
|
|
||||||
);
|
|
||||||
|
|
||||||
final pmp = message.metadata?["pmp"] == null
|
|
||||||
? null
|
|
||||||
: Membership.fromContent(
|
|
||||||
IMap(message.metadata?["pmp"]),
|
|
||||||
message.authorId,
|
|
||||||
ref.watch(
|
|
||||||
ClientStateController.provider.select(
|
|
||||||
(value) => value?.homeserverUrl,
|
|
||||||
),
|
|
||||||
) ??
|
|
||||||
"",
|
|
||||||
);
|
|
||||||
|
|
||||||
return Membership(
|
|
||||||
status: member?.status ?? MembershipStatus.leave,
|
|
||||||
avatarUrl: pmp?.avatarUrl ?? member?.avatarUrl,
|
|
||||||
displayName:
|
|
||||||
pmp?.displayName ?? member?.displayName ?? message.authorId.localpart,
|
|
||||||
userId: message.authorId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider =
|
|
||||||
AsyncNotifierProvider.family<AuthorController, Membership, Message>(
|
|
||||||
AuthorController.new,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import "dart:developer";
|
import "dart:developer";
|
||||||
import "dart:ffi";
|
import "dart:ffi";
|
||||||
import "dart:io";
|
|
||||||
import "dart:isolate";
|
import "dart:isolate";
|
||||||
import "package:collection/collection.dart";
|
import "package:collection/collection.dart";
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
|
|
@ -9,13 +8,11 @@ import "package:flutter/foundation.dart";
|
||||||
import "package:nexus/controllers/account_data_controller.dart";
|
import "package:nexus/controllers/account_data_controller.dart";
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
import "package:nexus/controllers/client_state_controller.dart";
|
||||||
import "package:nexus/controllers/init_complete_controller.dart";
|
import "package:nexus/controllers/init_complete_controller.dart";
|
||||||
import "package:nexus/controllers/new_events_controller.dart";
|
|
||||||
import "package:nexus/controllers/rooms_controller.dart";
|
import "package:nexus/controllers/rooms_controller.dart";
|
||||||
import "package:nexus/controllers/space_edges_controller.dart";
|
import "package:nexus/controllers/space_edges_controller.dart";
|
||||||
import "package:nexus/controllers/sync_status_controller.dart";
|
import "package:nexus/controllers/sync_status_controller.dart";
|
||||||
import "package:nexus/controllers/top_level_spaces_controller.dart";
|
import "package:nexus/controllers/top_level_spaces_controller.dart";
|
||||||
import "package:nexus/helpers/extensions/gomuks_buffer.dart";
|
import "package:nexus/helpers/extensions/gomuks_buffer.dart";
|
||||||
import "package:nexus/main.dart";
|
|
||||||
import "package:nexus/models/client_state.dart";
|
import "package:nexus/models/client_state.dart";
|
||||||
import "package:nexus/models/event.dart";
|
import "package:nexus/models/event.dart";
|
||||||
import "package:nexus/models/paginate.dart";
|
import "package:nexus/models/paginate.dart";
|
||||||
|
|
@ -28,28 +25,17 @@ import "package:nexus/models/profile.dart";
|
||||||
import "package:nexus/models/requests/paginate_request.dart";
|
import "package:nexus/models/requests/paginate_request.dart";
|
||||||
import "package:nexus/models/requests/redact_event_request.dart";
|
import "package:nexus/models/requests/redact_event_request.dart";
|
||||||
import "package:nexus/models/requests/report_request.dart";
|
import "package:nexus/models/requests/report_request.dart";
|
||||||
import "package:nexus/models/requests/send_event_request.dart";
|
|
||||||
import "package:nexus/models/requests/send_message_request.dart";
|
import "package:nexus/models/requests/send_message_request.dart";
|
||||||
import "package:nexus/models/requests/set_membership_request.dart";
|
|
||||||
import "package:nexus/models/room.dart";
|
import "package:nexus/models/room.dart";
|
||||||
import "package:nexus/models/sync_data.dart";
|
import "package:nexus/models/sync_data.dart";
|
||||||
import "package:nexus/models/sync_status.dart";
|
import "package:nexus/models/sync_status.dart";
|
||||||
import "package:nexus/src/third_party/gomuks.g.dart";
|
import "package:nexus/src/third_party/gomuks.g.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:path_provider/path_provider.dart";
|
|
||||||
|
|
||||||
class ClientController extends AsyncNotifier<int> {
|
class ClientController extends AsyncNotifier<int> {
|
||||||
@override
|
@override
|
||||||
Future<int> build() async {
|
Future<int> build() async {
|
||||||
final Pointer<Char> root;
|
final handle = await Isolate.run(GomuksInit);
|
||||||
if (Platform.isAndroid) {
|
|
||||||
final dir = await getApplicationSupportDirectory();
|
|
||||||
root = "${dir.path}/gomuks".toNativeUtf8().cast();
|
|
||||||
} else {
|
|
||||||
root = nullptr.cast();
|
|
||||||
}
|
|
||||||
|
|
||||||
final handle = GomuksInit(root);
|
|
||||||
|
|
||||||
final callable =
|
final callable =
|
||||||
NativeCallable<
|
NativeCallable<
|
||||||
|
|
@ -78,17 +64,6 @@ class ClientController extends AsyncNotifier<int> {
|
||||||
case "init_complete":
|
case "init_complete":
|
||||||
ref.watch(InitCompleteController.provider.notifier).complete();
|
ref.watch(InitCompleteController.provider.notifier).complete();
|
||||||
break;
|
break;
|
||||||
case "send_complete":
|
|
||||||
final event = Event.fromJson(decodedMuksEvent["event"]);
|
|
||||||
|
|
||||||
if (event.type == "m.room.message") {
|
|
||||||
ref
|
|
||||||
.watch(
|
|
||||||
NewEventsController.provider(event.roomId).notifier,
|
|
||||||
)
|
|
||||||
.add(IList([event]));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "sync_complete":
|
case "sync_complete":
|
||||||
final syncData = SyncData.fromJson(decodedMuksEvent);
|
final syncData = SyncData.fromJson(decodedMuksEvent);
|
||||||
final roomProvider = RoomsController.provider;
|
final roomProvider = RoomsController.provider;
|
||||||
|
|
@ -128,7 +103,6 @@ class ClientController extends AsyncNotifier<int> {
|
||||||
debugPrint("Finished handling $muksEventType...");
|
debugPrint("Finished handling $muksEventType...");
|
||||||
} catch (error, stackTrace) {
|
} catch (error, stackTrace) {
|
||||||
debugger();
|
debugger();
|
||||||
showError(error, stackTrace);
|
|
||||||
debugPrintStack(stackTrace: stackTrace, label: error.toString());
|
debugPrintStack(stackTrace: stackTrace, label: error.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -166,18 +140,15 @@ class ClientController extends AsyncNotifier<int> {
|
||||||
Future<void> redactEvent(RedactEventRequest report) =>
|
Future<void> redactEvent(RedactEventRequest report) =>
|
||||||
_sendCommand("redact_event", report.toJson());
|
_sendCommand("redact_event", report.toJson());
|
||||||
|
|
||||||
Future<Event> sendMessage(SendMessageRequest request) async =>
|
Future<void> sendMessage(SendMessageRequest request) =>
|
||||||
Event.fromJson(await _sendCommand("send_message", request.toJson()));
|
_sendCommand("send_message", request.toJson());
|
||||||
|
|
||||||
Future<Event> sendEvent(SendEventRequest request) async =>
|
Future<bool> verify(String recoveryKey) async {
|
||||||
Event.fromJson(await _sendCommand("send_event", request.toJson()));
|
|
||||||
|
|
||||||
Future<String?> verify(String recoveryKey) async {
|
|
||||||
try {
|
try {
|
||||||
await _sendCommand("verify", {"recovery_key": recoveryKey});
|
await _sendCommand("verify", {"recovery_key": recoveryKey});
|
||||||
return null;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error.toString();
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -202,13 +173,9 @@ class ClientController extends AsyncNotifier<int> {
|
||||||
// }));
|
// }));
|
||||||
|
|
||||||
Future<IList<Event>> getRoomState(GetRoomStateRequest request) async {
|
Future<IList<Event>> getRoomState(GetRoomStateRequest request) async {
|
||||||
Future<List?> getState(GetRoomStateRequest request) async =>
|
final response =
|
||||||
(await _sendCommand("get_room_state", request.toJson())) as List?;
|
(await _sendCommand("get_room_state", request.toJson())) as List;
|
||||||
final response = await getState(request);
|
return response.map((event) => Event.fromJson(event)).toIList();
|
||||||
|
|
||||||
return (response ?? await getState(request.copyWith(refetch: true)) ?? [])
|
|
||||||
.map((event) => Event.fromJson(event))
|
|
||||||
.toIList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<IList<Event>?> getRelatedEvents(
|
Future<IList<Event>?> getRelatedEvents(
|
||||||
|
|
@ -235,11 +202,8 @@ class ClientController extends AsyncNotifier<int> {
|
||||||
Future<Profile> getProfile(String userId) async =>
|
Future<Profile> getProfile(String userId) async =>
|
||||||
Profile.fromJson(await _sendCommand("get_profile", {"user_id": userId}));
|
Profile.fromJson(await _sendCommand("get_profile", {"user_id": userId}));
|
||||||
|
|
||||||
Future<void> reportEvent(ReportRequest request) =>
|
Future<void> reportEvent(ReportRequest report) =>
|
||||||
_sendCommand("report_event", request.toJson());
|
_sendCommand("report_event", report.toJson());
|
||||||
|
|
||||||
Future<void> setMembership(SetMembershipRequest request) =>
|
|
||||||
_sendCommand("set_membership", request.toJson());
|
|
||||||
|
|
||||||
Future<void> markRead(Room room) async {
|
Future<void> markRead(Room room) async {
|
||||||
final event = room.events.firstWhereOrNull(
|
final event = room.events.firstWhereOrNull(
|
||||||
|
|
@ -254,19 +218,19 @@ class ClientController extends AsyncNotifier<int> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String?> login(LoginRequest login) async {
|
Future<bool> login(LoginRequest login) async {
|
||||||
try {
|
try {
|
||||||
await _sendCommand("login", login.toJson());
|
await _sendCommand("login", login.toJson());
|
||||||
return null;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return error.toString();
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String?> discoverHomeserver(Uri homeserver) async {
|
Future<String?> discoverHomeserver(Uri homeserver) async {
|
||||||
try {
|
try {
|
||||||
final response = await _sendCommand("discover_homeserver", {
|
final response = await _sendCommand("discover_homeserver", {
|
||||||
"user_id": "@fake-user:${homeserver.host}",
|
"user_id": "@fakeuser:${homeserver.host}",
|
||||||
});
|
});
|
||||||
return response["m.homeserver"]?["base_url"];
|
return response["m.homeserver"]?["base_url"];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -1,88 +0,0 @@
|
||||||
import "dart:convert";
|
|
||||||
import "package:emoji_text_field/models/emoji_category.dart";
|
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
|
||||||
import "package:flutter/material.dart";
|
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:http/http.dart";
|
|
||||||
import "package:nexus/models/emoji.dart";
|
|
||||||
|
|
||||||
typedef EmojiTuple = (IMap<String, EmojiCategory>, IMap<String, List<String>>);
|
|
||||||
|
|
||||||
class EmojiController extends AsyncNotifier<EmojiTuple> {
|
|
||||||
@override
|
|
||||||
Future<EmojiTuple> build() async {
|
|
||||||
final response = await get(
|
|
||||||
Uri.https(
|
|
||||||
"github.com",
|
|
||||||
"github/gemoji/raw/refs/heads/master/db/emoji.json",
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (response.statusCode != 200) {
|
|
||||||
throw Exception("Failed to load emoji data");
|
|
||||||
}
|
|
||||||
|
|
||||||
final data = json.decode(response.body);
|
|
||||||
|
|
||||||
final entries = (data as List)
|
|
||||||
.cast<Map<String, dynamic>>()
|
|
||||||
.map(Emoji.fromJson)
|
|
||||||
.toIList();
|
|
||||||
|
|
||||||
final categoryMap = entries.fold<IMap<String, IList<String>>>(
|
|
||||||
const IMap.empty(),
|
|
||||||
(acc, entry) => acc.update(
|
|
||||||
entry.category,
|
|
||||||
(list) => list.add(entry.emoji),
|
|
||||||
ifAbsent: () => IList([entry.emoji]),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
final keywordMap = entries.fold<IMap<String, IList<String>>>(
|
|
||||||
const IMap.empty(),
|
|
||||||
(acc, entry) => acc.add(
|
|
||||||
entry.emoji,
|
|
||||||
IList<String>([...entry.tags, ...entry.aliases, entry.description]),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
final customCategories = IMap.fromEntries(
|
|
||||||
categoryMap.entries.map(
|
|
||||||
(entry) => MapEntry(
|
|
||||||
entry.key,
|
|
||||||
EmojiCategory(
|
|
||||||
name: entry.key,
|
|
||||||
icon: switch (entry.key) {
|
|
||||||
"Smileys & Emotion" => Icons.emoji_emotions,
|
|
||||||
"People & Body" => Icons.emoji_people,
|
|
||||||
"Animals & Nature" => Icons.emoji_nature,
|
|
||||||
"Food & Drink" => Icons.emoji_food_beverage,
|
|
||||||
"Travel & Places" => Icons.travel_explore,
|
|
||||||
"Activities" => Icons.sports_soccer,
|
|
||||||
"Objects" => Icons.emoji_objects,
|
|
||||||
"Symbols" => Icons.emoji_symbols,
|
|
||||||
"Flags" => Icons.emoji_flags,
|
|
||||||
_ => Icons.category,
|
|
||||||
},
|
|
||||||
emojis: entry.value.toList(growable: false),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
final customKeywords = IMap(
|
|
||||||
Map.fromEntries(
|
|
||||||
keywordMap.entries.map(
|
|
||||||
(e) => MapEntry(e.key, e.value.toList(growable: false)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return (customCategories, customKeywords);
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider =
|
|
||||||
AsyncNotifierProvider.autoDispose<EmojiController, EmojiTuple>(
|
|
||||||
EmojiController.new,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:nexus/controllers/members_controller.dart";
|
|
||||||
import "package:nexus/models/membership.dart";
|
|
||||||
import "package:nexus/models/membership_status.dart";
|
|
||||||
|
|
||||||
class MembersByTypeController extends AsyncNotifier<IList<Membership>> {
|
|
||||||
final MembershipStatus status;
|
|
||||||
MembersByTypeController(this.status);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<IList<Membership>> build() => ref.watch(
|
|
||||||
MembersController.provider.selectAsync(
|
|
||||||
(members) =>
|
|
||||||
members.where((membership) => membership.status == status).toIList(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
static final provider =
|
|
||||||
AsyncNotifierProvider.family<
|
|
||||||
MembersByTypeController,
|
|
||||||
IList<Membership>,
|
|
||||||
MembershipStatus
|
|
||||||
>(MembersByTypeController.new);
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +1,25 @@
|
||||||
|
import "package:collection/collection.dart";
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/client_controller.dart";
|
import "package:nexus/models/event.dart";
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
import "package:nexus/models/room.dart";
|
||||||
import "package:nexus/controllers/selected_room_controller.dart";
|
|
||||||
import "package:nexus/models/membership.dart";
|
class MembersController extends Notifier<IList<Event>> {
|
||||||
import "package:nexus/models/requests/get_room_state_request.dart";
|
final Room room;
|
||||||
|
MembersController(this.room);
|
||||||
|
|
||||||
class MembersController extends AsyncNotifier<IList<Membership>> {
|
|
||||||
@override
|
@override
|
||||||
Future<IList<Membership>> build() async {
|
IList<Event> build() => (room.state["m.room.member"]?.values ?? [])
|
||||||
final data = ref.watch(
|
.map(
|
||||||
SelectedRoomController.provider.select(
|
(eventRowId) =>
|
||||||
(value) => value?.metadata == null
|
room.events.firstWhereOrNull((event) => event.rowId == eventRowId),
|
||||||
? null
|
)
|
||||||
: (value!.metadata!.id, value.metadata!.hasMemberList),
|
.nonNulls
|
||||||
),
|
.where((member) => member.content["membership"] == "join")
|
||||||
);
|
.toIList();
|
||||||
if (data == null) return const IList.empty();
|
|
||||||
|
|
||||||
final state = await ref
|
static final provider = NotifierProvider.family
|
||||||
.watch(ClientController.provider.notifier)
|
.autoDispose<MembersController, IList<Event>, Room>(
|
||||||
.getRoomState(
|
|
||||||
GetRoomStateRequest(
|
|
||||||
roomId: data.$1,
|
|
||||||
fetchMembers: data.$2 == false,
|
|
||||||
includeMembers: true,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return state.nonNulls
|
|
||||||
.where((state) => state.type == "m.room.member")
|
|
||||||
.map(
|
|
||||||
(membership) => Membership.fromContent(
|
|
||||||
membership.content,
|
|
||||||
membership.stateKey!,
|
|
||||||
ref.watch(
|
|
||||||
ClientStateController.provider.select(
|
|
||||||
(value) => value?.homeserverUrl,
|
|
||||||
),
|
|
||||||
) ??
|
|
||||||
"",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toIList();
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider =
|
|
||||||
AsyncNotifierProvider<MembersController, IList<Membership>>(
|
|
||||||
MembersController.new,
|
MembersController.new,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
import "package:collection/collection.dart";
|
import "package:collection/collection.dart";
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
|
||||||
import "package:flutter_chat_core/flutter_chat_core.dart";
|
import "package:flutter_chat_core/flutter_chat_core.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/client_controller.dart";
|
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
import "package:nexus/controllers/client_state_controller.dart";
|
||||||
|
import "package:nexus/controllers/members_controller.dart";
|
||||||
import "package:nexus/helpers/extensions/mxc_to_https.dart";
|
import "package:nexus/helpers/extensions/mxc_to_https.dart";
|
||||||
import "package:nexus/models/configs/message_config.dart";
|
import "package:nexus/models/message_config.dart";
|
||||||
import "package:nexus/models/requests/get_related_events_request.dart";
|
|
||||||
|
|
||||||
class MessageController extends AsyncNotifier<Message?> {
|
class MessageController extends AsyncNotifier<Message?> {
|
||||||
final MessageConfig config;
|
final MessageConfig config;
|
||||||
|
|
@ -15,11 +13,11 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
@override
|
@override
|
||||||
Future<Message?> build() async {
|
Future<Message?> build() async {
|
||||||
try {
|
try {
|
||||||
final isEdit = config.event.relationType == "m.replace";
|
if (config.event.relationType == "m.replace" && !config.includeEdits) {
|
||||||
if ((isEdit && !config.includeEdits) || config.room.metadata == null) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ref.mounted) return null;
|
||||||
final event = config.event.lastEditRowId == null
|
final event = config.event.lastEditRowId == null
|
||||||
? config.event
|
? config.event
|
||||||
: config.room.events.firstWhereOrNull(
|
: config.room.events.firstWhereOrNull(
|
||||||
|
|
@ -27,11 +25,17 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
) ??
|
) ??
|
||||||
config.event;
|
config.event;
|
||||||
|
|
||||||
final decrypted = (event.decrypted ?? event.content);
|
if (!ref.mounted) return null;
|
||||||
|
|
||||||
|
final members = ref.read(MembersController.provider(config.room));
|
||||||
|
final author = members.firstWhereOrNull(
|
||||||
|
(member) => member.stateKey == event.authorId,
|
||||||
|
);
|
||||||
|
if (!ref.mounted) return null;
|
||||||
|
|
||||||
|
final content = (event.decrypted ?? event.content);
|
||||||
final type = (config.event.decryptedType ?? config.event.type);
|
final type = (config.event.decryptedType ?? config.event.type);
|
||||||
final content = decrypted["m.new_content"] == null
|
final newContent = content["m.new_content"] as Map?;
|
||||||
? decrypted
|
|
||||||
: IMap(decrypted["m.new_content"]);
|
|
||||||
|
|
||||||
final homeserver = ref
|
final homeserver = ref
|
||||||
.read(ClientStateController.provider)
|
.read(ClientStateController.provider)
|
||||||
|
|
@ -42,19 +46,25 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
|
|
||||||
final metadata = {
|
final metadata = {
|
||||||
"body": config.event.redactedBy == null
|
"body": config.event.redactedBy == null
|
||||||
? (content["body"] ?? "")
|
? (newContent?["body"] ?? content["body"] ?? "")
|
||||||
: "Deleted Message",
|
: "Deleted Message",
|
||||||
"flashing": false,
|
"flashing": false,
|
||||||
"timelineId": event.timelineRowId,
|
"timelineId": event.timelineRowId,
|
||||||
"big": event.localContent?.bigEmoji == true,
|
"big": event.localContent?.bigEmoji == true,
|
||||||
"eventType": type,
|
"eventType": type,
|
||||||
"pmp": content["com.beeper.per_message_profile"],
|
"avatarUrl": author?.content["avatar_url"],
|
||||||
"error": event.sendError,
|
"editSource":
|
||||||
"format": content["format"] ?? content["format"],
|
event.localContent?.editSource ??
|
||||||
"editSource": event.localContent?.editSource ?? content["body"],
|
newContent?["body"] ??
|
||||||
|
content["body"],
|
||||||
|
"displayName": author?.content["displayname"]?.isNotEmpty == true
|
||||||
|
? author?.content["displayname"]
|
||||||
|
: event.authorId.substring(1).split(":")[0],
|
||||||
"txnId": config.event.transactionId,
|
"txnId": config.event.transactionId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!ref.mounted) return null;
|
||||||
|
|
||||||
final editedAt = event.relationType == "m.replace"
|
final editedAt = event.relationType == "m.replace"
|
||||||
? event.timestamp
|
? event.timestamp
|
||||||
: null;
|
: null;
|
||||||
|
|
@ -65,60 +75,32 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Use server-generated preview if enabled
|
||||||
|
|
||||||
|
// final match = Uri.tryParse(
|
||||||
|
// RegExp(regexLink, caseSensitive: false).firstMatch(body)?.group(0) ?? "",
|
||||||
|
// );
|
||||||
|
|
||||||
final replyId =
|
final replyId =
|
||||||
config.event.content["m.relates_to"]?["m.in_reply_to"]?["event_id"];
|
config.event.content["m.relates_to"]?["m.in_reply_to"]?["event_id"];
|
||||||
|
|
||||||
final reactionEvents = config.event.reactions.isEmpty && !isEdit
|
|
||||||
? null
|
|
||||||
: await ref
|
|
||||||
.watch(ClientController.provider.notifier)
|
|
||||||
.getRelatedEvents(
|
|
||||||
GetRelatedEventsRequest(
|
|
||||||
roomId: config.room.metadata!.id,
|
|
||||||
eventId:
|
|
||||||
(isEdit ? config.event.relatesTo : null) ??
|
|
||||||
config.event.eventId,
|
|
||||||
relationType: "m.annotation",
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
final reactions = reactionEvents
|
|
||||||
?.where((event) => event.redactedBy == null)
|
|
||||||
.fold<IMap<String, IList<String>>>(IMap(), (acc, event) {
|
|
||||||
final key = event.content["m.relates_to"]?["key"];
|
|
||||||
if (key == null) return acc;
|
|
||||||
|
|
||||||
return acc.update(
|
|
||||||
key,
|
|
||||||
(list) => list.add(event.authorId),
|
|
||||||
ifAbsent: () => IList([event.authorId]),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
.map((key, value) => MapEntry(key, value.unlock))
|
|
||||||
.unlock;
|
|
||||||
|
|
||||||
final asText =
|
final asText =
|
||||||
Message.text(
|
Message.text(
|
||||||
metadata: metadata,
|
metadata: metadata,
|
||||||
id: config.event.eventId,
|
id: config.event.eventId,
|
||||||
reactions: reactions,
|
|
||||||
authorId: event.authorId,
|
authorId: event.authorId,
|
||||||
text: content["formatted_body"] ?? content["body"] ?? "",
|
text:
|
||||||
|
newContent?["formatted_body"] ??
|
||||||
|
newContent?["body"] ??
|
||||||
|
content["formatted_body"] ??
|
||||||
|
content["body"] ??
|
||||||
|
"",
|
||||||
replyToMessageId: replyId,
|
replyToMessageId: replyId,
|
||||||
deliveredAt: config.event.timestamp,
|
deliveredAt: config.event.timestamp,
|
||||||
editedAt: editedAt,
|
editedAt: editedAt,
|
||||||
)
|
)
|
||||||
as TextMessage;
|
as TextMessage;
|
||||||
|
|
||||||
Message toSystemMessage(String content) => Message.system(
|
|
||||||
metadata: {...metadata, "body": content},
|
|
||||||
id: config.event.eventId,
|
|
||||||
reactions: reactions,
|
|
||||||
authorId: event.authorId,
|
|
||||||
deliveredAt: config.event.timestamp,
|
|
||||||
text: content,
|
|
||||||
);
|
|
||||||
|
|
||||||
return switch (type) {
|
return switch (type) {
|
||||||
"m.room.encrypted" => asText.copyWith(
|
"m.room.encrypted" => asText.copyWith(
|
||||||
text: "Unable to decrypt message.",
|
text: "Unable to decrypt message.",
|
||||||
|
|
@ -138,7 +120,6 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
null || "m.image" => Message.image(
|
null || "m.image" => Message.image(
|
||||||
id: config.event.eventId,
|
id: config.event.eventId,
|
||||||
authorId: event.authorId,
|
authorId: event.authorId,
|
||||||
reactions: reactions,
|
|
||||||
source: source,
|
source: source,
|
||||||
replyToMessageId: replyId,
|
replyToMessageId: replyId,
|
||||||
metadata: metadata,
|
metadata: metadata,
|
||||||
|
|
@ -151,7 +132,6 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
size: content["info"]["size"],
|
size: content["info"]["size"],
|
||||||
metadata: metadata,
|
metadata: metadata,
|
||||||
id: config.event.eventId,
|
id: config.event.eventId,
|
||||||
reactions: reactions,
|
|
||||||
authorId: event.authorId,
|
authorId: event.authorId,
|
||||||
source: source,
|
source: source,
|
||||||
replyToMessageId: replyId,
|
replyToMessageId: replyId,
|
||||||
|
|
@ -162,21 +142,33 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
"m.room.member" =>
|
"m.room.member" =>
|
||||||
content["membership"] == event.unsigned["prev_content"]?["membership"]
|
content["membership"] == event.unsigned["prev_content"]?["membership"]
|
||||||
? null
|
? null
|
||||||
: toSystemMessage(
|
: Message.system(
|
||||||
"${content["displayname"] ?? event.stateKey} ${switch (content["membership"]) {
|
metadata: {
|
||||||
"invite" => "was invited to",
|
...metadata,
|
||||||
"join" => "joined",
|
"body":
|
||||||
"leave" => event.authorId == event.stateKey ? "left" : (event.unsigned["prev_content"]?["membership"] == "ban" ? "was unbanned from" : "was kicked from"),
|
"${content["displayname"] ?? event.stateKey} ${switch (content["membership"]) {
|
||||||
"ban" => "was banned from",
|
"invite" => "was invited to",
|
||||||
"knock" => "asked to join",
|
"join" => "joined",
|
||||||
_ => "did something relating to",
|
"leave" => "left",
|
||||||
}} the room. ${content["reason"] ?? ""}",
|
"knock" => "asked to join",
|
||||||
|
"ban" => "was banned from",
|
||||||
|
_ => "did something relating to",
|
||||||
|
}} the room.",
|
||||||
|
},
|
||||||
|
id: config.event.eventId,
|
||||||
|
authorId: event.authorId,
|
||||||
|
deliveredAt: config.event.timestamp,
|
||||||
|
text:
|
||||||
|
"${content["displayname"] ?? event.stateKey} ${switch (content["membership"]) {
|
||||||
|
"invite" => "was invited to",
|
||||||
|
"join" => "joined",
|
||||||
|
"leave" => "left",
|
||||||
|
"knock" => "asked to join",
|
||||||
|
"ban" => "was banned from",
|
||||||
|
_ => "did something relating to",
|
||||||
|
}} the room.",
|
||||||
),
|
),
|
||||||
|
|
||||||
"m.room.server_acl" => toSystemMessage(
|
|
||||||
"${event.authorId} updated the server ban list.",
|
|
||||||
),
|
|
||||||
|
|
||||||
"m.room.redaction" =>
|
"m.room.redaction" =>
|
||||||
config.alwaysReturn
|
config.alwaysReturn
|
||||||
? asText.copyWith(
|
? asText.copyWith(
|
||||||
|
|
@ -195,7 +187,6 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
// ignore: dead_code
|
// ignore: dead_code
|
||||||
? Message.unsupported(
|
? Message.unsupported(
|
||||||
metadata: metadata,
|
metadata: metadata,
|
||||||
reactions: reactions,
|
|
||||||
id: config.event.eventId,
|
id: config.event.eventId,
|
||||||
authorId: event.authorId,
|
authorId: event.authorId,
|
||||||
replyToMessageId: replyId,
|
replyToMessageId: replyId,
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
import "package:flutter_chat_core/flutter_chat_core.dart";
|
import "package:flutter_chat_core/flutter_chat_core.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/message_controller.dart";
|
import "package:nexus/controllers/message_controller.dart";
|
||||||
import "package:nexus/models/configs/message_config.dart";
|
import "package:nexus/models/message_config.dart";
|
||||||
import "package:nexus/models/configs/messages_config.dart";
|
import "package:nexus/models/messages_config.dart";
|
||||||
|
|
||||||
class MessagesController extends AsyncNotifier<IList<Message>> {
|
class MessagesController extends AsyncNotifier<IList<Message>> {
|
||||||
final MessagesConfig config;
|
final MessagesConfig config;
|
||||||
|
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
import "package:collection/collection.dart";
|
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
|
||||||
import "package:nexus/controllers/selected_room_controller.dart";
|
|
||||||
import "package:nexus/models/configs/power_level_config.dart";
|
|
||||||
import "package:nexus/models/requests/membership_action.dart";
|
|
||||||
|
|
||||||
class PowerLevelController extends Notifier<bool> {
|
|
||||||
final PowerLevelConfig config;
|
|
||||||
PowerLevelController(this.config);
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool build() {
|
|
||||||
final room = ref.watch(SelectedRoomController.provider);
|
|
||||||
final event = room?.events.firstWhereOrNull(
|
|
||||||
(event) => event.rowId == room.state["m.room.power_levels"]?[""],
|
|
||||||
);
|
|
||||||
final user = ref.watch(ClientStateController.provider)?.userId;
|
|
||||||
if (event == null || user == null) return false;
|
|
||||||
|
|
||||||
final users = (event.content["users"] as Map<String, dynamic>? ?? {});
|
|
||||||
final events = (event.content["events"] as Map<String, dynamic>? ?? {});
|
|
||||||
|
|
||||||
int powerLevelOf(String userId) => users.containsKey(userId)
|
|
||||||
? (users[userId] as int)
|
|
||||||
: (event.content["users_default"] as int? ?? 0);
|
|
||||||
|
|
||||||
final userLevel = powerLevelOf(user);
|
|
||||||
final targetLevel = config.targetUser != null
|
|
||||||
? powerLevelOf(config.targetUser!)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
if (config.action != null) {
|
|
||||||
return switch (config.action!) {
|
|
||||||
MembershipAction.invite =>
|
|
||||||
userLevel >= (event.content["invite"] as int? ?? 0),
|
|
||||||
|
|
||||||
MembershipAction.kick =>
|
|
||||||
targetLevel != null &&
|
|
||||||
userLevel >= (event.content["kick"] as int? ?? 50) &&
|
|
||||||
userLevel > targetLevel,
|
|
||||||
|
|
||||||
MembershipAction.ban =>
|
|
||||||
targetLevel != null &&
|
|
||||||
userLevel >= (event.content["ban"] as int? ?? 50) &&
|
|
||||||
userLevel > targetLevel,
|
|
||||||
|
|
||||||
MembershipAction.unban =>
|
|
||||||
userLevel >= (event.content["ban"] as int? ?? 50),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.eventType == "m.room.redaction") {
|
|
||||||
return userLevel >= (event.content["redact"] as int? ?? 50);
|
|
||||||
}
|
|
||||||
|
|
||||||
final requiredLevel = events.containsKey(config.eventType)
|
|
||||||
? (events[config.eventType] as int)
|
|
||||||
: (config.isStateEvent
|
|
||||||
? (event.content["state_default"] as int? ?? 50)
|
|
||||||
: (event.content["events_default"] as int? ?? 0));
|
|
||||||
|
|
||||||
return userLevel >= requiredLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider = NotifierProvider.autoDispose
|
|
||||||
.family<PowerLevelController, bool, PowerLevelConfig>(
|
|
||||||
PowerLevelController.new,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:nexus/controllers/client_controller.dart";
|
|
||||||
import "package:nexus/models/profile.dart";
|
|
||||||
|
|
||||||
class ProfileController extends AsyncNotifier<Profile> {
|
|
||||||
final String userId;
|
|
||||||
ProfileController(this.userId);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<Profile> build() {
|
|
||||||
final client = ref.watch(ClientController.provider.notifier);
|
|
||||||
return client.getProfile(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider = AsyncNotifierProvider.autoDispose
|
|
||||||
.family<ProfileController, Profile, String>(ProfileController.new);
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import "dart:async";
|
import "dart:async";
|
||||||
|
|
||||||
import "package:collection/collection.dart";
|
import "package:collection/collection.dart";
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
import "package:flutter_chat_core/flutter_chat_core.dart";
|
import "package:flutter_chat_core/flutter_chat_core.dart";
|
||||||
|
import "package:flutter_chat_core/flutter_chat_core.dart" as chat;
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:fluttertagger/fluttertagger.dart";
|
import "package:fluttertagger/fluttertagger.dart";
|
||||||
import "package:nexus/controllers/client_controller.dart";
|
import "package:nexus/controllers/client_controller.dart";
|
||||||
|
|
@ -9,15 +11,12 @@ import "package:nexus/controllers/message_controller.dart";
|
||||||
import "package:nexus/controllers/messages_controller.dart";
|
import "package:nexus/controllers/messages_controller.dart";
|
||||||
import "package:nexus/controllers/new_events_controller.dart";
|
import "package:nexus/controllers/new_events_controller.dart";
|
||||||
import "package:nexus/controllers/rooms_controller.dart";
|
import "package:nexus/controllers/rooms_controller.dart";
|
||||||
import "package:nexus/controllers/selected_room_controller.dart";
|
import "package:nexus/models/message_config.dart";
|
||||||
import "package:nexus/models/configs/messages_config.dart";
|
import "package:nexus/models/messages_config.dart";
|
||||||
import "package:nexus/models/configs/message_config.dart";
|
|
||||||
import "package:nexus/models/requests/get_related_events_request.dart";
|
|
||||||
import "package:nexus/models/requests/get_room_state_request.dart";
|
import "package:nexus/models/requests/get_room_state_request.dart";
|
||||||
import "package:nexus/models/requests/paginate_request.dart";
|
import "package:nexus/models/requests/paginate_request.dart";
|
||||||
import "package:nexus/models/requests/redact_event_request.dart";
|
import "package:nexus/models/requests/redact_event_request.dart";
|
||||||
import "package:nexus/models/relation_type.dart";
|
import "package:nexus/models/relation_type.dart";
|
||||||
import "package:nexus/models/requests/send_event_request.dart";
|
|
||||||
import "package:nexus/models/requests/send_message_request.dart";
|
import "package:nexus/models/requests/send_message_request.dart";
|
||||||
import "package:nexus/models/room.dart";
|
import "package:nexus/models/room.dart";
|
||||||
|
|
||||||
|
|
@ -30,8 +29,13 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
final client = ref.watch(ClientController.provider.notifier);
|
final client = ref.watch(ClientController.provider.notifier);
|
||||||
var room = ref.read(RoomsController.provider)[roomId];
|
var room = ref.read(RoomsController.provider)[roomId];
|
||||||
if (room == null) return InMemoryChatController();
|
if (room == null) return InMemoryChatController();
|
||||||
|
|
||||||
final state = await client.getRoomState(
|
final state = await client.getRoomState(
|
||||||
GetRoomStateRequest(roomId: roomId),
|
GetRoomStateRequest(
|
||||||
|
roomId: roomId,
|
||||||
|
fetchMembers: room.metadata?.hasMemberList == false,
|
||||||
|
includeMembers: true,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
ref
|
ref
|
||||||
|
|
@ -79,68 +83,16 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
|
|
||||||
ref.onDispose(
|
ref.onDispose(
|
||||||
ref.listen(NewEventsController.provider(roomId), (_, next) async {
|
ref.listen(NewEventsController.provider(roomId), (_, next) async {
|
||||||
|
final controller = await future;
|
||||||
for (final event in next) {
|
for (final event in next) {
|
||||||
if (event.type == "m.reaction") {
|
|
||||||
final message = controller.messages.firstWhereOrNull(
|
|
||||||
(message) =>
|
|
||||||
message.id == event.content["m.relates_to"]?["event_id"],
|
|
||||||
);
|
|
||||||
final key = event.content["m.relates_to"]?["key"];
|
|
||||||
if (message == null || key == null || !ref.mounted) return;
|
|
||||||
|
|
||||||
return await controller.updateMessage(
|
|
||||||
message,
|
|
||||||
message.copyWith(
|
|
||||||
reactions: IMap(message.reactions)
|
|
||||||
.update(
|
|
||||||
key,
|
|
||||||
(reactors) => [...reactors, event.authorId],
|
|
||||||
ifAbsent: () => [event.authorId],
|
|
||||||
)
|
|
||||||
.unlock,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.type == "m.room.redaction") {
|
if (event.type == "m.room.redaction") {
|
||||||
final controller = await future;
|
final controller = await future;
|
||||||
final redactsId = event.content["redacts"];
|
final message = controller.messages.firstWhereOrNull(
|
||||||
final originalMessage = controller.messages.firstWhereOrNull(
|
(message) => message.id == event.content["redacts"],
|
||||||
(message) => message.id == redactsId,
|
|
||||||
);
|
);
|
||||||
if (!ref.mounted) return;
|
if (message == null || !ref.mounted) return;
|
||||||
|
|
||||||
if (originalMessage != null) {
|
await controller.removeMessage(message);
|
||||||
return await controller.removeMessage(originalMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
final redacts = ref
|
|
||||||
.read(SelectedRoomController.provider)
|
|
||||||
?.events
|
|
||||||
.firstWhere((event) => event.eventId == redactsId);
|
|
||||||
|
|
||||||
if (redacts?.type == "m.reaction") {
|
|
||||||
final message = controller.messages.firstWhereOrNull(
|
|
||||||
(message) =>
|
|
||||||
message.id == redacts!.content["m.relates_to"]?["event_id"],
|
|
||||||
);
|
|
||||||
final key = redacts!.content["m.relates_to"]?["key"];
|
|
||||||
if (message == null || key == null || !ref.mounted) return;
|
|
||||||
|
|
||||||
return await controller.updateMessage(
|
|
||||||
message,
|
|
||||||
message.copyWith(
|
|
||||||
reactions: IMap(message.reactions)
|
|
||||||
.update(
|
|
||||||
key,
|
|
||||||
(reactors) =>
|
|
||||||
IList(reactors).remove(redacts.authorId).unlock,
|
|
||||||
)
|
|
||||||
.where((_, value) => value.isNotEmpty)
|
|
||||||
.unlock,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
final message = await ref.watch(
|
final message = await ref.watch(
|
||||||
MessageController.provider(
|
MessageController.provider(
|
||||||
|
|
@ -169,8 +121,12 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (message != null && ref.mounted) {
|
if (message != null &&
|
||||||
await insertMessage(message);
|
!controller.messages.any(
|
||||||
|
(oldMessage) => oldMessage.id == message.id,
|
||||||
|
) &&
|
||||||
|
ref.mounted) {
|
||||||
|
await controller.insertMessage(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -179,9 +135,9 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
|
|
||||||
ref.onDispose(controller.dispose);
|
ref.onDispose(controller.dispose);
|
||||||
|
|
||||||
// While there are under 20 messages, try up to load more messages until theres no more or we have 20 messages.
|
// While there are under 20 messages, try up to two times to load more messages.
|
||||||
for (var more = true; more == true && controller.messages.length < 20;) {
|
for (var i = 0; i < 2 && messages.length < 20; i++) {
|
||||||
more = await loadOlder(controller);
|
await loadOlder(controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
return controller;
|
return controller;
|
||||||
|
|
@ -201,13 +157,21 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
: controller.updateMessage(oldMessage, message);
|
: controller.updateMessage(oldMessage, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> deleteMessage(Message message, {String? reason}) => ref
|
Future<void> deleteMessage(Message message, {String? reason}) async {
|
||||||
.watch(ClientController.provider.notifier)
|
final controller = await future;
|
||||||
.redactEvent(
|
await controller.removeMessage(message);
|
||||||
RedactEventRequest(eventId: message.id, roomId: roomId, reason: reason),
|
await ref
|
||||||
);
|
.watch(ClientController.provider.notifier)
|
||||||
|
.redactEvent(
|
||||||
|
RedactEventRequest(
|
||||||
|
eventId: message.id,
|
||||||
|
roomId: roomId,
|
||||||
|
reason: reason,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future<bool> loadOlder([InMemoryChatController? chatController]) async {
|
Future<void> loadOlder([InMemoryChatController? chatController]) async {
|
||||||
final response = await ref
|
final response = await ref
|
||||||
.watch(ClientController.provider.notifier)
|
.watch(ClientController.provider.notifier)
|
||||||
.paginate(
|
.paginate(
|
||||||
|
|
@ -239,40 +203,38 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
const ISet.empty(),
|
const ISet.empty(),
|
||||||
addToNewEvents: false,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final room = ref.read(RoomsController.provider)[roomId];
|
final room = ref.read(RoomsController.provider)[roomId];
|
||||||
if (room != null) {
|
if (room == null) return;
|
||||||
final messages = await ref.watch(
|
|
||||||
MessagesController.provider(
|
|
||||||
MessagesConfig(room: room, events: response.events.reversed),
|
|
||||||
).future,
|
|
||||||
);
|
|
||||||
|
|
||||||
final controller = chatController ?? await future;
|
final messages = await ref.watch(
|
||||||
await controller.insertAllMessages(
|
MessagesController.provider(
|
||||||
messages
|
MessagesConfig(room: room, events: response.events.reversed),
|
||||||
.where(
|
).future,
|
||||||
(newMessage) => !controller.messages.any(
|
);
|
||||||
(message) => message.id == newMessage.id,
|
|
||||||
),
|
final controller = chatController ?? await future;
|
||||||
)
|
await controller.insertAllMessages(
|
||||||
.toList(),
|
messages
|
||||||
index: 0,
|
.where(
|
||||||
);
|
(newMessage) => !controller.messages.any(
|
||||||
}
|
(message) => message.id == newMessage.id,
|
||||||
return response.hasMore;
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
index: 0,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> send(
|
Future<void> send(
|
||||||
String text, {
|
String message, {
|
||||||
bool shouldMention = true,
|
bool shouldMention = true,
|
||||||
required IList<Tag> tags,
|
required Iterable<Tag> tags,
|
||||||
required RelationType relationType,
|
required RelationType relationType,
|
||||||
Message? relation,
|
Message? relation,
|
||||||
}) async {
|
}) async {
|
||||||
var taggedMessage = text;
|
var taggedMessage = message;
|
||||||
|
|
||||||
for (final tag in tags) {
|
for (final tag in tags) {
|
||||||
final escaped = RegExp.escape(tag.id);
|
final escaped = RegExp.escape(tag.id);
|
||||||
|
|
@ -285,8 +247,7 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
}
|
}
|
||||||
|
|
||||||
final client = ref.watch(ClientController.provider.notifier);
|
final client = ref.watch(ClientController.provider.notifier);
|
||||||
final room = ref.read(RoomsController.provider)[roomId];
|
client.sendMessage(
|
||||||
final event = await client.sendMessage(
|
|
||||||
SendMessageRequest(
|
SendMessageRequest(
|
||||||
roomId: roomId,
|
roomId: roomId,
|
||||||
mentions: Mentions(
|
mentions: Mentions(
|
||||||
|
|
@ -304,15 +265,21 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
: Relation(eventId: relation.id, relationType: relationType),
|
: Relation(eventId: relation.id, relationType: relationType),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final message = room == null
|
}
|
||||||
? null
|
|
||||||
: await ref.watch(
|
|
||||||
MessageController.provider(
|
|
||||||
MessageConfig(room: room, event: event),
|
|
||||||
).future,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (message != null) insertMessage(message);
|
Future<chat.User> resolveUser(String id) async {
|
||||||
|
final user = await ref
|
||||||
|
.watch(ClientController.provider.notifier)
|
||||||
|
.getProfile(id);
|
||||||
|
return chat.User(
|
||||||
|
id: id,
|
||||||
|
name: user.displayName,
|
||||||
|
// imageSource: user.avatarUrl == null
|
||||||
|
// ? null
|
||||||
|
// : (await ref.watch(
|
||||||
|
// AvatarController.provider(user.avatarUrl!.toString()).future,
|
||||||
|
// )).toString(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> scrollToMessage(Message message) async {
|
Future<void> scrollToMessage(Message message) async {
|
||||||
|
|
@ -330,59 +297,6 @@ class RoomChatController extends AsyncNotifier<InMemoryChatController> {
|
||||||
return await controller.scrollToMessage(message.id);
|
return await controller.scrollToMessage(message.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> removeReaction(
|
|
||||||
String reaction,
|
|
||||||
Message message,
|
|
||||||
String userId,
|
|
||||||
) async {
|
|
||||||
final client = ref.watch(ClientController.provider.notifier);
|
|
||||||
final allReactionEvents = await client.getRelatedEvents(
|
|
||||||
GetRelatedEventsRequest(
|
|
||||||
roomId: roomId,
|
|
||||||
eventId: message.id,
|
|
||||||
relationType: "m.annotation",
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
final reactionEvents = allReactionEvents
|
|
||||||
?.where((event) => event.redactedBy == null)
|
|
||||||
.toIList();
|
|
||||||
|
|
||||||
final reactionEvent = reactionEvents?.firstWhereOrNull(
|
|
||||||
(event) =>
|
|
||||||
event.authorId == userId &&
|
|
||||||
event.content["m.relates_to"]?["key"] == reaction,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (reactionEvent != null) {
|
|
||||||
await ref
|
|
||||||
.watch(ClientController.provider.notifier)
|
|
||||||
.redactEvent(
|
|
||||||
RedactEventRequest(eventId: reactionEvent.eventId, roomId: roomId),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> sendReaction(String reaction, Message message) async {
|
|
||||||
final client = ref.watch(ClientController.provider.notifier);
|
|
||||||
|
|
||||||
await client.sendEvent(
|
|
||||||
SendEventRequest(
|
|
||||||
roomId: roomId,
|
|
||||||
type: "m.reaction",
|
|
||||||
content: {
|
|
||||||
"m.relates_to": {
|
|
||||||
"event_id": message.id,
|
|
||||||
"rel_type": "m.annotation",
|
|
||||||
"key": reaction,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
synchronous: true,
|
|
||||||
disableEncryption: true,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider = AsyncNotifierProvider.family
|
static final provider = AsyncNotifierProvider.family
|
||||||
.autoDispose<RoomChatController, InMemoryChatController, String>(
|
.autoDispose<RoomChatController, InMemoryChatController, String>(
|
||||||
RoomChatController.new,
|
RoomChatController.new,
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
import "package:collection/collection.dart";
|
import "package:collection/collection.dart";
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
|
||||||
import "package:nexus/controllers/new_events_controller.dart";
|
import "package:nexus/controllers/new_events_controller.dart";
|
||||||
import "package:nexus/helpers/extensions/mxc_to_https.dart";
|
|
||||||
import "package:nexus/models/read_receipt.dart";
|
import "package:nexus/models/read_receipt.dart";
|
||||||
import "package:nexus/models/room.dart";
|
import "package:nexus/models/room.dart";
|
||||||
|
|
||||||
|
|
@ -11,18 +9,7 @@ class RoomsController extends Notifier<IMap<String, Room>> {
|
||||||
@override
|
@override
|
||||||
IMap<String, Room> build() => const IMap.empty();
|
IMap<String, Room> build() => const IMap.empty();
|
||||||
|
|
||||||
void update(
|
void update(IMap<String, Room> rooms, ISet<String> leftRooms) {
|
||||||
IMap<String, Room> rooms,
|
|
||||||
ISet<String> leftRooms, {
|
|
||||||
bool addToNewEvents = true,
|
|
||||||
}) {
|
|
||||||
final homeserver =
|
|
||||||
ref.watch(
|
|
||||||
ClientStateController.provider.select(
|
|
||||||
(value) => value?.homeserverUrl,
|
|
||||||
),
|
|
||||||
) ??
|
|
||||||
"";
|
|
||||||
final merged = rooms.entries.fold(state, (acc, entry) {
|
final merged = rooms.entries.fold(state, (acc, entry) {
|
||||||
final roomId = entry.key;
|
final roomId = entry.key;
|
||||||
final incoming = entry.value;
|
final incoming = entry.value;
|
||||||
|
|
@ -33,32 +20,23 @@ class RoomsController extends Notifier<IMap<String, Room>> {
|
||||||
(item) => item.eventId,
|
(item) => item.eventId,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (addToNewEvents) {
|
ref
|
||||||
ref
|
.watch(NewEventsController.provider(roomId).notifier)
|
||||||
.watch(NewEventsController.provider(roomId).notifier)
|
.add(
|
||||||
.add(
|
incoming.timeline
|
||||||
incoming.timeline
|
.map(
|
||||||
.map(
|
(timelineTuple) => events?.firstWhereOrNull(
|
||||||
(timelineTuple) => events?.firstWhereOrNull(
|
(event) => timelineTuple.eventRowId == event.rowId,
|
||||||
(event) => timelineTuple.eventRowId == event.rowId,
|
),
|
||||||
),
|
)
|
||||||
)
|
.nonNulls
|
||||||
.nonNulls
|
.toIList(),
|
||||||
.toIList(),
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return acc.add(
|
return acc.add(
|
||||||
roomId,
|
roomId,
|
||||||
existing?.copyWith(
|
existing?.copyWith(
|
||||||
hasMore: incoming.hasMore,
|
metadata: incoming.metadata ?? existing.metadata,
|
||||||
metadata:
|
|
||||||
incoming.metadata?.copyWith(
|
|
||||||
avatar:
|
|
||||||
incoming.metadata?.avatar?.mxcToHttps(homeserver) ??
|
|
||||||
existing.metadata?.avatar,
|
|
||||||
) ??
|
|
||||||
existing.metadata,
|
|
||||||
events: events!,
|
events: events!,
|
||||||
state: incoming.state.entries.fold(
|
state: incoming.state.entries.fold(
|
||||||
existing.state,
|
existing.state,
|
||||||
|
|
@ -88,11 +66,7 @@ class RoomsController extends Notifier<IMap<String, Room>> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) ??
|
) ??
|
||||||
incoming.copyWith(
|
incoming,
|
||||||
metadata: incoming.metadata?.copyWith(
|
|
||||||
avatar: incoming.metadata?.avatar?.mxcToHttps(homeserver),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import "package:collection/collection.dart";
|
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
|
|
@ -100,37 +99,15 @@ class SpacesController extends Notifier<IList<Space>> {
|
||||||
.toIList();
|
.toIList();
|
||||||
|
|
||||||
return <Space>[
|
return <Space>[
|
||||||
Space(
|
Space(id: "home", title: "Home", icon: Icons.home, children: homeRooms),
|
||||||
id: "home",
|
Space(
|
||||||
title: "Home",
|
id: "dms",
|
||||||
icon: Icons.home,
|
title: "Direct Messages",
|
||||||
children: homeRooms,
|
icon: Icons.people,
|
||||||
),
|
children: dmRooms,
|
||||||
Space(
|
),
|
||||||
id: "dms",
|
...topLevelSpacesList,
|
||||||
title: "Direct Messages",
|
].toIList();
|
||||||
icon: Icons.people,
|
|
||||||
children: dmRooms,
|
|
||||||
),
|
|
||||||
...topLevelSpacesList,
|
|
||||||
]
|
|
||||||
.map(
|
|
||||||
(space) => space.copyWith(
|
|
||||||
children: space.children
|
|
||||||
.sortedBy(
|
|
||||||
(element) =>
|
|
||||||
element
|
|
||||||
.metadata
|
|
||||||
?.sortingTimestamp
|
|
||||||
.millisecondsSinceEpoch ??
|
|
||||||
0,
|
|
||||||
)
|
|
||||||
.sortedBy((room) => room.metadata?.unreadMessages ?? 0)
|
|
||||||
.reversed
|
|
||||||
.toIList(),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toIList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static final provider = NotifierProvider<SpacesController, IList<Space>>(
|
static final provider = NotifierProvider<SpacesController, IList<Space>>(
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,11 @@
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/main.dart";
|
|
||||||
import "package:nexus/models/sync_status.dart";
|
import "package:nexus/models/sync_status.dart";
|
||||||
|
|
||||||
class SyncStatusController extends Notifier<SyncStatus?> {
|
class SyncStatusController extends Notifier<SyncStatus?> {
|
||||||
@override
|
@override
|
||||||
Null build() => null;
|
Null build() => null;
|
||||||
|
|
||||||
void set(SyncStatus newStatus) {
|
void set(SyncStatus newStatus) => state = newStatus;
|
||||||
if (newStatus.type == SyncStatusType.permanentlyFailed) {
|
|
||||||
showError(newStatus.error ?? "Syncing failed");
|
|
||||||
}
|
|
||||||
state = newStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider = NotifierProvider<SyncStatusController, SyncStatus?>(
|
static final provider = NotifierProvider<SyncStatusController, SyncStatus?>(
|
||||||
SyncStatusController.new,
|
SyncStatusController.new,
|
||||||
|
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
import "dart:convert";
|
|
||||||
import "package:flutter_chat_core/flutter_chat_core.dart";
|
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:http/http.dart";
|
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
|
||||||
import "package:nexus/controllers/header_controller.dart";
|
|
||||||
import "package:nexus/helpers/extensions/mxc_to_https.dart";
|
|
||||||
|
|
||||||
class UrlPreviewController extends AsyncNotifier<LinkPreviewData?> {
|
|
||||||
final String link;
|
|
||||||
UrlPreviewController(this.link);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<LinkPreviewData?> build() async {
|
|
||||||
final homeserver = ref.watch(ClientStateController.provider)?.homeserverUrl;
|
|
||||||
|
|
||||||
if (homeserver != null && !link.contains("matrix.to")) {
|
|
||||||
{
|
|
||||||
final response = await get(
|
|
||||||
Uri.parse(homeserver)
|
|
||||||
.resolve("/_matrix/client/v1/media/preview_url")
|
|
||||||
.replace(queryParameters: {"url": link}),
|
|
||||||
headers: await ref.watch(HeaderController.provider.future),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
final decodedValue = json.decode(response.body);
|
|
||||||
final mxc = decodedValue["og:image"];
|
|
||||||
final image = mxc == null
|
|
||||||
? null
|
|
||||||
: Uri.tryParse(mxc)?.mxcToHttps(homeserver);
|
|
||||||
|
|
||||||
return LinkPreviewData(
|
|
||||||
link: link,
|
|
||||||
title: decodedValue["og:title"],
|
|
||||||
description: decodedValue["og:description"],
|
|
||||||
image: image == null
|
|
||||||
? null
|
|
||||||
: ImagePreviewData(
|
|
||||||
url: image.toString(),
|
|
||||||
width:
|
|
||||||
(decodedValue["og:image:width"] as int?)?.toDouble() ??
|
|
||||||
0,
|
|
||||||
height:
|
|
||||||
(decodedValue["og:image:height"] as int?)?.toDouble() ??
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider = AsyncNotifierProvider.autoDispose
|
|
||||||
.family<UrlPreviewController, LinkPreviewData?, String>(
|
|
||||||
UrlPreviewController.new,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
import "dart:async";
|
|
||||||
import "package:collection/collection.dart";
|
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:nexus/controllers/members_controller.dart";
|
|
||||||
import "package:nexus/controllers/profile_controller.dart";
|
|
||||||
import "package:nexus/helpers/extensions/get_localpart.dart";
|
|
||||||
import "package:nexus/models/membership.dart";
|
|
||||||
import "package:nexus/models/membership_status.dart";
|
|
||||||
|
|
||||||
class UserController extends AsyncNotifier<Membership?> {
|
|
||||||
final String userId;
|
|
||||||
UserController(this.userId);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<Membership?> build() async {
|
|
||||||
final member = await ref.watch(
|
|
||||||
MembersController.provider.selectAsync(
|
|
||||||
(value) =>
|
|
||||||
value.firstWhereOrNull((membership) => membership.userId == userId),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (member != null) return member;
|
|
||||||
|
|
||||||
final profile = await ref.watch(ProfileController.provider(userId).future);
|
|
||||||
return Membership(
|
|
||||||
status: MembershipStatus.leave,
|
|
||||||
avatarUrl: profile.avatarUrl == null
|
|
||||||
? null
|
|
||||||
: Uri.tryParse(profile.avatarUrl!),
|
|
||||||
displayName: profile.displayName ?? userId.localpart,
|
|
||||||
userId: userId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider =
|
|
||||||
AsyncNotifierProvider.family<UserController, Membership?, String>(
|
|
||||||
UserController.new,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
import "package:collection/collection.dart";
|
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
|
||||||
import "package:nexus/models/room.dart";
|
|
||||||
|
|
||||||
class ViaController extends Notifier<String> {
|
|
||||||
final Room room;
|
|
||||||
ViaController(this.room);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String build() {
|
|
||||||
final servers = <String>{};
|
|
||||||
|
|
||||||
void addUserId(String? userId) {
|
|
||||||
final server = userId?.split(":").lastOrNull;
|
|
||||||
if (server != null) {
|
|
||||||
servers.add(server);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
addUserId(ref.watch(ClientStateController.provider)?.userId);
|
|
||||||
|
|
||||||
final powerLevels = room.events.firstWhereOrNull(
|
|
||||||
(event) => event.rowId == room.state["m.room.power_levels"]?[""],
|
|
||||||
);
|
|
||||||
|
|
||||||
for (final userId in IMap(powerLevels?.content["users"]).keys) {
|
|
||||||
addUserId(userId);
|
|
||||||
if (servers.length >= 5) break;
|
|
||||||
}
|
|
||||||
|
|
||||||
final members = room.state["m.room.member"]?.values.toIList();
|
|
||||||
for (var i = 0; servers.length < 5; i++) {
|
|
||||||
final member = room.events.firstWhereOrNull(
|
|
||||||
(event) => event.rowId == members?.getOrNull(i),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (member?.content["membership"] == "join") {
|
|
||||||
addUserId(member?.stateKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (members?.getOrNull(i) == null) break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return servers.isEmpty
|
|
||||||
? ""
|
|
||||||
: "?${servers.map((server) => "via=$server").join("&")}";
|
|
||||||
}
|
|
||||||
|
|
||||||
static final provider = NotifierProvider.family<ViaController, String, Room>(
|
|
||||||
ViaController.new,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
extension GetLocalpart on String {
|
|
||||||
String get localpart => substring(1).split(":").first;
|
|
||||||
}
|
|
||||||
90
lib/helpers/extensions/join_room_with_snackbars.dart
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
import "package:collection/collection.dart";
|
||||||
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
|
import "package:flutter/material.dart";
|
||||||
|
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||||
|
import "package:nexus/controllers/client_controller.dart";
|
||||||
|
import "package:nexus/controllers/key_controller.dart";
|
||||||
|
import "package:nexus/controllers/spaces_controller.dart";
|
||||||
|
import "package:nexus/helpers/extensions/link_to_mention.dart";
|
||||||
|
import "package:nexus/models/requests/join_room_request.dart";
|
||||||
|
|
||||||
|
extension JoinRoomWithSnackbars on ClientController {
|
||||||
|
Future<void> joinRoomWithSnackBars(
|
||||||
|
BuildContext context,
|
||||||
|
String roomAlias,
|
||||||
|
WidgetRef ref,
|
||||||
|
) async {
|
||||||
|
final roomIdOrAlias = roomAlias.mention ?? roomAlias;
|
||||||
|
|
||||||
|
final scaffoldMessenger = ScaffoldMessenger.of(context);
|
||||||
|
|
||||||
|
final snackbar = scaffoldMessenger.showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text("Joining room $roomIdOrAlias."),
|
||||||
|
duration: Duration(days: 999),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
try {
|
||||||
|
final id = await joinRoom(
|
||||||
|
JoinRoomRequest(
|
||||||
|
roomIdOrAlias: roomIdOrAlias,
|
||||||
|
via: IList(Uri.tryParse(roomAlias)?.queryParametersAll["via"] ?? []),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
snackbar.close();
|
||||||
|
|
||||||
|
scaffoldMessenger.showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text("Room $roomIdOrAlias successfully joined."),
|
||||||
|
action: SnackBarAction(
|
||||||
|
label: "Open",
|
||||||
|
onPressed: () async {
|
||||||
|
final spaces = ref.watch(SpacesController.provider);
|
||||||
|
final space = spaces.firstWhereOrNull((space) => space.id == id);
|
||||||
|
|
||||||
|
await ref
|
||||||
|
.watch(
|
||||||
|
KeyController.provider(KeyController.spaceKey).notifier,
|
||||||
|
)
|
||||||
|
.set(
|
||||||
|
space?.id ??
|
||||||
|
spaces
|
||||||
|
.firstWhere(
|
||||||
|
(space) => space.children.any(
|
||||||
|
(child) => child.metadata?.id == id,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.id,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (space == null) {
|
||||||
|
await ref
|
||||||
|
.watch(
|
||||||
|
KeyController.provider(KeyController.roomKey).notifier,
|
||||||
|
)
|
||||||
|
.set(id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
snackbar.close();
|
||||||
|
if (context.mounted) {
|
||||||
|
scaffoldMessenger.showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
||||||
|
content: Text(
|
||||||
|
error.toString(),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.onErrorContainer,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -30,8 +30,7 @@ extension LinkToMention on String {
|
||||||
final identifier = uri.pathSegments.last;
|
final identifier = uri.pathSegments.last;
|
||||||
if (identifier.isNotEmpty) {
|
if (identifier.isNotEmpty) {
|
||||||
return "${switch (uri.pathSegments.firstOrNull) {
|
return "${switch (uri.pathSegments.firstOrNull) {
|
||||||
"r" => "#",
|
"r" || "roomid" => "#",
|
||||||
"roomid" => "!",
|
|
||||||
"u" => "@",
|
"u" => "@",
|
||||||
_ => "",
|
_ => "",
|
||||||
}}${Uri.decodeComponent(identifier)}";
|
}}${Uri.decodeComponent(identifier)}";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
extension MxcToHttps on Uri {
|
extension MxcToHttps on Uri {
|
||||||
Uri mxcToHttps(String homeserver) => Uri.parse(
|
Uri mxcToHttps(String homeserver) =>
|
||||||
homeserver,
|
Uri.parse("${homeserver}_matrix/client/v1/media/download/$host$path");
|
||||||
).resolve("_matrix/client/v1/media/download/$host$path");
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,8 @@ extension SchemeToTheme on ColorScheme {
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
backgroundColor: surfaceContainerLow,
|
backgroundColor: surfaceContainerLow,
|
||||||
),
|
),
|
||||||
menuTheme: MenuThemeData(
|
|
||||||
style: MenuStyle(
|
|
||||||
backgroundColor: WidgetStatePropertyAll(primaryContainer),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
textTheme: ThemeData(
|
textTheme: ThemeData(
|
||||||
fontFamilyFallback: ["sans", "emoji"],
|
fontFamilyFallback: ["sans"],
|
||||||
brightness: brightness,
|
brightness: brightness,
|
||||||
).textTheme,
|
).textTheme,
|
||||||
inputDecorationTheme: const InputDecorationTheme(
|
inputDecorationTheme: const InputDecorationTheme(
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ extension ShowContextMenu on BuildContext {
|
||||||
|
|
||||||
showMenu(
|
showMenu(
|
||||||
context: this,
|
context: this,
|
||||||
constraints: BoxConstraints.loose(Size.infinite),
|
|
||||||
position: RelativeRect.fromLTRB(
|
position: RelativeRect.fromLTRB(
|
||||||
globalPosition.dx,
|
globalPosition.dx,
|
||||||
globalPosition.dy,
|
globalPosition.dy,
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
import "package:flutter/material.dart";
|
|
||||||
import "package:nexus/helpers/extensions/show_context_menu.dart";
|
|
||||||
import "package:nexus/models/membership.dart";
|
|
||||||
import "package:nexus/widgets/chat_page/user_popover.dart";
|
|
||||||
|
|
||||||
extension ShowUserPopover on BuildContext {
|
|
||||||
void showUserPopover(Membership member, {required Offset globalPosition}) =>
|
|
||||||
showContextMenu(
|
|
||||||
globalPosition: globalPosition,
|
|
||||||
children: [
|
|
||||||
PopupMenuItem(
|
|
||||||
enabled: false,
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
||||||
child: IconTheme(data: IconThemeData(), child: UserPopover(member)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -5,6 +5,7 @@ import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/client_controller.dart";
|
import "package:nexus/controllers/client_controller.dart";
|
||||||
import "package:nexus/controllers/client_state_controller.dart";
|
import "package:nexus/controllers/client_state_controller.dart";
|
||||||
import "package:nexus/controllers/header_controller.dart";
|
import "package:nexus/controllers/header_controller.dart";
|
||||||
|
import "package:nexus/controllers/init_complete_controller.dart";
|
||||||
import "package:nexus/controllers/multi_provider_controller.dart";
|
import "package:nexus/controllers/multi_provider_controller.dart";
|
||||||
import "package:nexus/controllers/shared_prefs_controller.dart";
|
import "package:nexus/controllers/shared_prefs_controller.dart";
|
||||||
import "package:nexus/helpers/extensions/better_when.dart";
|
import "package:nexus/helpers/extensions/better_when.dart";
|
||||||
|
|
@ -17,6 +18,7 @@ import "package:nexus/widgets/loading.dart";
|
||||||
import "package:window_manager/window_manager.dart";
|
import "package:window_manager/window_manager.dart";
|
||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:dynamic_system_colors/dynamic_system_colors.dart";
|
import "package:dynamic_system_colors/dynamic_system_colors.dart";
|
||||||
|
import "package:window_size/window_size.dart";
|
||||||
|
|
||||||
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
||||||
|
|
||||||
|
|
@ -57,11 +59,14 @@ void showError(Object error, [StackTrace? stackTrace]) {
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) {
|
await windowManager.ensureInitialized();
|
||||||
await windowManager.ensureInitialized();
|
await windowManager.waitUntilReadyToShow(
|
||||||
await windowManager.waitUntilReadyToShow(
|
WindowOptions(titleBarStyle: TitleBarStyle.hidden),
|
||||||
WindowOptions(titleBarStyle: TitleBarStyle.hidden),
|
);
|
||||||
);
|
|
||||||
|
if (Platform.isLinux) {
|
||||||
|
setWindowMinSize(const Size.square(500));
|
||||||
|
} else {
|
||||||
await windowManager.setMinimumSize(Size.square(500));
|
await windowManager.setMinimumSize(Size.square(500));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -126,7 +131,9 @@ class App extends StatelessWidget {
|
||||||
} else if (!clientState.isVerified) {
|
} else if (!clientState.isVerified) {
|
||||||
return VerifyPage();
|
return VerifyPage();
|
||||||
} else {
|
} else {
|
||||||
return ChatPage();
|
return ref.watch(InitCompleteController.provider)
|
||||||
|
? ChatPage()
|
||||||
|
: Loading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
import "package:freezed_annotation/freezed_annotation.dart";
|
|
||||||
import "package:nexus/models/requests/membership_action.dart";
|
|
||||||
part "power_level_config.freezed.dart";
|
|
||||||
part "power_level_config.g.dart";
|
|
||||||
|
|
||||||
@freezed
|
|
||||||
abstract class PowerLevelConfig with _$PowerLevelConfig {
|
|
||||||
const factory PowerLevelConfig({
|
|
||||||
@Default(false) bool isStateEvent,
|
|
||||||
required String eventType,
|
|
||||||
MembershipAction? action,
|
|
||||||
String? targetUser,
|
|
||||||
}) = _PowerLevelConfig;
|
|
||||||
|
|
||||||
factory PowerLevelConfig.fromJson(Map<String, Object?> json) =>
|
|
||||||
_$PowerLevelConfigFromJson(json);
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
|
||||||
import "package:freezed_annotation/freezed_annotation.dart";
|
|
||||||
part "emoji.freezed.dart";
|
|
||||||
part "emoji.g.dart";
|
|
||||||
|
|
||||||
@freezed
|
|
||||||
abstract class Emoji with _$Emoji {
|
|
||||||
const factory Emoji({
|
|
||||||
required String emoji,
|
|
||||||
required String category,
|
|
||||||
required IList<String> aliases,
|
|
||||||
required String description,
|
|
||||||
required IList<String> tags,
|
|
||||||
}) = _Emoji;
|
|
||||||
|
|
||||||
factory Emoji.fromJson(Map<String, Object?> json) => _$EmojiFromJson(json);
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
|
||||||
import "package:freezed_annotation/freezed_annotation.dart";
|
|
||||||
import "package:nexus/helpers/extensions/mxc_to_https.dart";
|
|
||||||
import "package:nexus/models/membership_status.dart";
|
|
||||||
part "membership.freezed.dart";
|
|
||||||
|
|
||||||
@freezed
|
|
||||||
abstract class Membership with _$Membership {
|
|
||||||
const Membership._();
|
|
||||||
const factory Membership({
|
|
||||||
required MembershipStatus status,
|
|
||||||
required Uri? avatarUrl,
|
|
||||||
required String displayName,
|
|
||||||
required String userId,
|
|
||||||
}) = _Membership;
|
|
||||||
|
|
||||||
factory Membership.fromContent(
|
|
||||||
IMap<String, dynamic> content,
|
|
||||||
String userId,
|
|
||||||
String homeserver,
|
|
||||||
) => Membership(
|
|
||||||
status: MembershipStatus.values.firstWhere(
|
|
||||||
(status) => status.name == content["membership"],
|
|
||||||
orElse: () => MembershipStatus.leave,
|
|
||||||
),
|
|
||||||
avatarUrl: Uri.tryParse(
|
|
||||||
content["avatar_url"] ?? "",
|
|
||||||
)?.mxcToHttps(homeserver),
|
|
||||||
userId: userId,
|
|
||||||
displayName: content["displayname"] ?? userId.substring(1).split(":").first,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
import "package:freezed_annotation/freezed_annotation.dart";
|
|
||||||
|
|
||||||
@JsonEnum()
|
|
||||||
enum MembershipStatus { leave, invite, ban, join }
|
|
||||||
|
|
@ -18,10 +18,10 @@ abstract class MessageConfig with _$MessageConfig {
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
other.runtimeType == runtimeType &&
|
other.runtimeType == runtimeType &&
|
||||||
other is MessageConfig &&
|
other is MessageConfig &&
|
||||||
other.event == event;
|
other.event.eventId == event.eventId;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, event);
|
int get hashCode => Object.hash(runtimeType, event.eventId);
|
||||||
|
|
||||||
factory MessageConfig.fromJson(Map<String, Object?> json) =>
|
factory MessageConfig.fromJson(Map<String, Object?> json) =>
|
||||||
_$MessageConfigFromJson(json);
|
_$MessageConfigFromJson(json);
|
||||||