1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 02:12:38 +01:00

update deps, fix android builds

This commit is contained in:
Puyodead1 2024-03-21 23:27:48 -04:00
parent 65f574f01e
commit b691e4c93f
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC
11 changed files with 5210 additions and 381 deletions

486
src-tauri/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -22,16 +22,18 @@ tauri-plugin-updater = "2.0.0-alpha"
tauri-plugin-process = "2.0.0-alpha" tauri-plugin-process = "2.0.0-alpha"
tauri-plugin-log = "2.0.0-alpha" tauri-plugin-log = "2.0.0-alpha"
tauri-plugin-os = "2.0.0-alpha" tauri-plugin-os = "2.0.0-alpha"
reqwest = { version = "0.11.22", features = ["json"] } reqwest = { version = "0.11.22", default-features = false, features = [
"json",
"rustls-tls",
] }
url = "2.4.1" url = "2.4.1"
chrono = "0.4" chrono = "0.4"
log = "0.4.20" log = "0.4.20"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
tauri-plugin-notification = "2.0.0-beta.1" tauri-plugin-notification = "2.0.0-beta"
tauri-plugin-single-instance = "2.0.0-beta.2" tauri-plugin-single-instance = "2.0.0-beta"
tauri-plugin-autostart = "2.0.0-beta.1" tauri-plugin-autostart = "2.0.0-beta"
#openssl = { version = "0.10", features = ["vendored"] }
[features] [features]
# this feature is used for production builds or when `devPath` points to the filesystem # this feature is used for production builds or when `devPath` points to the filesystem

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -110,7 +110,7 @@
], ],
"properties": { "properties": {
"urls": { "urls": {
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).", "description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n# Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
@ -247,6 +247,12 @@
"app:deny-version" "app:deny-version"
] ]
}, },
{
"type": "string",
"enum": [
"autostart:default"
]
},
{ {
"description": "autostart:allow-disable -> Enables the disable command without any pre-configured scope.", "description": "autostart:allow-disable -> Enables the disable command without any pre-configured scope.",
"type": "string", "type": "string",
@ -366,13 +372,6 @@
"image:allow-from-bytes" "image:allow-from-bytes"
] ]
}, },
{
"description": "image:allow-from-ico-bytes -> Enables the from_ico_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-from-ico-bytes"
]
},
{ {
"description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.", "description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.",
"type": "string", "type": "string",
@ -380,20 +379,6 @@
"image:allow-from-path" "image:allow-from-path"
] ]
}, },
{
"description": "image:allow-from-png-bytes -> Enables the from_png_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-from-png-bytes"
]
},
{
"description": "image:allow-height -> Enables the height command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-height"
]
},
{ {
"description": "image:allow-new -> Enables the new command without any pre-configured scope.", "description": "image:allow-new -> Enables the new command without any pre-configured scope.",
"type": "string", "type": "string",
@ -409,10 +394,10 @@
] ]
}, },
{ {
"description": "image:allow-width -> Enables the width command without any pre-configured scope.", "description": "image:allow-size -> Enables the size command without any pre-configured scope.",
"type": "string", "type": "string",
"enum": [ "enum": [
"image:allow-width" "image:allow-size"
] ]
}, },
{ {
@ -422,13 +407,6 @@
"image:deny-from-bytes" "image:deny-from-bytes"
] ]
}, },
{
"description": "image:deny-from-ico-bytes -> Denies the from_ico_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-from-ico-bytes"
]
},
{ {
"description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.", "description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.",
"type": "string", "type": "string",
@ -436,20 +414,6 @@
"image:deny-from-path" "image:deny-from-path"
] ]
}, },
{
"description": "image:deny-from-png-bytes -> Denies the from_png_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-from-png-bytes"
]
},
{
"description": "image:deny-height -> Denies the height command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-height"
]
},
{ {
"description": "image:deny-new -> Denies the new command without any pre-configured scope.", "description": "image:deny-new -> Denies the new command without any pre-configured scope.",
"type": "string", "type": "string",
@ -465,10 +429,10 @@
] ]
}, },
{ {
"description": "image:deny-width -> Denies the width command without any pre-configured scope.", "description": "image:deny-size -> Denies the size command without any pre-configured scope.",
"type": "string", "type": "string",
"enum": [ "enum": [
"image:deny-width" "image:deny-size"
] ]
}, },
{ {
@ -856,6 +820,12 @@
"notification:deny-request-permission" "notification:deny-request-permission"
] ]
}, },
{
"type": "string",
"enum": [
"os:default"
]
},
{ {
"description": "os:allow-arch -> Enables the arch command without any pre-configured scope.", "description": "os:allow-arch -> Enables the arch command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1087,6 +1057,12 @@
"path:deny-resolve-directory" "path:deny-resolve-directory"
] ]
}, },
{
"type": "string",
"enum": [
"process:default"
]
},
{ {
"description": "process:allow-exit -> Enables the exit command without any pre-configured scope.", "description": "process:allow-exit -> Enables the exit command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1143,6 +1119,13 @@
"tray:default" "tray:default"
] ]
}, },
{
"description": "tray:allow-get-by-id -> Enables the get_by_id command without any pre-configured scope.",
"type": "string",
"enum": [
"tray:allow-get-by-id"
]
},
{ {
"description": "tray:allow-new -> Enables the new command without any pre-configured scope.", "description": "tray:allow-new -> Enables the new command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1150,6 +1133,13 @@
"tray:allow-new" "tray:allow-new"
] ]
}, },
{
"description": "tray:allow-remove-by-id -> Enables the remove_by_id command without any pre-configured scope.",
"type": "string",
"enum": [
"tray:allow-remove-by-id"
]
},
{ {
"description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", "description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1206,6 +1196,13 @@
"tray:allow-set-visible" "tray:allow-set-visible"
] ]
}, },
{
"description": "tray:deny-get-by-id -> Denies the get_by_id command without any pre-configured scope.",
"type": "string",
"enum": [
"tray:deny-get-by-id"
]
},
{ {
"description": "tray:deny-new -> Denies the new command without any pre-configured scope.", "description": "tray:deny-new -> Denies the new command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1213,6 +1210,13 @@
"tray:deny-new" "tray:deny-new"
] ]
}, },
{
"description": "tray:deny-remove-by-id -> Denies the remove_by_id command without any pre-configured scope.",
"type": "string",
"enum": [
"tray:deny-remove-by-id"
]
},
{ {
"description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", "description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.",
"type": "string", "type": "string",

File diff suppressed because it is too large Load Diff

View File

@ -110,7 +110,7 @@
], ],
"properties": { "properties": {
"urls": { "urls": {
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).", "description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n# Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
@ -247,6 +247,12 @@
"app:deny-version" "app:deny-version"
] ]
}, },
{
"type": "string",
"enum": [
"autostart:default"
]
},
{ {
"description": "autostart:allow-disable -> Enables the disable command without any pre-configured scope.", "description": "autostart:allow-disable -> Enables the disable command without any pre-configured scope.",
"type": "string", "type": "string",
@ -366,13 +372,6 @@
"image:allow-from-bytes" "image:allow-from-bytes"
] ]
}, },
{
"description": "image:allow-from-ico-bytes -> Enables the from_ico_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-from-ico-bytes"
]
},
{ {
"description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.", "description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.",
"type": "string", "type": "string",
@ -380,20 +379,6 @@
"image:allow-from-path" "image:allow-from-path"
] ]
}, },
{
"description": "image:allow-from-png-bytes -> Enables the from_png_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-from-png-bytes"
]
},
{
"description": "image:allow-height -> Enables the height command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-height"
]
},
{ {
"description": "image:allow-new -> Enables the new command without any pre-configured scope.", "description": "image:allow-new -> Enables the new command without any pre-configured scope.",
"type": "string", "type": "string",
@ -409,10 +394,10 @@
] ]
}, },
{ {
"description": "image:allow-width -> Enables the width command without any pre-configured scope.", "description": "image:allow-size -> Enables the size command without any pre-configured scope.",
"type": "string", "type": "string",
"enum": [ "enum": [
"image:allow-width" "image:allow-size"
] ]
}, },
{ {
@ -422,13 +407,6 @@
"image:deny-from-bytes" "image:deny-from-bytes"
] ]
}, },
{
"description": "image:deny-from-ico-bytes -> Denies the from_ico_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-from-ico-bytes"
]
},
{ {
"description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.", "description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.",
"type": "string", "type": "string",
@ -436,20 +414,6 @@
"image:deny-from-path" "image:deny-from-path"
] ]
}, },
{
"description": "image:deny-from-png-bytes -> Denies the from_png_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-from-png-bytes"
]
},
{
"description": "image:deny-height -> Denies the height command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-height"
]
},
{ {
"description": "image:deny-new -> Denies the new command without any pre-configured scope.", "description": "image:deny-new -> Denies the new command without any pre-configured scope.",
"type": "string", "type": "string",
@ -465,10 +429,10 @@
] ]
}, },
{ {
"description": "image:deny-width -> Denies the width command without any pre-configured scope.", "description": "image:deny-size -> Denies the size command without any pre-configured scope.",
"type": "string", "type": "string",
"enum": [ "enum": [
"image:deny-width" "image:deny-size"
] ]
}, },
{ {
@ -856,6 +820,12 @@
"notification:deny-request-permission" "notification:deny-request-permission"
] ]
}, },
{
"type": "string",
"enum": [
"os:default"
]
},
{ {
"description": "os:allow-arch -> Enables the arch command without any pre-configured scope.", "description": "os:allow-arch -> Enables the arch command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1087,6 +1057,12 @@
"path:deny-resolve-directory" "path:deny-resolve-directory"
] ]
}, },
{
"type": "string",
"enum": [
"process:default"
]
},
{ {
"description": "process:allow-exit -> Enables the exit command without any pre-configured scope.", "description": "process:allow-exit -> Enables the exit command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1143,6 +1119,13 @@
"tray:default" "tray:default"
] ]
}, },
{
"description": "tray:allow-get-by-id -> Enables the get_by_id command without any pre-configured scope.",
"type": "string",
"enum": [
"tray:allow-get-by-id"
]
},
{ {
"description": "tray:allow-new -> Enables the new command without any pre-configured scope.", "description": "tray:allow-new -> Enables the new command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1150,6 +1133,13 @@
"tray:allow-new" "tray:allow-new"
] ]
}, },
{
"description": "tray:allow-remove-by-id -> Enables the remove_by_id command without any pre-configured scope.",
"type": "string",
"enum": [
"tray:allow-remove-by-id"
]
},
{ {
"description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", "description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1206,6 +1196,13 @@
"tray:allow-set-visible" "tray:allow-set-visible"
] ]
}, },
{
"description": "tray:deny-get-by-id -> Denies the get_by_id command without any pre-configured scope.",
"type": "string",
"enum": [
"tray:deny-get-by-id"
]
},
{ {
"description": "tray:deny-new -> Denies the new command without any pre-configured scope.", "description": "tray:deny-new -> Denies the new command without any pre-configured scope.",
"type": "string", "type": "string",
@ -1213,6 +1210,13 @@
"tray:deny-new" "tray:deny-new"
] ]
}, },
{
"description": "tray:deny-remove-by-id -> Denies the remove_by_id command without any pre-configured scope.",
"type": "string",
"enum": [
"tray:deny-remove-by-id"
]
},
{ {
"description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", "description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.",
"type": "string", "type": "string",

View File

@ -1,5 +1,6 @@
use std::{sync::Arc, sync::Mutex}; use std::{sync::Arc, sync::Mutex};
use tauri::{Manager, RunEvent, State, WebviewWindow}; use tauri::{Manager, RunEvent, State, WebviewWindow};
#[cfg(desktop)]
use tauri_plugin_autostart::MacosLauncher; use tauri_plugin_autostart::MacosLauncher;
use tauri_plugin_log::{Target, TargetKind, WEBVIEW_TARGET}; use tauri_plugin_log::{Target, TargetKind, WEBVIEW_TARGET};
use tauri_plugin_notification::NotificationExt; use tauri_plugin_notification::NotificationExt;
@ -19,10 +20,13 @@ fn close_splashscreen(
splashscreen: State<SplashscreenWindow>, splashscreen: State<SplashscreenWindow>,
main: State<MainWindow>, main: State<MainWindow>,
) { ) {
#[cfg(desktop)]
{
// Close splashscreen // Close splashscreen
splashscreen.0.lock().unwrap().close().unwrap(); splashscreen.0.lock().unwrap().close().unwrap();
// Show main window // Show main window
main.0.lock().unwrap().show().unwrap(); main.0.lock().unwrap().show().unwrap();
}
} }
#[cfg_attr(mobile, tauri::mobile_entry_point)] #[cfg_attr(mobile, tauri::mobile_entry_point)]
@ -30,9 +34,9 @@ pub fn run() {
std::env::set_var("RUST_BACKTRACE", "1"); std::env::set_var("RUST_BACKTRACE", "1");
std::env::set_var("RUST_LOG", "debug"); std::env::set_var("RUST_LOG", "debug");
let mut context = tauri::generate_context!(); let context = tauri::generate_context!();
let config = context.config_mut(); // let config = context.config_mut();
let app = tauri::Builder::default() let app = tauri::Builder::default()
.plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_os::init())
@ -62,19 +66,6 @@ pub fn run() {
.build(), .build(),
) )
.plugin(tauri_plugin_notification::init()) .plugin(tauri_plugin_notification::init())
.plugin(tauri_plugin_single_instance::init(|app, argv, cwd| {
println!("{}, {argv:?}, {cwd}", app.package_info().name);
app.notification()
.builder()
.title("This app is already running!")
.body("You can find it in the tray menu.")
.show()
.unwrap();
}))
.plugin(tauri_plugin_autostart::init(
MacosLauncher::LaunchAgent,
Some(vec![]),
))
.plugin(tauri_plugin_process::init()) .plugin(tauri_plugin_process::init())
.setup(move |app| { .setup(move |app| {
let app_handle = app.handle(); let app_handle = app.handle();
@ -86,10 +77,24 @@ pub fn run() {
app.get_webview_window("main").unwrap(), app.get_webview_window("main").unwrap(),
)))); ))));
app_handle.plugin(tauri_plugin_updater::Builder::new().build())?;
#[cfg(desktop)] #[cfg(desktop)]
{ {
app_handle.plugin(tauri_plugin_updater::Builder::new().build())?;
let _ =
app_handle.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
app.notification()
.builder()
.title("This app is already running!")
.body("You can find it in the tray menu.")
.show()
.unwrap();
}));
let _ = app_handle.plugin(tauri_plugin_autostart::init(
MacosLauncher::LaunchAgent,
Some(vec![]),
));
// Tray // Tray
let handle = app.handle(); let handle = app.handle();
tray::create_tray(handle)?; tray::create_tray(handle)?;
@ -150,4 +155,12 @@ pub fn run() {
} }
_ => {} _ => {}
}); });
#[cfg(mobile)]
app.run(|app, e| match e {
RunEvent::Ready => {
println!("App is ready");
}
_ => {}
});
} }

View File

@ -230,7 +230,7 @@ pub fn check_for_updates<R: Runtime>(ignore_prereleases: bool, window: tauri::Wi
let response = updater.check().await; let response = updater.check().await;
println!("[Updater] Update check response: {:?}", response); // println!("[Updater] Update check response: {:?}", response);
match response { match response {
Ok(Some(update)) => { Ok(Some(update)) => {

View File

@ -1,5 +1,5 @@
{ {
"tauri": { "app": {
"windows": [ "windows": [
{ {
"fullscreen": false, "fullscreen": false,

View File

@ -1,3 +1,3 @@
{ {
"version": "0.1.1+00" "version": "0.1.2+00"
} }