Repository navigation
Reorganize Home ribbon with Locate dropdown and direct data access #932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
92e2205
6bf4bf0
19e3ad6
245c3eb
c06f467
1c36ae7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| //! Project items: folder connections, map and layer files, styles, project templates, packages, | ||
| //! layer templates, tasks, and 3D export (Home › Project; Data › Layer Templates and Styles; Share › | ||
| //! Package, Save As and Output). | ||
| //! layer templates, tasks, and 3D export (Home › Add; Data › Layer Templates and Styles; Publish › | ||
| //! Package, Save As and Output; Command Search for map/template imports). | ||
|
|
||
| use std::fmt::Write as _; | ||
| use std::path::Path; | ||
|
|
@@ -21,7 +21,7 @@ const MAX_FILE: u64 = 512 << 20; | |
| pub fn commands() -> Vec<C> { | ||
| vec![ | ||
| // Folder connections. | ||
| C::new("project.addFolder", "Add Folder", "Home › Project", |s, p| { | ||
| C::new("project.addFolder", "Add Folder", "Home › Add › Add Data", |s, p| { | ||
| let path = ps(p, "path").map(str::trim).filter(|p| !p.is_empty()).ok_or("path is required")?; | ||
| if !cfg!(target_arch = "wasm32") && !Path::new(path).is_dir() { | ||
| return Err(format!("{path} isn't a folder")); | ||
|
|
@@ -56,7 +56,7 @@ pub fn commands() -> Vec<C> { | |
| C::new("map.save", "Save Map File", "Publish › Save As", |s, p| save_item(s, "map", p)) | ||
| .view() | ||
| .params(r#"{"path": "*.rgismap", "map"?: name}"#), | ||
| C::new("map.import", "Import", "Home › Project", import_maps).params(r#"{"path": "*.rgismap|*.rgis|*.rgispkg" | "text": map file JSON | "data": base64 file}"#), | ||
| C::new("map.import", "Import", "Command Search", import_maps).params(r#"{"path": "*.rgismap|*.rgis|*.rgispkg" | "text": map file JSON | "data": base64 file}"#), | ||
|
deniial00 marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Command Search" is not a ribbon location, unlike the other values in this field. Command Search probably shows it as-is, and any check that a location names a real tab or group would fail. The same applies to |
||
| C::new("layer.save", "Save Layer File", "Publish › Save As", |s, p| save_item(s, "layer", p)) | ||
| .view() | ||
| .when(need_layer) | ||
|
|
@@ -172,10 +172,10 @@ pub fn commands() -> Vec<C> { | |
| C::new("project.saveTemplate", "Save Project Template", "Publish › Save As", |s, p| save_item(s, "template", p)) | ||
| .view() | ||
| .params(r#"{"path": "*.rgistemplate", "name"?: template name}"#), | ||
| C::new("project.newTemplate", "New Custom Template", "Home › Project", |s, p| save_item(s, "template", p)) | ||
| C::new("project.newTemplate", "New Custom Template", "Publish › Save As", |s, p| save_item(s, "template", p)) | ||
| .view() | ||
| .params(r#"{"path": "*.rgistemplate", "name"?: template name}"#), | ||
| C::new("project.fromTemplate", "Open Custom Template", "Home › Project", |s, p| { | ||
| C::new("project.fromTemplate", "Open Custom Template", "Command Search", |s, p| { | ||
| let text = read_text(p)?; | ||
| super::connections::clear_active(); | ||
| let mut proj = match Project::from_import_json(&text, None) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.