In-app store, delta version support (#179)
* fix: windows launch * feat: add necessary client fixes for store * fix: keyring fix * feat: delta version support * feat: dl/disk progress * feat: move to jwt auth * fix: lint
This commit is contained in:
@@ -6,7 +6,7 @@ use std::{
|
||||
use keyring::Entry;
|
||||
use log::info;
|
||||
|
||||
use crate::interface::{DatabaseInterface};
|
||||
use crate::interface::DatabaseInterface;
|
||||
|
||||
pub static DB: LazyLock<DatabaseInterface> = LazyLock::new(DatabaseInterface::set_up_database);
|
||||
|
||||
@@ -32,6 +32,9 @@ pub(crate) static KEY_IV: LazyLock<([u8; 16], [u8; 16])> = LazyLock::new(|| {
|
||||
info!("created new database key");
|
||||
buffer.to_vec()
|
||||
});
|
||||
let new = key.split_off(16);
|
||||
(new.try_into().expect("failed to extract key"), key.try_into().expect("failed to extract iv"))
|
||||
});
|
||||
let iv: Vec<u8> = key.split_off(16);
|
||||
(
|
||||
key[0..16].try_into().expect("key wrong length"),
|
||||
iv[0..16].try_into().expect("iv wrong length"),
|
||||
)
|
||||
});
|
||||
|
||||
@@ -238,9 +238,10 @@ pub mod data {
|
||||
pub auth: Option<DatabaseAuth>,
|
||||
pub base_url: String,
|
||||
pub applications: DatabaseApplications,
|
||||
pub cache_dir: PathBuf,
|
||||
|
||||
#[serde(skip)]
|
||||
pub prev_database: Option<PathBuf>,
|
||||
pub cache_dir: PathBuf,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user