forked from akai/readest
7da41a65ad
Add a resizable home-screen widget on iOS and Android showing recent
in-progress books with cover, reading progress, and tap-to-open.
- One responsive widget: Android resizable 1x1 to 4x3 (one book per
column, up to 3); iOS Small/Medium/Large families. Covers are cropped,
rounded, with a percent badge and a progress bar (baked into the bitmap
on Android, SwiftUI overlays on iOS).
- TTS controls (previous, play-pause, next) appear in 2+ row sizes when
TTS is active, wired to the existing media session. Reading progress
stays live during background TTS via a fraction computed from the baked
offline locations.
- Publishes a snapshot plus downsized cover thumbnails to the iOS App
Group and Android SharedPreferences through a new update_reading_widget
native-bridge command; refresh is debounced and driven by library and
progress changes, TTS, and app backgrounding.
- Tapping a cover opens readest://book/{hash}, switching the reader in
place when one is already open.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
49 lines
1.8 KiB
TOML
49 lines
1.8 KiB
TOML
[package]
|
|
name = "tauri-plugin-native-bridge"
|
|
version = "0.1.0"
|
|
authors = [ "You" ]
|
|
description = "a bridge between tauri app and native OS functionality"
|
|
edition = "2021"
|
|
# `keyring-core` v1 and the per-platform store crates require Rust
|
|
# 1.85 (apple-native) / 1.88 (windows-native, dbus-secret-service).
|
|
# Bumping the floor here so cargo lets them compile.
|
|
rust-version = "1.88"
|
|
exclude = ["/examples", "/dist-js", "/guest-js", "/node_modules"]
|
|
links = "tauri-plugin-native-bridge"
|
|
|
|
[dependencies]
|
|
tauri = { version = "2" }
|
|
serde = "1.0"
|
|
thiserror = "2"
|
|
schemars = "0.8"
|
|
|
|
[dev-dependencies]
|
|
serde_json = "1"
|
|
|
|
[build-dependencies]
|
|
tauri-plugin = { version = "2", features = ["build"] }
|
|
schemars = "0.8"
|
|
|
|
[target.'cfg(any(target_os = "macos", windows, target_os = "linux"))'.dependencies]
|
|
font-enumeration = "0.9.0"
|
|
# OS-keychain backed secret storage for the sync passphrase. The
|
|
# `keyring` crate v4 was demoted to a sample CLI app; the library
|
|
# moved to `keyring-core` v1 plus a separate per-platform credential
|
|
# store crate. We register the right store at plugin init time
|
|
# (see `desktop.rs`). iOS / Android take a different path entirely:
|
|
# Swift's Security framework + Android's EncryptedSharedPreferences,
|
|
# dispatched via mobile.rs.
|
|
keyring-core = "1"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
apple-native-keyring-store = { version = "1", features = ["keychain"] }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
windows-native-keyring-store = "1"
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
# `vendored` statically links libdbus + openssl so we don't depend on
|
|
# the host distribution's versions, mirroring the previous
|
|
# `sync-secret-service` feature on keyring v3.
|
|
dbus-secret-service-keyring-store = { version = "1", features = ["crypto-rust", "vendored"] }
|