mirror of
https://github.com/hoornet/vega.git
synced 2026-07-13 12:08:13 -07:00
7e998be45b
The app now behaves coherently for users without a signer (fully logged
out, or signed in with an npub). No broken Publish buttons, no dead-end
"Not logged in" toasts.
- Add useCanSign() hook in src/stores/user.ts as the single source of
truth for write-capability. Captures both "no pubkey" and
"npub-only login" states.
- ReadOnlyBanner now fires for both states (was only "no pubkey" before).
- Hide account-bound sidebar entries (Bookmarks, Messages, Notifications,
Zaps, V4V) in read-only mode. Read-only-OK views (Feed, Articles, Media,
Podcasts, Search, Follows, Relays, Settings, Support) stay visible.
- Guard every write surface, two patterns:
- Hide inline UI: ComposeBox, InlineReplyBox, NoteActions row, NoteCard
context menu, ArticleFeed "Write article", FollowsView per-row
follow/unfollow, ThreadView root reply, PollWidget vote controls,
RelaysView "Publish list", PodcastPlayerBar ShareButton.
- "Sign in to X" CTA: ArticleEditor publish, QuoteModal post, ZapModal,
EditProfileForm save. CTAs open LoginModal.
- ProfileView edit/follow/mute/zap/DM buttons each gated by canSign.
- ArticleView like/repost/comment/bookmark/zap each gated by canSign.
- Belt-and-suspenders runtime guards in user store follow/unfollow.
Bookmark / mute stores already swallow publish errors via .catch(() => {}),
so they don't need explicit runtime guards.
43 lines
1.4 KiB
TOML
43 lines
1.4 KiB
TOML
[package]
|
|
name = "vega"
|
|
version = "0.12.11"
|
|
description = "Cross-platform Nostr desktop client with Lightning integration"
|
|
authors = ["hoornet"]
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[lib]
|
|
# The `_lib` suffix may seem redundant but it is necessary
|
|
# to make the lib name unique and wouldn't conflict with the bin name.
|
|
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
|
name = "vega_lib"
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[dependencies]
|
|
tauri = { version = "2", features = ["devtools", "tray-icon"] }
|
|
tauri-plugin-opener = "2"
|
|
tauri-plugin-updater = "2"
|
|
tauri-plugin-process = "2"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
keyring = { version = "3", features = ["apple-native", "windows-native", "linux-native"] }
|
|
rusqlite = { version = "0.32", features = ["bundled"] }
|
|
tauri-plugin-http = "2.5.7"
|
|
tauri-plugin-dialog = "2.7.0"
|
|
tauri-plugin-fs = "2.5.0"
|
|
tauri-plugin-notification = "2.3.3"
|
|
tokio = { version = "1", features = ["rt-multi-thread", "net", "sync", "macros", "time"] }
|
|
tokio-tungstenite = "0.24"
|
|
secp256k1 = { version = "0.30", features = ["global-context"] }
|
|
sha2 = "0.10"
|
|
hex = "0.4"
|
|
futures-util = "0.3"
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
webkit2gtk = "2.0"
|
|
|