Compare commits
3 Commits
df6b362a31
...
cb26201506
Author | SHA1 | Date | |
---|---|---|---|
|
cb26201506 | ||
|
992e3c8db2 | ||
|
4956b64371 |
3
src-tauri/.cargo/config.toml
Normal file
3
src-tauri/.cargo/config.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[target.x86_64-unknown-linux-gnu]
|
||||||
|
linker = "clang"
|
||||||
|
rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"]
|
1
src-tauri/.env
Normal file
1
src-tauri/.env
Normal file
@ -0,0 +1 @@
|
|||||||
|
DATABASE_URL=sqlite://creddy.db?mode=rwc
|
25
src-tauri/Cargo.lock
generated
25
src-tauri/Cargo.lock
generated
@ -78,6 +78,8 @@ dependencies = [
|
|||||||
"serde_json",
|
"serde_json",
|
||||||
"sodiumoxide",
|
"sodiumoxide",
|
||||||
"sqlx",
|
"sqlx",
|
||||||
|
"strum 0.24.1",
|
||||||
|
"strum_macros 0.24.3",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
"tauri",
|
"tauri",
|
||||||
"tauri-build",
|
"tauri-build",
|
||||||
@ -3571,9 +3573,15 @@ version = "0.22.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e"
|
checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"strum_macros",
|
"strum_macros 0.22.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "strum"
|
||||||
|
version = "0.24.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "strum_macros"
|
name = "strum_macros"
|
||||||
version = "0.22.0"
|
version = "0.22.0"
|
||||||
@ -3586,6 +3594,19 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "strum_macros"
|
||||||
|
version = "0.24.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
|
||||||
|
dependencies = [
|
||||||
|
"heck 0.4.0",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"rustversion",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "subtle"
|
name = "subtle"
|
||||||
version = "2.4.1"
|
version = "2.4.1"
|
||||||
@ -4822,7 +4843,7 @@ version = "0.5.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "007a0353840b23e0c6dc73e5b962ff58ed7f6bc9ceff3ce7fe6fbad8d496edf4"
|
checksum = "007a0353840b23e0c6dc73e5b962ff58ed7f6bc9ceff3ce7fe6fbad8d496edf4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"strum",
|
"strum 0.22.0",
|
||||||
"windows 0.24.0",
|
"windows 0.24.0",
|
||||||
"xml-rs",
|
"xml-rs",
|
||||||
]
|
]
|
||||||
|
@ -29,6 +29,8 @@ aws-smithy-types = "0.52.0"
|
|||||||
aws-config = "0.52.0"
|
aws-config = "0.52.0"
|
||||||
thiserror = "1.0.38"
|
thiserror = "1.0.38"
|
||||||
once_cell = "1.16.0"
|
once_cell = "1.16.0"
|
||||||
|
strum = "0.24"
|
||||||
|
strum_macros = "0.24"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# by default Tauri runs in production mode
|
# by default Tauri runs in production mode
|
||||||
@ -37,3 +39,6 @@ default = [ "custom-protocol" ]
|
|||||||
# this feature is used used for production builds where `devPath` points to the filesystem
|
# this feature is used used for production builds where `devPath` points to the filesystem
|
||||||
# DO NOT remove this
|
# DO NOT remove this
|
||||||
custom-protocol = [ "tauri/custom-protocol" ]
|
custom-protocol = [ "tauri/custom-protocol" ]
|
||||||
|
|
||||||
|
# [profile.dev.build-override]
|
||||||
|
# opt-level = 3
|
||||||
|
@ -77,4 +77,4 @@ fn default_listen_addr() -> Ipv4Addr { Ipv4Addr::LOCALHOST }
|
|||||||
|
|
||||||
fn default_rehide_ms() -> u64 { 1000 }
|
fn default_rehide_ms() -> u64 { 1000 }
|
||||||
|
|
||||||
fn default_start_minimized() -> bool { true }
|
fn default_start_minimized() -> bool { !cfg!(debug_assertions) } // default to start-minimized in production only
|
||||||
|
@ -10,13 +10,15 @@ use sqlx::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use serde::{Serialize, Serializer, ser::SerializeMap};
|
use serde::{Serialize, Serializer, ser::SerializeMap};
|
||||||
|
use strum_macros::IntoStaticStr;
|
||||||
|
|
||||||
|
|
||||||
pub struct SerializeError<E> {
|
pub struct SerializeError<E> {
|
||||||
pub err: E
|
pub err: E
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<E: std::error::Error> Serialize for SerializeError<E> {
|
impl<E: std::error::Error> Serialize for SerializeError<E>
|
||||||
|
{
|
||||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||||
let mut map = serializer.serialize_map(None)?;
|
let mut map = serializer.serialize_map(None)?;
|
||||||
map.serialize_entry("msg", &format!("{}", self.err))?;
|
map.serialize_entry("msg", &format!("{}", self.err))?;
|
||||||
@ -50,7 +52,7 @@ pub enum SetupError {
|
|||||||
|
|
||||||
|
|
||||||
// error when attempting to tell a request handler whether to release or deny credentials
|
// error when attempting to tell a request handler whether to release or deny credentials
|
||||||
#[derive(Debug, ThisError)]
|
#[derive(Debug, ThisError, IntoStaticStr)]
|
||||||
pub enum SendResponseError {
|
pub enum SendResponseError {
|
||||||
#[error("The specified credentials request was not found")]
|
#[error("The specified credentials request was not found")]
|
||||||
NotFound, // no request with the given id
|
NotFound, // no request with the given id
|
||||||
|
@ -88,7 +88,11 @@ impl Handler {
|
|||||||
if n >= 4 && &buf[(n - 4)..n] == b"\r\n\r\n" {break;}
|
if n >= 4 && &buf[(n - 4)..n] == b"\r\n\r\n" {break;}
|
||||||
if n == buf.len() {return Err(RequestError::RequestTooLarge);}
|
if n == buf.len() {return Err(RequestError::RequestTooLarge);}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg!(debug_assertions) {
|
||||||
println!("{}", std::str::from_utf8(&buf).unwrap());
|
println!("{}", std::str::from_utf8(&buf).unwrap());
|
||||||
|
}
|
||||||
|
|
||||||
Ok(buf)
|
Ok(buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { createEventDispatcher } from 'svelte';
|
import { createEventDispatcher } from 'svelte';
|
||||||
import { invoke } from '@tauri-apps/api/tauri';
|
import { invoke } from '@tauri-apps/api/tauri';
|
||||||
|
|
||||||
import Icon from '../ui/icon.svelte';
|
import Icon from '../ui/Icon.svelte';
|
||||||
|
|
||||||
export let appState;
|
export let appState;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user