diff --git a/crates/skillpouch/src/commands/logout.rs b/crates/skillpouch/src/commands/logout.rs index 349398c..2a3d6ed 100644 --- a/crates/skillpouch/src/commands/logout.rs +++ b/crates/skillpouch/src/commands/logout.rs @@ -29,7 +29,7 @@ pub async fn forget(ctx: &Context, credentials: Credentials) -> Result<()> { if !revoked { ui::warn(format!( "Couldn't reach the server. Remove this computer on your Devices page: {}", - ui::accent(format!("{}/app/account/devices", credentials.api_url)) + ui::accent(format!("{}/account/devices", credentials.api_url)) )); } Ok(()) diff --git a/crates/skillpouch/src/notify.rs b/crates/skillpouch/src/notify.rs index c5b4b33..f8a84c5 100644 --- a/crates/skillpouch/src/notify.rs +++ b/crates/skillpouch/src/notify.rs @@ -137,7 +137,7 @@ mod tests { status.conflicts = 2; let (title, body) = news(&mut status, "https://x").unwrap_or_default(); assert_eq!(title, "SkillPouch: 2 items changed in two places"); - assert!(body.ends_with("https://x/app/p/p1/conflicts"), "{body}"); + assert!(body.ends_with("https://x/pouches/p1/conflicts"), "{body}"); assert_eq!(news(&mut status, "https://x"), None); // Resolved, then a new one: told again. status.conflicts = 0; diff --git a/crates/skillpouch/src/sync.rs b/crates/skillpouch/src/sync.rs index d28ef5c..cd73656 100644 --- a/crates/skillpouch/src/sync.rs +++ b/crates/skillpouch/src/sync.rs @@ -180,7 +180,7 @@ fn backups_dir(ctx: &Context) -> PathBuf { /// Where the web app resolves a pouch's conflicts. pub fn conflicts_path(pouch_id: &str) -> String { - format!("/app/p/{pouch_id}/conflicts") + format!("/pouches/{pouch_id}/conflicts") } /// `1 item`, `3 items`. diff --git a/crates/sp-tui/src/app.rs b/crates/sp-tui/src/app.rs index 6bfe829..7ccacb8 100644 --- a/crates/sp-tui/src/app.rs +++ b/crates/sp-tui/src/app.rs @@ -350,15 +350,15 @@ impl App { /// Where `o` goes from the current tab. fn web_path(&self) -> String { match self.tab { - Tab::Overview => "/app".into(), - Tab::Usage => "/app/account/usage".into(), + Tab::Overview => "/pouches".into(), + Tab::Usage => "/account/usage".into(), Tab::Pouches => self .dashboard() .and_then(|d| d.pouches.get(self.cursor(Tab::Pouches))) - .map_or("/app".into(), |pouch| format!("/app/p/{}", pouch.id)), - Tab::Sync => "/app".into(), - Tab::Computers => "/app/account/devices".into(), - Tab::Account => "/app/account".into(), + .map_or("/pouches".into(), |pouch| format!("/pouches/{}", pouch.id)), + Tab::Sync => "/pouches".into(), + Tab::Computers => "/account/devices".into(), + Tab::Account => "/account".into(), } } @@ -496,8 +496,8 @@ impl App { KeyCode::Enter if self.tab == Tab::Account => { match AccountAction::ALL.get(self.cursor(Tab::Account)) { Some(AccountAction::SetUp) => Outcome::Send(Request::Setup), - Some(AccountAction::OpenAccount) => self.open("/app/account"), - Some(AccountAction::OpenBilling) => self.open("/app/account/billing"), + Some(AccountAction::OpenAccount) => self.open("/account"), + Some(AccountAction::OpenBilling) => self.open("/account/billing"), Some(AccountAction::Logout) => { self.confirm_logout = true; Outcome::Nothing @@ -760,7 +760,7 @@ pub(crate) mod tests { assert_eq!( press(&mut app, KeyCode::Char('o')), Outcome::Send(Request::Open( - "https://app.skillpouch.net/app/p/0193ab12-0000-7000-8000-000000000002".into() + "https://app.skillpouch.net/pouches/0193ab12-0000-7000-8000-000000000002".into() )) ); } diff --git a/crates/sp-tui/src/model.rs b/crates/sp-tui/src/model.rs index 5162093..adf3c70 100644 --- a/crates/sp-tui/src/model.rs +++ b/crates/sp-tui/src/model.rs @@ -166,7 +166,7 @@ pub enum Request { }, /// Make this pouch the one this computer syncs. UsePouch(String), - /// Open a web app path (`/app/account`) in the browser. + /// Open a web app path (`/account`) in the browser. Open(String), /// Look at this computer's assistants and set it up. Setup, diff --git a/crates/sp-tui/src/view/mod.rs b/crates/sp-tui/src/view/mod.rs index d4c5cab..29914ff 100644 --- a/crates/sp-tui/src/view/mod.rs +++ b/crates/sp-tui/src/view/mod.rs @@ -335,7 +335,7 @@ pub(crate) mod tests { detail: Some( "1 item changed in two places: press c to pick versions in the web app".into(), ), - conflicts: Some("/app/p/p1/conflicts".into()), + conflicts: Some("/pouches/p1/conflicts".into()), }))); contains_all( &screen(&app, 120, 40), @@ -344,7 +344,7 @@ pub(crate) mod tests { let key = KeyEvent::new(KeyCode::Char('c'), KeyModifiers::NONE); assert!(matches!( app.on_key(key), - crate::app::Outcome::Send(crate::model::Request::Open(url)) if url == "https://app.skillpouch.net/app/p/p1/conflicts" + crate::app::Outcome::Send(crate::model::Request::Open(url)) if url == "https://app.skillpouch.net/pouches/p1/conflicts" )); }