Skip to content

Commit 7c2b24d

Browse files
committed
feat: add installed path variable
1 parent 875a250 commit 7c2b24d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/js/types/meta.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface NavigationDataStatus {
99
installedFormat: string | null
1010
installedRegion: string | null
1111
installedCycle: string | null
12+
installedPath: string | null
1213
validityPeriod: string | null
1314
lastestCycle: string | null
1415
}

src/wasm/src/meta.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ pub struct NavigationDataStatus {
2929
pub installed_revision: Option<String>,
3030
#[serde(rename = "installedCycle")]
3131
pub installed_cycle: Option<String>,
32+
#[serde(rename = "installedPath")]
33+
pub install_path: Option<String>,
3234
#[serde(rename = "validityPeriod")]
3335
pub validity_period: Option<String>,
3436
#[serde(rename = "latestCycle")]
@@ -152,6 +154,11 @@ pub fn get_navigation_data_install_status(task: Rc<RefCell<Task>>) {
152154
Some(installed_cycle_info) => Some(installed_cycle_info.cycle.clone()),
153155
None => None,
154156
},
157+
install_path: match status {
158+
InstallStatus::Manual => Some(consts::NAVIGATION_DATA_DOWNLOADED_LOCATION.to_string()),
159+
InstallStatus::Bundled => Some(consts::NAVIGATION_DATA_DEFAULT_LOCATION.to_string()),
160+
InstallStatus::None => None,
161+
},
155162
validity_period: match &installed_cycle_info {
156163
Some(installed_cycle_info) => Some(installed_cycle_info.validity_period.clone()),
157164
None => None,

0 commit comments

Comments
 (0)