Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Move ` AppState` to `radicle-types`
Sebastian Martinez committed 1 year ago
commit b7b71ccb11f50b5862501a5a11d8450726092b90
parent f5d559158b0ce6e102f9a992f05dcb79d538c413
2 files changed +28 -25
modified crates/radicle-tauri/src/lib.rs
@@ -6,34 +6,10 @@ use tauri::Manager;
use radicle::node::Handle;
use radicle::Node;
use radicle_types::error::Error;
-
use radicle_types::traits::auth::Auth;
-
use radicle_types::traits::cobs::Cobs;
-
use radicle_types::traits::issue::{Issues, IssuesMut};
-
use radicle_types::traits::patch::{Patches, PatchesMut};
-
use radicle_types::traits::repo::Repo;
-
use radicle_types::traits::thread::Thread;
-
use radicle_types::traits::Profile;
+
use radicle_types::AppState;

use commands::{auth, cob, diff, profile, repo, thread};

-
struct AppState {
-
    profile: radicle::Profile,
-
}
-

-
impl Auth for AppState {}
-
impl Repo for AppState {}
-
impl Thread for AppState {}
-
impl Cobs for AppState {}
-
impl Issues for AppState {}
-
impl IssuesMut for AppState {}
-
impl Patches for AppState {}
-
impl PatchesMut for AppState {}
-
impl Profile for AppState {
-
    fn profile(&self) -> radicle::Profile {
-
        self.profile.clone()
-
    }
-
}
-

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    #[cfg(debug_assertions)]
modified crates/radicle-types/src/lib.rs
@@ -1,5 +1,32 @@
+
use traits::auth::Auth;
+
use traits::cobs::Cobs;
+
use traits::issue::{Issues, IssuesMut};
+
use traits::patch::{Patches, PatchesMut};
+
use traits::repo::Repo;
+
use traits::thread::Thread;
+
use traits::Profile;
+

pub mod cobs;
pub mod config;
pub mod error;
pub mod repo;
+
pub mod test;
pub mod traits;
+

+
pub struct AppState {
+
    pub profile: radicle::Profile,
+
}
+

+
impl Auth for AppState {}
+
impl Repo for AppState {}
+
impl Thread for AppState {}
+
impl Cobs for AppState {}
+
impl Issues for AppState {}
+
impl IssuesMut for AppState {}
+
impl Patches for AppState {}
+
impl PatchesMut for AppState {}
+
impl Profile for AppState {
+
    fn profile(&self) -> radicle::Profile {
+
        self.profile.clone()
+
    }
+
}