diff --git a/README.md b/README.md index b9d0bc560500..39e33909e066 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

- Logo + Logo

Spacedrive

@@ -32,14 +32,14 @@ Spacedrive is an open source cross-platform file manager, powered by a virtual d

-> NOTE: Spacedrive is under active development, most of the listed features are still experimental and subject to change. +> UPDATE: Spacedrive is under active development, we are in the pre-alpha stage, with builds occasionally released via GitHub actions, official alpha coming soon. Organize files across many devices in one place. From cloud services to offline hard drives, Spacedrive combines the storage capacity and processing power of your devices into one personal distributed cloud, that is both secure and intuitive to use. For independent creatives, hoarders and those that want to own their digital footprint, Spacedrive provides a free file management experience like no other.

- App screenshot + App screenshot

diff --git a/apps/landing/public/github.webp b/apps/landing/public/github.webp new file mode 100644 index 000000000000..20b307aee4e7 Binary files /dev/null and b/apps/landing/public/github.webp differ diff --git a/interface/app/$libraryId/Explorer/FilePath/Thumb.tsx b/interface/app/$libraryId/Explorer/FilePath/Thumb.tsx index effb191fefe2..06b3874c47f6 100644 --- a/interface/app/$libraryId/Explorer/FilePath/Thumb.tsx +++ b/interface/app/$libraryId/Explorer/FilePath/Thumb.tsx @@ -109,6 +109,7 @@ export interface ThumbProps { className?: string; loadOriginal?: boolean; mediaControls?: boolean; + pauseVideo?: boolean; } function FileThumb({ size, cover, ...props }: ThumbProps) { @@ -244,36 +245,18 @@ function FileThumb({ size, cover, ...props }: ThumbProps) { ); case 'Video': return ( -

Video preview is not supported.

- + /> ); case 'Audio': return ( @@ -355,3 +338,52 @@ function FileThumb({ size, cover, ...props }: ThumbProps) { } export default memo(FileThumb); + +interface VideoProps { + src: string; + paused?: boolean; + controls?: boolean; + className?: string; + onLoad?: () => void; + onError?: () => void; +} + +const Video = memo(({ src, paused, controls, className, onLoad, onError }: VideoProps) => { + const video = useRef(null); + + useEffect(() => { + if (video.current) { + paused ? video.current.pause() : video.current.play(); + } + }, [paused]); + + return ( + + ); +}); diff --git a/interface/app/$libraryId/Explorer/Inspector/index.tsx b/interface/app/$libraryId/Explorer/Inspector/index.tsx index b380b298a7d0..eef1183f5750 100644 --- a/interface/app/$libraryId/Explorer/Inspector/index.tsx +++ b/interface/app/$libraryId/Explorer/Inspector/index.tsx @@ -2,7 +2,17 @@ import { Image, Image_Light } from '@sd/assets/icons'; import clsx from 'clsx'; import dayjs from 'dayjs'; -import { Barcode, CircleWavyCheck, Clock, Cube, Hash, Link, Lock, Path, Snowflake } from 'phosphor-react'; +import { + Barcode, + CircleWavyCheck, + Clock, + Cube, + Hash, + Link, + Lock, + Path, + Snowflake +} from 'phosphor-react'; import { HTMLAttributes, useEffect, useState } from 'react'; import { ExplorerItem, @@ -19,6 +29,7 @@ import { Button, Divider, DropdownMenu, Tooltip, tw } from '@sd/ui'; import { useIsDark } from '~/hooks'; import AssignTagMenuItems from '../ContextMenu/Object/AssignTagMenuItems'; import FileThumb from '../FilePath/Thumb'; +import { useExplorerStore } from '../store.js'; import FavoriteButton from './FavoriteButton'; import Note from './Note'; @@ -46,6 +57,7 @@ export const Inspector = ({ data, context, showThumbnail = true, ...props }: Pro const isDark = useIsDark(); const objectData = data ? getItemObject(data) : null; const filePathData = data ? getItemFilePath(data) : null; + const explorerStore = useExplorerStore(); const isDir = data?.type === 'Path' ? data.item.is_dir : false; @@ -80,7 +92,13 @@ export const Inspector = ({ data, context, showThumbnail = true, ...props }: Pro <> {showThumbnail && (
- +
)}
@@ -203,9 +221,7 @@ export const Inspector = ({ data, context, showThumbnail = true, ...props }: Pro Path - - {fileFullPath} - + {fileFullPath} )} diff --git a/packages/config/vite/relativeAliasResolver.ts b/packages/config/vite/relativeAliasResolver.ts index 8ec85e96e08c..2949bfcbd6ec 100644 --- a/packages/config/vite/relativeAliasResolver.ts +++ b/packages/config/vite/relativeAliasResolver.ts @@ -2,6 +2,7 @@ import fs from 'fs/promises'; import path from 'path'; import { Alias } from 'vite'; +const projectPath = path.resolve(__dirname, '../../../'); const pkgJsonCache = new Map(); const resolver: Alias = { @@ -12,10 +13,12 @@ const resolver: Alias = { const [_, sourcePath] = source.split('~/'); - if (importer!.includes('/src/')) { - const [pkg] = importer!.split('/src/'); + const relativeImporter = importer!.replace(projectPath, ''); - root = `${pkg!}/src`; + if (relativeImporter.includes('/src/')) { + const [pkg] = relativeImporter.split('/src/'); + + root = `${projectPath}${pkg}/src`; } else { let parent = importer!;