diff --git a/apps/tauri/.taurignore b/apps/tauri/.taurignore index e6c4cbde7..6c6fae4fb 100644 --- a/apps/tauri/.taurignore +++ b/apps/tauri/.taurignore @@ -20,3 +20,4 @@ + diff --git a/core/src/infra/db/migration/m20251117_000001_add_blurhash_to_media_data.rs b/core/src/infra/db/migration/m20251117_000001_add_blurhash_to_media_data.rs index 81e3b51dc..67919fd15 100644 --- a/core/src/infra/db/migration/m20251117_000001_add_blurhash_to_media_data.rs +++ b/core/src/infra/db/migration/m20251117_000001_add_blurhash_to_media_data.rs @@ -70,3 +70,4 @@ enum VideoMediaData { + diff --git a/core/src/infra/db/migration/m20251117_000002_add_unique_constraint_to_entries.rs b/core/src/infra/db/migration/m20251117_000002_add_unique_constraint_to_entries.rs index 9c5fe5ccb..3ff6066ea 100644 --- a/core/src/infra/db/migration/m20251117_000002_add_unique_constraint_to_entries.rs +++ b/core/src/infra/db/migration/m20251117_000002_add_unique_constraint_to_entries.rs @@ -49,3 +49,4 @@ enum Entries { + diff --git a/core/src/ops/libraries/open/mod.rs b/core/src/ops/libraries/open/mod.rs index 3fefa84e4..75af38fd4 100644 --- a/core/src/ops/libraries/open/mod.rs +++ b/core/src/ops/libraries/open/mod.rs @@ -10,3 +10,4 @@ pub use output::LibraryOpenOutput; + diff --git a/core/src/ops/media/blurhash.rs b/core/src/ops/media/blurhash.rs index b82bcb936..1d123f48a 100644 --- a/core/src/ops/media/blurhash.rs +++ b/core/src/ops/media/blurhash.rs @@ -124,3 +124,4 @@ mod tests { + diff --git a/core/src/ops/volumes/track/input.rs b/core/src/ops/volumes/track/input.rs index b71b18c55..f9935658f 100644 --- a/core/src/ops/volumes/track/input.rs +++ b/core/src/ops/volumes/track/input.rs @@ -16,3 +16,4 @@ pub struct VolumeTrackInput { + diff --git a/core/src/ops/volumes/untrack/input.rs b/core/src/ops/volumes/untrack/input.rs index f69e120a7..376e3ed7b 100644 --- a/core/src/ops/volumes/untrack/input.rs +++ b/core/src/ops/volumes/untrack/input.rs @@ -13,3 +13,4 @@ pub struct VolumeUntrackInput { + diff --git a/crates/log-analyzer/.gitignore b/crates/log-analyzer/.gitignore index c0da3ff23..e8d73b22c 100644 --- a/crates/log-analyzer/.gitignore +++ b/crates/log-analyzer/.gitignore @@ -7,3 +7,4 @@ analysis.md + diff --git a/crates/log-analyzer/Cargo.toml b/crates/log-analyzer/Cargo.toml index 3ed23598c..8c60433d9 100644 --- a/crates/log-analyzer/Cargo.toml +++ b/crates/log-analyzer/Cargo.toml @@ -41,3 +41,4 @@ required-features = ["cli"] + diff --git a/crates/log-analyzer/examples/simple.rs b/crates/log-analyzer/examples/simple.rs index 5db5eeb6e..399010f46 100644 --- a/crates/log-analyzer/examples/simple.rs +++ b/crates/log-analyzer/examples/simple.rs @@ -52,3 +52,4 @@ fn main() -> Result<()> { + diff --git a/crates/log-analyzer/src/output/json.rs b/crates/log-analyzer/src/output/json.rs index bc586192e..ee3f767f9 100644 --- a/crates/log-analyzer/src/output/json.rs +++ b/crates/log-analyzer/src/output/json.rs @@ -19,3 +19,4 @@ pub fn export_json(templates: &[Template], groups: &[LogGroup]) -> Result { - if (file.kind.type === "Directory") { + if (file.kind === "Directory") { onNavigate(file.sd_path); } }, diff --git a/packages/interface/src/components/Explorer/views/ColumnView/ColumnItem.tsx b/packages/interface/src/components/Explorer/views/ColumnView/ColumnItem.tsx index acaeddba3..1751b9a29 100644 --- a/packages/interface/src/components/Explorer/views/ColumnView/ColumnItem.tsx +++ b/packages/interface/src/components/Explorer/views/ColumnView/ColumnItem.tsx @@ -40,7 +40,7 @@ export function ColumnItem({ > {file.name} - {file.kind.type === "Directory" && ( + {file.kind === "Directory" && ( { - if (file.kind.type === "Directory") { + if (file.kind === "Directory") { setCurrentPath(file.sd_path); } else { console.log("Open file:", file.name); @@ -78,7 +78,7 @@ export const FileCard = memo(function FileCard({ file, fileIndex, allFiles, sele } }, keybind: "⌘O", - condition: () => file.kind.type === "Directory" || file.kind.type === "File", + condition: () => file.kind === "Directory" || file.kind === "File", }, { icon: MagnifyingGlass, @@ -308,7 +308,7 @@ export const FileCard = memo(function FileCard({ file, fileIndex, allFiles, sele type: "submenu", icon: FileText, label: "Document Processing", - condition: () => ["pdf", "doc", "docx"].includes(file.kind.type === "File" ? file.kind.data?.extension || "" : ""), + condition: () => file.kind === "File" && ["pdf", "doc", "docx"].includes(file.extension || ""), submenu: [ { icon: TextAa, @@ -425,7 +425,7 @@ export const FileCard = memo(function FileCard({ file, fileIndex, allFiles, sele }; const handleDoubleClick = () => { - if (file.kind.type === "Directory") { + if (file.kind === "Directory") { setCurrentPath(file.sd_path); } }; diff --git a/packages/interface/src/components/Explorer/views/ListView/FileRow.tsx b/packages/interface/src/components/Explorer/views/ListView/FileRow.tsx index 43dc8042b..be7146c03 100644 --- a/packages/interface/src/components/Explorer/views/ListView/FileRow.tsx +++ b/packages/interface/src/components/Explorer/views/ListView/FileRow.tsx @@ -24,7 +24,7 @@ export function FileRow({ file, fileIndex, allFiles }: FileRowProps) { }; const handleDoubleClick = () => { - if (file.kind.type === "Directory") { + if (file.kind === "Directory") { setCurrentPath(file.sd_path); } }; @@ -60,7 +60,7 @@ export function FileRow({ file, fileIndex, allFiles }: FileRowProps) { {formatRelativeTime(file.modified_at)}
- {file.kind.type === "File" ? file.kind.data?.extension || "—" : "Folder"} + {file.kind === "File" ? file.extension || "—" : "Folder"}
); diff --git a/packages/interface/src/components/Explorer/views/SizeView/SizeCircle.tsx b/packages/interface/src/components/Explorer/views/SizeView/SizeCircle.tsx index e3ae1509d..5d315488d 100644 --- a/packages/interface/src/components/Explorer/views/SizeView/SizeCircle.tsx +++ b/packages/interface/src/components/Explorer/views/SizeView/SizeCircle.tsx @@ -11,7 +11,7 @@ interface SizeCircleProps { // Get file extension or type function getFileType(file: File): string { - if (file.kind.type === "Directory") return "Folder"; + if (file.kind === "Directory") return "Folder"; const name = file.name; const lastDot = name.lastIndexOf("."); @@ -22,7 +22,7 @@ function getFileType(file: File): string { // Get color based on file type function getFileColor(file: File): string { - if (file.kind.type === "Directory") return "bg-blue-500"; + if (file.kind === "Directory") return "bg-blue-500"; const ext = file.name.split(".").pop()?.toLowerCase() || ""; diff --git a/packages/interface/src/components/Explorer/views/SizeView/SizeView.tsx b/packages/interface/src/components/Explorer/views/SizeView/SizeView.tsx index f60478273..9a3cb5999 100644 --- a/packages/interface/src/components/Explorer/views/SizeView/SizeView.tsx +++ b/packages/interface/src/components/Explorer/views/SizeView/SizeView.tsx @@ -29,7 +29,7 @@ function getTailwindColor(className: string): string { } function getFileColorClass(file: File): string { - if (file.kind.type === "Directory") return "bg-accent"; + if (file.kind === "Directory") return "bg-accent"; const ext = file.name.split(".").pop()?.toLowerCase() || ""; @@ -71,7 +71,7 @@ function getFileColor(file: File): string { } function getFileType(file: File): string { - if (file.kind.type === "Directory") return "Folder"; + if (file.kind === "Directory") return "Folder"; const name = file.name; const lastDot = name.lastIndexOf("."); @@ -348,7 +348,7 @@ export function SizeView() { } // Navigate if directory - if (d.data.file.kind.type === "Directory") { + if (d.data.file.kind === "Directory") { setCurrentPathRef.current(d.data.file.sd_path); } }) diff --git a/packages/interface/src/hooks/useJobDispatch.ts b/packages/interface/src/hooks/useJobDispatch.ts index 01524821f..753ecbb51 100644 --- a/packages/interface/src/hooks/useJobDispatch.ts +++ b/packages/interface/src/hooks/useJobDispatch.ts @@ -59,3 +59,4 @@ export function useJobDispatch() { + diff --git a/packages/interface/src/inspectors/FileInspector.tsx b/packages/interface/src/inspectors/FileInspector.tsx index 4794c5d55..4975fe7a9 100644 --- a/packages/interface/src/inspectors/FileInspector.tsx +++ b/packages/interface/src/inspectors/FileInspector.tsx @@ -137,6 +137,7 @@ function OverviewTab({ file }: { file: File }) { diff --git a/packages/interface/src/routes/overview/HeroStats.tsx b/packages/interface/src/routes/overview/HeroStats.tsx index 972224a85..fabfa4ce4 100644 --- a/packages/interface/src/routes/overview/HeroStats.tsx +++ b/packages/interface/src/routes/overview/HeroStats.tsx @@ -3,138 +3,137 @@ import clsx from "clsx"; import { CloudArrowUp, HardDrives, Files, Cpu } from "@phosphor-icons/react"; interface HeroStatsProps { - totalStorage: number; // bytes - usedStorage: number; // bytes - totalFiles: number; - locationCount: number; - tagCount: number; - deviceCount: number; - uniqueContentCount: number; + totalStorage: number; // bytes + usedStorage: number; // bytes + totalFiles: number; + locationCount: number; + tagCount: number; + deviceCount: number; + uniqueContentCount: number; } function formatBytes(bytes: number): string { - if (bytes === 0) return "0 B"; - const k = 1024; - const sizes = ["B", "KB", "MB", "GB", "TB", "PB"]; - const i = Math.floor(Math.log(bytes) / Math.log(k)); - return `${(bytes / Math.pow(k, i)).toFixed(1)} ${sizes[i]}`; + if (bytes === 0) return "0 B"; + const k = 1024; + const sizes = ["B", "KB", "MB", "GB", "TB", "PB"]; + const i = Math.floor(Math.log(bytes) / Math.log(k)); + return `${(bytes / Math.pow(k, i)).toFixed(1)} ${sizes[i]}`; } export function HeroStats({ - totalStorage, - usedStorage, - totalFiles, - locationCount, - deviceCount, - uniqueContentCount, + totalStorage, + usedStorage, + totalFiles, + locationCount, + deviceCount, + uniqueContentCount, }: HeroStatsProps) { - const usagePercent = totalStorage > 0 ? (usedStorage / totalStorage) * 100 : 0; + const usagePercent = + totalStorage > 0 ? (usedStorage / totalStorage) * 100 : 0; - return ( - + return ( +
+
+ {/* Total Storage */} + + {formatBytes(usedStorage)}{" "} + used + + } + progress={usagePercent} + color="from-blue-500 to-cyan-500" + /> -
- {/* Total Storage */} - - {formatBytes(usedStorage)} used - - } - progress={usagePercent} - color="from-blue-500 to-cyan-500" - /> + {/* Files */} + - {/* Files */} - + {/* Devices */} + - {/* Devices */} - - - {/* Storage Health - Future feature */} - -
- - - ); + {/* Storage Health - Future feature */} + +
+
+ ); } interface StatCardProps { - icon: React.ElementType; - label: string; - value: string | number; - subtitle: React.ReactNode; - progress?: number; - pulse?: boolean; - color: string; - badge?: string; + icon: React.ElementType; + label: string; + value: string | number; + subtitle: React.ReactNode; + progress?: number; + pulse?: boolean; + color: string; + badge?: string; } function StatCard({ - icon: Icon, - label, - value, - subtitle, - progress, - pulse, - color, - badge, + icon: Icon, + label, + value, + subtitle, + progress, + pulse, + color, + badge, }: StatCardProps) { - return ( -
- {badge && ( -
- {badge} -
- )} + return ( +
+ {badge && ( +
+ {badge} +
+ )} -
-
-
- -
- {pulse && ( - - )} -
+
+
+
+ +
+ {pulse && ( + + )} +
-
-
{value}
-
{label}
-
{subtitle}
-
- -
-
- ); +
+
{value}
+
{label}
+
{subtitle}
+
+
+
+ ); }