+
@@ -39,7 +40,7 @@ export const OverviewScreen: React.FC<{}> = (props) => {
-
*/}
+
,
+ pub byte_integrity_hash: Option,
+
pub uri: String,
pub is_dir: bool,
// metadata
diff --git a/packages/core/lib/db/entity/locations.rs b/packages/core/lib/db/entity/locations.rs
index d199ba8ab..17704d90f 100644
--- a/packages/core/lib/db/entity/locations.rs
+++ b/packages/core/lib/db/entity/locations.rs
@@ -17,7 +17,6 @@ pub struct Model {
#[sea_orm(primary_key)]
pub id: u32,
pub name: String,
- pub path: String, // C:\ or /Volumes/MyDrive
pub total_capacity: u32,
pub available_capacity: u32,
pub is_removable: bool,
diff --git a/packages/core/lib/db/migrations/primary/V1__initial.sql b/packages/core/lib/db/migrations/primary/V1__initial.sql
index 58dad7a0d..aa2a5c28c 100644
--- a/packages/core/lib/db/migrations/primary/V1__initial.sql
+++ b/packages/core/lib/db/migrations/primary/V1__initial.sql
@@ -38,8 +38,9 @@ CREATE TABLE IF NOT EXISTS files (
id INTEGER PRIMARY KEY AUTOINCREMENT,
uri TEXT NOT NULL,
is_dir BOOLEAN NOT NULL DEFAULT FALSE,
- meta_checksum TEXT NOT NULL UNIQUE ON CONFLICT IGNORE,
- buffer_checksum TEXT,
+ meta_integrity_hash TEXT NOT NULL UNIQUE ON CONFLICT IGNORE,
+ sampled_byte_integrity_hash TEXT NOT NULL,
+ byte_integrity_hash TEXT NOT NULL,
name TEXT,
extension TEXT,
size_in_bytes TEXT NOT NULL,
diff --git a/packages/core/lib/file/checksum.rs b/packages/core/lib/file/checksum.rs
index a948de33e..6a9427804 100644
--- a/packages/core/lib/file/checksum.rs
+++ b/packages/core/lib/file/checksum.rs
@@ -28,6 +28,6 @@ pub async fn create_buffer_checksum(path: &str) -> io::Result {
Ok(hex)
}
-pub fn create_meta_checksum(uri: &str, size_in_bytes: u64) -> io::Result {
+pub fn create_meta_integrity_hash(uri: &str, size_in_bytes: u64) -> io::Result {
Ok(digest(format!("{}{}", uri, size_in_bytes.to_string())))
}
diff --git a/packages/core/lib/file/indexer.rs b/packages/core/lib/file/indexer.rs
index 0ac961a6b..6d19e34dd 100644
--- a/packages/core/lib/file/indexer.rs
+++ b/packages/core/lib/file/indexer.rs
@@ -1,5 +1,5 @@
use crate::db::{connection::DB_INSTANCE, entity::file, entity::location_paths, entity::locations};
-use crate::file::{checksum::create_meta_checksum, init};
+use crate::file::{checksum::create_meta_integrity_hash, init};
use crate::util::time;
use anyhow::Result;
use chrono::Utc;
@@ -154,8 +154,8 @@ fn create_active_file_model(
) -> Result {
let metadata = fs::metadata(&uri)?;
let size = metadata.len();
- let mut meta_checksum = create_meta_checksum(uri.to_str().unwrap_or_default(), size)?;
- meta_checksum.truncate(20);
+ let mut meta_integrity_hash = create_meta_integrity_hash(uri.to_str().unwrap_or_default(), size)?;
+ meta_integrity_hash.truncate(20);
let mut location_relative_uri = uri
.to_str()
@@ -175,7 +175,7 @@ fn create_active_file_model(
id: Set(*id),
is_dir: Set(metadata.is_dir()),
parent_id: Set(parent_id.map(|x| x.clone())),
- meta_checksum: Set(meta_checksum),
+ meta_integrity_hash: Set(meta_integrity_hash),
name: Set(extract_name(uri.file_stem())),
extension: Set(extract_name(uri.extension())),
encryption: Set(file::Encryption::None),
diff --git a/packages/core/lib/file/locations.rs b/packages/core/lib/file/locations.rs
index 1b3242ffc..f66823499 100644
--- a/packages/core/lib/file/locations.rs
+++ b/packages/core/lib/file/locations.rs
@@ -75,13 +75,13 @@ pub async fn create_location(path: &str) -> Result<()> {
let location = locations::ActiveModel {
id: Set(next_location_id),
+ client_id: Set(1),
name: Set(Path::new(path)
.file_name()
.unwrap()
.to_str()
.unwrap()
.to_owned()),
- path: Set(path.to_owned()),
total_capacity: Set(mount.total_capacity.try_into().unwrap()),
available_capacity: Set(mount.available_capacity.try_into().unwrap()),
is_ejectable: Set(mount.is_ejectable),
diff --git a/packages/ui/style/tailwind.config.js b/packages/ui/style/tailwind.config.js
index 58bf7b11b..8331a8821 100644
--- a/packages/ui/style/tailwind.config.js
+++ b/packages/ui/style/tailwind.config.js
@@ -41,9 +41,9 @@ module.exports = {
400: '#9196A8',
450: '#71758A',
500: '#2E313B',
- 550: '#1E1F25',
+ 550: '#20222d',
600: '#171720',
- 650: '#14141B',
+ 650: '#121219',
700: '#121317',
750: '#0D0E11',
800: '#0C0C0F',