Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI

on:
push:
branches: ["master", "main"]
pull_request:
branches: ["master", "main"]

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
fmt:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt

- name: Format check
run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Clippy check
run: cargo clippy --all-targets --no-deps -- -D warnings

test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Run tests
run: cargo test

build:
name: Build (release)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Build release
run: cargo build --release
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-2026 Internet Privacy Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,37 @@ src/
| `Enter` | Send message |
| `Esc` | Stop composing |

### Group detail

| Key | Action |
| --------- | ------------------- |
| `j` / `k` | Navigate members |
| `a` | Search & add member |
| `A` | Add by pubkey/npub |
| `x` | Remove member |
| `R` | Rename group |
| `L` | Leave group |
| `Esc` | Back |

### Profile

| Key | Action |
| --------- | ---------------- |
| `n` | Edit name |
| `a` | Edit about |
| `j` / `k` | Navigate follows |
| `d` | Unfollow |
| `Esc` | Back |

### User search

| Key | Action |
| --------- | ----------------- |
| `Enter` | Search |
| `↑` / `↓` | Navigate results |
| `Tab` | Follow / Unfollow |
| `Esc` | Back |

## License

TBD
MIT License
18 changes: 18 additions & 0 deletions src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ pub enum Action {
SettingsUpdateSuccess(String),
SettingsUpdateError(String),

// Follows
FollowsLoaded(Vec<Value>),
FollowSuccess(String),
FollowError(String),

// User search
SearchResult(Value),
SearchStreamEnded,
Expand Down Expand Up @@ -153,6 +158,19 @@ pub enum Effect {
value: String,
},

// Follows
LoadFollows {
account: String,
},
FollowUser {
account: String,
pubkey: String,
},
UnfollowUser {
account: String,
pubkey: String,
},

// User search
SearchUsers {
account: String,
Expand Down
Loading