1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-25 03:32:54 +01:00

add some plugins

This commit is contained in:
Puyodead1 2023-09-04 21:57:00 -04:00 committed by Puyodead1
parent c504ac2b49
commit 956802b4a4
No known key found for this signature in database
GPG Key ID: BA5F91AAEF68E5CE
5 changed files with 1523 additions and 36 deletions

View File

@ -23,6 +23,15 @@
"@mui/material": "^5.13.0",
"@spacebarchat/spacebar-api-types": "0.37.49",
"@tauri-apps/api": "2.0.0-alpha.6",
"@tauri-apps/plugin-authenticator": "2.0.0-alpha.1",
"@tauri-apps/plugin-autostart": "2.0.0-alpha.1",
"@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.1",
"@tauri-apps/plugin-dialog": "2.0.0-alpha.1",
"@tauri-apps/plugin-log": "2.0.0-alpha.1",
"@tauri-apps/plugin-notification": "2.0.0-alpha.1",
"@tauri-apps/plugin-process": "2.0.0-alpha.1",
"@tauri-apps/plugin-stronghold": "2.0.0-alpha.2",
"@tauri-apps/plugin-updater": "2.0.0-alpha.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",

View File

@ -38,6 +38,33 @@ dependencies:
'@tauri-apps/api':
specifier: 2.0.0-alpha.6
version: 2.0.0-alpha.6
'@tauri-apps/plugin-authenticator':
specifier: 2.0.0-alpha.1
version: 2.0.0-alpha.1
'@tauri-apps/plugin-autostart':
specifier: 2.0.0-alpha.1
version: 2.0.0-alpha.1
'@tauri-apps/plugin-clipboard-manager':
specifier: 2.0.0-alpha.1
version: 2.0.0-alpha.1
'@tauri-apps/plugin-dialog':
specifier: 2.0.0-alpha.1
version: 2.0.0-alpha.1
'@tauri-apps/plugin-log':
specifier: 2.0.0-alpha.1
version: 2.0.0-alpha.1
'@tauri-apps/plugin-notification':
specifier: 2.0.0-alpha.1
version: 2.0.0-alpha.1
'@tauri-apps/plugin-process':
specifier: 2.0.0-alpha.1
version: 2.0.0-alpha.1
'@tauri-apps/plugin-stronghold':
specifier: 2.0.0-alpha.2
version: 2.0.0-alpha.2
'@tauri-apps/plugin-updater':
specifier: 2.0.0-alpha.1
version: 2.0.0-alpha.1
'@testing-library/jest-dom':
specifier: ^5.16.5
version: 5.16.5
@ -3030,6 +3057,60 @@ packages:
'@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.11
dev: true
/@tauri-apps/plugin-authenticator@2.0.0-alpha.1:
resolution: {integrity: sha512-MxV+g7vweAH1Zgr9iUrH84VgrEAvoPoNZ9S0lKQ4kyt2BNmmOSdKjcoRxKxD8x7G8FRzTDypAdte0aMgtoG+Ag==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@tauri-apps/plugin-autostart@2.0.0-alpha.1:
resolution: {integrity: sha512-xs72S8KCYzt9puML4vrmPvg2/wpUuRg4NMEp+12A7XwCP4mQ9js0fFPKSma770TVeJGpzhdJFvDTdWgrVyhYng==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@tauri-apps/plugin-clipboard-manager@2.0.0-alpha.1:
resolution: {integrity: sha512-zXybHu31RCx58ZGU7/kUHcvoXW2AX6kBXBZsKHv4rYe7Z869WmDLDC7iU23/dAJLu7xAPTJzJ/HbeMfbrfJ4hg==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@tauri-apps/plugin-dialog@2.0.0-alpha.1:
resolution: {integrity: sha512-Fqv7zB7qvR6DkcH1dafHcRRNWRSFwj637/G2MQ+kKrmk1ErfV95lcYjpIhmUaETQSPKeogSI6A78kSnO89cvHQ==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@tauri-apps/plugin-log@2.0.0-alpha.1:
resolution: {integrity: sha512-+7iuIWyshYZKA8NtBb7YRnAMoAjkcN1CR4iNtQh1XBlc0e1CGaDNlk6DdkVuO5/0kT0Qlge+q1SndtpG4gNiLA==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@tauri-apps/plugin-notification@2.0.0-alpha.1:
resolution: {integrity: sha512-/U046gKo0RsPsi7OTQEuu2ezWrhBNheTMA+iyMWb65N9mMSORul66Y1oKXzJOqeMsSQcL4V+WPz+6wzMGHY7lQ==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@tauri-apps/plugin-process@2.0.0-alpha.1:
resolution: {integrity: sha512-ljTtJmuuURR1Q+H8zvbMX9pmMZdJQWMXGsUEK2aBNlUo4qE2AniXLjoaE1jJQ1NF2LKptJRSY1bSUi+OyEkjGg==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@tauri-apps/plugin-stronghold@2.0.0-alpha.2:
resolution: {integrity: sha512-G01gRHjD1QCNn2EK/hgHJYy0tFEfjuKpU104JOgeYVEbkJX7G92hjxfyLqe++LoihPF/sUa6VHEUVVXBsRa71Q==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@tauri-apps/plugin-updater@2.0.0-alpha.1:
resolution: {integrity: sha512-rJoVc/N8gg1MkUOFZdx5h39V47elddwnOjs0sAPhaGfwct7okmFMRnXpN/MwHoprTkK2+6EDLOvhf0jFMiy4JA==}
dependencies:
'@tauri-apps/api': 2.0.0-alpha.6
dev: false
/@testing-library/dom@8.20.0:
resolution: {integrity: sha512-d9ULIT+a4EXLX3UU8FBjauG9NnsZHkHztXoIcTsOKoOw030fyjheN9svkTULjJxtYag9DZz5Jz5qkWZDPxTFwA==}
engines: {node: '>=12'}

1423
src-tauri/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -14,10 +14,23 @@ rust-version = "1.60"
[build-dependencies]
tauri-build = { version = "2.0.0-alpha", features = [] }
# you can add the dependencies on the `[dependencies]` section if you do not target mobile
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-updater = "2.0.0-alpha"
tauri-plugin-authenticator = "2.0.0-alpha"
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "2.0.0-alpha", features = [] }
tauri-plugin-stronghold = "2.0.0-alpha"
tauri-plugin-store = "2.0.0-alpha"
tauri-plugin-single-instance = "2.0.0-alpha"
tauri-plugin-notification = "2.0.0-alpha"
tauri-plugin-autostart = "2.0.0-alpha"
tauri-plugin-clipboard-manager = "2.0.0-alpha"
tauri-plugin-dialog = "2.0.0-alpha"
tauri-plugin-process = "2.0.0-alpha"
[features]
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.

View File

@ -2,6 +2,13 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use tauri::Manager;
use tauri_plugin_autostart::MacosLauncher;
#[derive(Clone, serde::Serialize)]
struct Payload {
args: Vec<String>,
cwd: String,
}
#[tauri::command]
async fn close_splashscreen(window: tauri::Window) {
@ -16,6 +23,32 @@ async fn close_splashscreen(window: tauri::Window) {
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![close_splashscreen])
.plugin(tauri_plugin_clipboard_manager::init())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_notification::init())
.plugin(tauri_plugin_process::init())
.plugin(tauri_plugin_autostart::init(
MacosLauncher::LaunchAgent,
Some(vec![]),
))
.plugin(tauri_plugin_store::Builder::default().build())
.plugin(tauri_plugin_single_instance::init(|app, argv, cwd| {
println!("{}, {argv:?}, {cwd}", app.package_info().name);
app.emit_all("single-instance", Payload { args: argv, cwd })
.unwrap();
}))
.setup(|app| {
#[cfg(desktop)]
app.handle().plugin(tauri_plugin_authenticator::init())?;
Ok(())
})
// .setup(|app| {
// #[cfg(desktop)]
// app.handle()
// .plugin(tauri_plugin_updater::Builder::new().build())?;
// Ok(())
// })
.run(tauri::generate_context!())
.expect("error while running tauri application");
}