diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-21 16:53:17 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-11-21 16:53:17 +0000 |
| commit | f79014235e85554e3661b3f2a02b8fa88bc192ff (patch) | |
| tree | fceec3ff2df212148a3420af7cef81a3f818463e /src/bin/ngit/sub_commands/list.rs | |
| parent | 91b0eac4daf92b7b740267ef203a1a8ba591974b (diff) | |
feat(login): overhaul login experience
* simplify login menu, making it more accessable to newcomers and
easier to select remote signer options
* enable `ngit login` to work from anywhere (not just a git repo)
* assume fresh login details saved to global git config but fallback
to local repository
* maintain local repository login via `ngit login --local`
* maintain login via CLI arguments eg `ngit send --nsec nsec123`
* nudge users to remember nsec when pasting in ncryptsec for a
better UX, whilst maintaining the option to be prompted for
password everytime
* create placeholder menu items for help menu and create account
Diffstat (limited to 'src/bin/ngit/sub_commands/list.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/list.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/ngit/sub_commands/list.rs b/src/bin/ngit/sub_commands/list.rs index 351896a..7717dce 100644 --- a/src/bin/ngit/sub_commands/list.rs +++ b/src/bin/ngit/sub_commands/list.rs | |||
| @@ -12,7 +12,7 @@ use nostr_sdk::Kind; | |||
| 12 | use crate::{ | 12 | use crate::{ |
| 13 | cli_interactor::{Interactor, InteractorPrompt, PromptChoiceParms, PromptConfirmParms}, | 13 | cli_interactor::{Interactor, InteractorPrompt, PromptChoiceParms, PromptConfirmParms}, |
| 14 | client::{ | 14 | client::{ |
| 15 | fetching_with_report, get_events_from_cache, get_repo_ref_from_cache, Client, Connect, | 15 | fetching_with_report, get_events_from_local_cache, get_repo_ref_from_cache, Client, Connect, |
| 16 | }, | 16 | }, |
| 17 | git::{str_to_sha1, Repo, RepoActions}, | 17 | git::{str_to_sha1, Repo, RepoActions}, |
| 18 | git_events::{ | 18 | git_events::{ |
| @@ -37,7 +37,7 @@ pub async fn launch() -> Result<()> { | |||
| 37 | 37 | ||
| 38 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; | 38 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; |
| 39 | 39 | ||
| 40 | let repo_ref = get_repo_ref_from_cache(git_repo_path, &repo_coordinates).await?; | 40 | let repo_ref = get_repo_ref_from_cache(Some(git_repo_path), &repo_coordinates).await?; |
| 41 | 41 | ||
| 42 | let proposals_and_revisions: Vec<nostr::Event> = | 42 | let proposals_and_revisions: Vec<nostr::Event> = |
| 43 | get_proposals_and_revisions_from_cache(git_repo_path, repo_ref.coordinates()).await?; | 43 | get_proposals_and_revisions_from_cache(git_repo_path, repo_ref.coordinates()).await?; |
| @@ -47,7 +47,7 @@ pub async fn launch() -> Result<()> { | |||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | let statuses: Vec<nostr::Event> = { | 49 | let statuses: Vec<nostr::Event> = { |
| 50 | let mut statuses = get_events_from_cache( | 50 | let mut statuses = get_events_from_local_cache( |
| 51 | git_repo_path, | 51 | git_repo_path, |
| 52 | vec![ | 52 | vec![ |
| 53 | nostr::Filter::default() | 53 | nostr::Filter::default() |