mirror of
https://github.com/hoornet/vega.git
synced 2026-06-16 01:39:44 -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.
48 lines
1.1 KiB
JSON
48 lines
1.1 KiB
JSON
{
|
|
"$schema": "https://schema.tauri.app/config/2",
|
|
"productName": "Vega",
|
|
"version": "0.12.11",
|
|
"identifier": "com.hoornet.vega",
|
|
"build": {
|
|
"beforeDevCommand": "npm run dev",
|
|
"devUrl": "http://localhost:1420",
|
|
"beforeBuildCommand": "npm run build",
|
|
"frontendDist": "../dist"
|
|
},
|
|
"app": {
|
|
"windows": [
|
|
{
|
|
"title": "Vega",
|
|
"width": 1200,
|
|
"height": 800,
|
|
"minWidth": 900,
|
|
"minHeight": 600
|
|
}
|
|
],
|
|
"security": {
|
|
"csp": null
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": ["deb", "rpm", "nsis", "msi", "dmg"],
|
|
"createUpdaterArtifacts": true,
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/128x128@2x.png",
|
|
"icons/icon.icns",
|
|
"icons/icon.ico"
|
|
]
|
|
},
|
|
"plugins": {
|
|
"updater": {
|
|
"endpoints": [
|
|
"https://github.com/hoornet/vega/releases/latest/download/latest.json"
|
|
],
|
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEY5RDJDMzkyOTc1OTI2NTIKUldSU0psbVhrc1BTK2NTcE9ybm1VcG1KU2VicmJUMWd4TmVTMzNYL1M3ZnhCQWIvU2R2V2V3Tm0K",
|
|
"dialog": false
|
|
}
|
|
}
|
|
}
|