Compare commits
2 Commits
3b6fc80578
...
main
Author | SHA1 | Date | |
---|---|---|---|
ac11f91d79
|
|||
8e76e8d1e2
|
@@ -11,7 +11,7 @@ use lanspread_db::db::{Game, GameDB};
|
|||||||
use lanspread_mdns::{LANSPREAD_INSTANCE_NAME, LANSPREAD_SERVICE_TYPE, discover_service};
|
use lanspread_mdns::{LANSPREAD_INSTANCE_NAME, LANSPREAD_SERVICE_TYPE, discover_service};
|
||||||
use tauri::{AppHandle, Emitter as _, Manager};
|
use tauri::{AppHandle, Emitter as _, Manager};
|
||||||
use tauri_plugin_shell::{ShellExt, process::Command};
|
use tauri_plugin_shell::{ShellExt, process::Command};
|
||||||
use tokio::sync::{Mutex, RwLock, mpsc::UnboundedSender};
|
use tokio::sync::{RwLock, mpsc::UnboundedSender};
|
||||||
|
|
||||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ struct LanSpreadState {
|
|||||||
server_addr: RwLock<Option<SocketAddr>>,
|
server_addr: RwLock<Option<SocketAddr>>,
|
||||||
client_ctrl: UnboundedSender<ClientCommand>,
|
client_ctrl: UnboundedSender<ClientCommand>,
|
||||||
games: Arc<RwLock<GameDB>>,
|
games: Arc<RwLock<GameDB>>,
|
||||||
games_in_download: Arc<Mutex<HashSet<String>>>,
|
games_in_download: Arc<RwLock<HashSet<String>>>,
|
||||||
games_folder: Arc<RwLock<String>>,
|
games_folder: Arc<RwLock<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ fn request_games(state: tauri::State<LanSpreadState>) {
|
|||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
fn install_game(id: String, state: tauri::State<LanSpreadState>) -> bool {
|
fn install_game(id: String, state: tauri::State<LanSpreadState>) -> bool {
|
||||||
let already_in_download = tauri::async_runtime::block_on(async {
|
let already_in_download = tauri::async_runtime::block_on(async {
|
||||||
if state.inner().games_in_download.lock().await.contains(&id) {
|
if state.inner().games_in_download.read().await.contains(&id) {
|
||||||
log::warn!("Game is already downloading: {id}");
|
log::warn!("Game is already downloading: {id}");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ pub fn run() {
|
|||||||
server_addr: RwLock::new(None),
|
server_addr: RwLock::new(None),
|
||||||
client_ctrl: tx_client_control,
|
client_ctrl: tx_client_control,
|
||||||
games: Arc::new(RwLock::new(GameDB::empty())),
|
games: Arc::new(RwLock::new(GameDB::empty())),
|
||||||
games_in_download: Arc::new(Mutex::new(HashSet::new())),
|
games_in_download: Arc::new(RwLock::new(HashSet::new())),
|
||||||
games_folder: Arc::new(RwLock::new(String::new())),
|
games_folder: Arc::new(RwLock::new(String::new())),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -416,7 +416,7 @@ pub fn run() {
|
|||||||
.state::<LanSpreadState>()
|
.state::<LanSpreadState>()
|
||||||
.inner()
|
.inner()
|
||||||
.games_in_download
|
.games_in_download
|
||||||
.lock()
|
.write()
|
||||||
.await
|
.await
|
||||||
.insert(id.clone());
|
.insert(id.clone());
|
||||||
|
|
||||||
@@ -434,7 +434,7 @@ pub fn run() {
|
|||||||
.state::<LanSpreadState>()
|
.state::<LanSpreadState>()
|
||||||
.inner()
|
.inner()
|
||||||
.games_in_download
|
.games_in_download
|
||||||
.lock()
|
.write()
|
||||||
.await
|
.await
|
||||||
.remove(&id.clone());
|
.remove(&id.clone());
|
||||||
|
|
||||||
@@ -467,7 +467,7 @@ pub fn run() {
|
|||||||
.state::<LanSpreadState>()
|
.state::<LanSpreadState>()
|
||||||
.inner()
|
.inner()
|
||||||
.games_in_download
|
.games_in_download
|
||||||
.lock()
|
.write()
|
||||||
.await
|
.await
|
||||||
.remove(&id.clone());
|
.remove(&id.clone());
|
||||||
},
|
},
|
||||||
|
7
supply-chain/audits.toml
Normal file
7
supply-chain/audits.toml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
# cargo-vet audits file
|
||||||
|
|
||||||
|
[[audits.windows-link]]
|
||||||
|
who = "ddidderr <ddidderr@paul.network>"
|
||||||
|
criteria = "safe-to-deploy"
|
||||||
|
delta = "0.1.1 -> 0.1.3"
|
2184
supply-chain/config.toml
Normal file
2184
supply-chain/config.toml
Normal file
File diff suppressed because it is too large
Load Diff
1982
supply-chain/imports.lock
Normal file
1982
supply-chain/imports.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user