Skip to content

Commit

Permalink
Changing to the last version of the IS
Browse files Browse the repository at this point in the history
  • Loading branch information
Raduc4 committed Jan 22, 2024
1 parent 68a6f0e commit 84905d9
Show file tree
Hide file tree
Showing 13 changed files with 205 additions and 423 deletions.
580 changes: 183 additions & 397 deletions components/common/Layout/Layout.tsx

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions components/ui/workspacesBar/WorkspaceBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import React, { Dispatch, SetStateAction } from 'react';
import { setCurrentServer } from 'redux/slices/streamHandler.slice';
import clsx from 'clsx';

function WorkspaceBar({
onOpen,
}: {
onOpen: Dispatch<SetStateAction<boolean>>;
}) {
function WorkspaceBar({}: {}) {
const sessions = useAppSelector(
(state: RootState) => state.context.sessions.current_sessions
);
Expand All @@ -22,11 +18,11 @@ function WorkspaceBar({
return (
<div
id="workspace"
className="overflow-scroll h-screen w-20 px-2 bg-gray-900 border-r-[1px] border-r-[#8aa29e] pt-5 grid "
className="overflow-scroll px-2 bg-[#2A2A2C] border-r-[1px] border-r-[#8aa29e] pt-5 grid "
>
<div className="mx-auto flex flex-col gap-y-[12px]">
<div className="mx-auto flex gap-y-[12px]">
<span
onClick={() => onOpen(true)}
// onClick={() => onOpen(true)}
className="inline-flex h-12 w-12 items-center cursor-pointer justify-center rounded-full bg-[#8aa29e] text-center"
>
<span className="text-xl font-medium leading-none text-white">+</span>
Expand Down
10 changes: 5 additions & 5 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ name = "citadel_workspace_ui_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

[build-dependencies]
tauri-build = { version = "2.0.0-alpha", features = [] }
tauri-build = { version = "2.0.0-alpha.14", features = [] }

[dependencies]
tauri = { version = "2.0.0-alpha", features = [] }
tauri = { version = "2.0.0-alpha.21", features = [] }
tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.28.2", features = ["net", "rt", "macros"] }
bincode2 = "2.0.1"
bytes = "1.4.0"
uuid = { version = "1.3.4" }
citadel_workspace_types = {version="0.1.0", git="https://github.com/Avarok-Cybersecurity/citadel-workspace-core.git", package="citadel_workspace_types"}
citadel_workspace_lib= {version="0.1.0", git="https://github.com/Avarok-Cybersecurity/citadel-workspace-core.git", package="citadel_workspace_lib" }
citadel-internal-service-types = {version="0.1.0", git="https://github.com/Avarok-Cybersecurity/citadel-workspace-core.git", package="citadel-internal-service-types"}
citadel-internal-service-connector= {version="0.1.0", git="https://github.com/Avarok-Cybersecurity/citadel-workspace-core.git", package="citadel-internal-service-connector" }
futures = "0.3.28"
tokio-util = { version = "0.7.8", default-features = false }
citadel_logging = { version = "0.7.0", default-features = false }
# tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
# tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
log = "^0.4"

[features]
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/connect.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use citadel_workspace_types::InternalServiceRequest::Connect;
use citadel_internal_service_types::InternalServiceRequest::Connect;
use futures::SinkExt;
use tauri::State;

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/disconnect.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::structs::ConnectionState;
use citadel_workspace_types::InternalServiceRequest::Disconnect;
use citadel_internal_service_types::InternalServiceRequest::Disconnect;
use futures::SinkExt;
use tauri::State;

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/get_session.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::structs::ConnectionState;
use citadel_workspace_types::InternalServiceRequest;
use citadel_internal_service_types::InternalServiceRequest;
use futures::SinkExt;
use tauri::State;
use uuid::Uuid;
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/list_all_peers.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use citadel_workspace_types::InternalServiceRequest::ListAllPeers;
use citadel_internal_service_types::InternalServiceRequest::ListAllPeers;
use futures::SinkExt;
use tauri::State;
use uuid::Uuid;
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/message.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use citadel_workspace_types::InternalServiceRequest::Message;
use citadel_internal_service_types::InternalServiceRequest::Message;
use futures::SinkExt;
use tauri::State;

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/peer_connect.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use citadel_workspace_types::InternalServiceRequest::PeerConnect;
use citadel_internal_service_types::InternalServiceRequest::PeerConnect;
use futures::SinkExt;
use tauri::State;
use uuid::Uuid;
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/peer_disconnect.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::structs::ConnectionState;
use citadel_workspace_types::InternalServiceRequest::PeerDisconnect;
use citadel_internal_service_types::InternalServiceRequest::PeerDisconnect;
use futures::SinkExt;
use tauri::State;
use uuid::Uuid;
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/peer_register.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use citadel_workspace_types::InternalServiceRequest::PeerRegister;
use citadel_internal_service_types::InternalServiceRequest::PeerRegister;
use futures::SinkExt;
use tauri::State;
use uuid::Uuid;
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/register.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::structs::ConnectionState;
use citadel_workspace_types::InternalServiceRequest;
use citadel_internal_service_types::InternalServiceRequest;
use futures::SinkExt;
use std::net::SocketAddr;
use std::str::FromStr;
Expand Down
8 changes: 4 additions & 4 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
mod commands;
mod helpers;
mod structs;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
use crate::structs::ConnectionState;
use bytes::BytesMut;
use citadel_internal_service_connector::util::wrap_tcp_conn;
use citadel_internal_service_types::{InternalServiceResponse, ServiceConnectionAccepted};
use citadel_logging::{error, setup_log};
use citadel_workspace_lib::wrap_tcp_conn;
use citadel_workspace_types::{InternalServiceResponse, ServiceConnectionAccepted};
use commands::{
connect::connect, disconnect::disconnect, get_session::get_sessions,
list_all_peers::list_all_peers, message::message, peer_connect::peer_connect,
Expand All @@ -15,6 +13,7 @@ use commands::{
use futures::StreamExt;
use std::error::Error;
use std::time::Duration;
use structs::ConnectionState;
use tauri::{Manager, State};
use tokio::net::TcpStream;
use tokio::time::timeout;
Expand Down Expand Up @@ -78,6 +77,7 @@ async fn open_tcp_conn(
}
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.manage(ConnectionState {
Expand Down

0 comments on commit 84905d9

Please sign in to comment.