Replace process.rs
This commit is contained in:
parent
c6ebf97339
commit
abf9bbf0cd
@ -1,7 +1,11 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{json, Value};
|
||||
use tsify::Tsify;
|
||||
use std::fmt::DebugStruct;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tsify::Tsify;
|
||||
use serde_json::{json, Value};
|
||||
use sp_backend::silentpayments::sending::SilentPaymentAddress;
|
||||
|
||||
|
||||
pub const HTML_CREATE_ID: &str = "
|
||||
<div class='card'>
|
||||
@ -318,41 +322,16 @@ pub const CSS: &str = "
|
||||
}
|
||||
";
|
||||
|
||||
// process member (gestionnaire for now)
|
||||
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
||||
pub enum Role {
|
||||
Manager,
|
||||
#[default]
|
||||
User,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default, Tsify, Clone)]
|
||||
#[tsify(into_wasm_abi)]
|
||||
pub struct ItemMember {
|
||||
pub role: Role, //gestionnaire
|
||||
pub sp_address: String,
|
||||
//pre_id
|
||||
//shard
|
||||
//priv_key_mainnet_spend
|
||||
//priv_key_mainnet_scan
|
||||
//priv_key_signet_scan
|
||||
}
|
||||
|
||||
impl ItemMember {
|
||||
pub fn new(role: Role, sp_address: String) -> Self {
|
||||
ItemMember { role, sp_address }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Default, Tsify)]
|
||||
#[tsify(into_wasm_abi, from_wasm_abi)]
|
||||
pub struct Process {
|
||||
pub id: u32,
|
||||
pub name: String,
|
||||
pub version: String,
|
||||
pub members: Vec<ItemMember>,
|
||||
pub html: String,
|
||||
pub members: Vec<String>,
|
||||
pub html:String,
|
||||
pub style: String,
|
||||
pub script: String,
|
||||
//item_name : String,
|
||||
}
|
||||
// Add conditions : process, member, peer, artefact
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user