| ... | @@ -39,6 +39,8 @@ pub enum Action { | ... | @@ -39,6 +39,8 @@ pub enum Action { |
| 39 | Fold(String), | 39 | Fold(String), |
| 40 | NewNotebook, | 40 | NewNotebook, |
| 41 | OpenNotebook, | 41 | OpenNotebook, |
| | 42 | #[cfg(feature = "live")] |
| | 43 | OpenShared, |
| 42 | /// Signs in again to the notebook opened from its server at this location. | 44 | /// Signs in again to the notebook opened from its server at this location. |
| 43 | SignIn(String), | 45 | SignIn(String), |
| 44 | Options, | 46 | Options, |
| ... | @@ -273,6 +275,13 @@ fn sidebar( | ... | @@ -273,6 +275,13 @@ fn sidebar( |
| 273 | "Open Existing", | 275 | "Open Existing", |
| 274 | Action::OpenNotebook, | 276 | Action::OpenNotebook, |
| 275 | ), | 277 | ), |
| | 278 | #[cfg(feature = "live")] |
| | 279 | ( |
| | 280 | "shared", |
| | 281 | Leading::Icon(art::LINK), |
| | 282 | "Open Shared…", |
| | 283 | Action::OpenShared, |
| | 284 | ), |
| 276 | ( | 285 | ( |
| 277 | "options", | 286 | "options", |
| 278 | Leading::Icon(art::OPTIONS), | 287 | Leading::Icon(art::OPTIONS), |
| ... | @@ -843,6 +852,8 @@ impl crate::State { | ... | @@ -843,6 +852,8 @@ impl crate::State { |
| 843 | Some(Action::Renamed(keep)) => self.finish_renaming(keep), | 852 | Some(Action::Renamed(keep)) => self.finish_renaming(keep), |
| 844 | Some(Action::NewNotebook) => self.commands.push(crate::Command::NewNotebook), | 853 | Some(Action::NewNotebook) => self.commands.push(crate::Command::NewNotebook), |
| 845 | Some(Action::OpenNotebook) => self.commands.push(crate::Command::OpenNotebook), | 854 | Some(Action::OpenNotebook) => self.commands.push(crate::Command::OpenNotebook), |
| | 855 | #[cfg(feature = "live")] |
| | 856 | Some(Action::OpenShared) => self.open_shared(), |
| 846 | Some(Action::SignIn(location)) => self | 857 | Some(Action::SignIn(location)) => self |
| 847 | .commands | 858 | .commands |
| 848 | .push(crate::Command::OpenFromServer(Some(location))), | 859 | .push(crate::Command::OpenFromServer(Some(location))), |
| ... | @@ -1252,12 +1263,6 @@ impl crate::State { | ... | @@ -1252,12 +1263,6 @@ impl crate::State { |
| 1252 | "Open Existing", | 1263 | "Open Existing", |
| 1253 | crate::Command::OpenNotebook, | 1264 | crate::Command::OpenNotebook, |
| 1254 | ), | 1265 | ), |
| 1255 | ( | | |
| 1256 | "server", | | |
| 1257 | Leading::Icon(art::SERVER), | | |
| 1258 | "Open Notebook from Server…", | | |
| 1259 | crate::Command::OpenFromServer(None), | | |
| 1260 | ), | | |
| 1261 | #[cfg(feature = "live")] | 1266 | #[cfg(feature = "live")] |
| 1262 | ( | 1267 | ( |
| 1263 | "shared", | 1268 | "shared", |
| ... | @@ -1265,6 +1270,12 @@ impl crate::State { | ... | @@ -1265,6 +1270,12 @@ impl crate::State { |
| 1265 | "Open Shared Notebook…", | 1270 | "Open Shared Notebook…", |
| 1266 | crate::Command::OpenShared, | 1271 | crate::Command::OpenShared, |
| 1267 | ), | 1272 | ), |
| | 1273 | ( |
| | 1274 | "server", |
| | 1275 | Leading::Icon(art::SERVER), |
| | 1276 | "Open Notebook from Server…", |
| | 1277 | crate::Command::OpenFromServer(None), |
| | 1278 | ), |
| 1268 | ] | 1279 | ] |
| 1269 | .into_iter() | 1280 | .into_iter() |
| 1270 | .chain(crate::guide::OFFERED.then_some(( | 1281 | .chain(crate::guide::OFFERED.then_some(( |