This commit is contained in:
+32
-2
@@ -1,4 +1,6 @@
|
||||
use rabby_core::Workspace;
|
||||
use rabby_core::{
|
||||
demo_dashboard, wallet_feature_summary, WalletDashboard, WalletFeatureStatus, Workspace,
|
||||
};
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
@@ -7,6 +9,13 @@ struct FeatureRow {
|
||||
detail: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct WalletFeatureRow {
|
||||
feature: &'static str,
|
||||
acceptance: &'static str,
|
||||
status: WalletFeatureStatus,
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn workspace_summary() -> Vec<FeatureRow> {
|
||||
Workspace::feature_matrix()
|
||||
@@ -15,9 +24,30 @@ fn workspace_summary() -> Vec<FeatureRow> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn wallet_mvp_summary() -> Vec<WalletFeatureRow> {
|
||||
wallet_feature_summary()
|
||||
.into_iter()
|
||||
.map(|(feature, acceptance, status)| WalletFeatureRow {
|
||||
feature,
|
||||
acceptance,
|
||||
status,
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn wallet_dashboard() -> WalletDashboard {
|
||||
demo_dashboard()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![workspace_summary])
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
workspace_summary,
|
||||
wallet_mvp_summary,
|
||||
wallet_dashboard
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("failed to run Rabby Tauri application");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user