* Fix issue with root locations failing to be added
- Add `normpath` dependency to the core
- Improve automatic name resolution for new locations
* Add `MetadataExt` trait to extend the `created` and `modified` methods of `Metadata`
- Prevent failure in the Indexer job caused by paths without associated created or modified times; assume current time for both when unavailable
- Rename possible location in root path from `/` to `Root`
* Improve hadling of location path on Windows
- Normalize location's path to ensure a valid format on Windows
- Improve error handling when adding a path
- Avoid consuming symlinks on Linux by not normalizing location's path
- Improve location naming logic
* Add QuickPreview Component
- Improve the handling of Range requests
- Implement logic to answer HEAD and OPTIONS methods
- Handle CORS pre-flight requests
- Expand accepted file types
- Improve error handling of invalid Range requests
* Fix linter errors
- Add `use std::cmp::min` to custom_uri (Required on MacOS & Windows)
- Improve logic for retrieving file information in QuickPreview.tsx
* More linter errors
* Simplify `QuickPreview` by extracting the logic for choosing the file preview tag to a `FilePreview` component
- Fix the typo in `QuickPreview` props name
- Remove the unused `handleMedia` ref
- Move the remaining `QuickPreview` logic to the `transitions` callback
- Simplify the `cors` return type in `custom_uri.rs`
* Refactor range handling in `handle_file` function
- Move range handling logic to the initialization of the `range` variable
- Replace `if let` with `match` to reduce code duplication
- Don't export FilePreview
- Export QuickPreviewProps
* Fix typo in `RangeNotSatisfiable` error message
- Remove redundant variables
* Fixing cas_id generation on watcher
Some improvements on watcher file creation
* Rust fmt
---------
Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
Co-authored-by: Jamie Pine <ijamespine@me.com>
* stuff
* stuff (but for android)
* test mobile ci
* move pnpm up
* install ndk
* add ios & cleanup
* onboarding flow test
* test ci
* fixes, cleanup, caches
* why you do this cargo
* fix pnpm-lock
* add path to build rust script?
* ci is fun
* yolo
* fix broken flow..
* fix pnpm
* probably not gonna work
* test x2
* use real branch of pcr
* android emulator and try ios x2
* Use react native architectures, instead of all.
* override architecture to speed up android build
* protoc & build android on macos too
* fix java ndk
* android gradle
* disable ios for now
* use simulator sdk & debug configuration on ios build
* cleanup
* avd test
* fix avd settings.
* only build for x86_64 on ci
* Fix ios build
* Add IOS testing
* maestro script
* ios release build & wait for library creation
* clean up and disable android for now
* fix pnpm-lock
* Add concurrency to cancel previous runs
* fix pnpm-lock
---------
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
* Complying with a pedantic Clippy
* Solving duplicated directories events
When creating a directory through MacOS's Finder, for some reason
FSEvents receives 2 Create Folder events that we have to handle
* Handling moving to trash bin and restoring on Mac
Still missing the feature to restore a directory and its children
* Now handling creation of empty files on MacOS
* Enabling restore of directories and its children
* Now working: moving a directory to another
inside the same location
* Now Indexer also remove file_paths not on fs
* Enabling multiple file moves on location watcher
* Fix Windows conditional compilation issues
* Fixing cas_id generation and bumping some deps
* Many Windows specific improvs and some refactors
* Rust fmt
* Using conditional compilation on extract inode function
* Linux fixes and some MaterializedPath improvements
* Rust fmt again
* Introducing tick behavior on location watchers
* Making LastFilePathIdManager more atomic
* Some vscode launch configs for lldb debugger
* Simplifying some lifetimes
* Making all watchers more consistent
* Fix thumbnails and file previews on Linux
- Restructure auth_middleware to use axum's primitives to handle the auth tokens
- Fix incorrect token loading in App.tsx
- Add required dependencies for video playback to the Linux setup script
- Minor improvements to the Linux setup script, make it less error prone
- Fix a minor bug in the script_failure function in the Linux setup script
* Use a more idiomatic rust syntax in auth_middleware
* introduce cache factory
run cache factory on all branches
add names
use single quotes
add setup and prisma generation
add pnpm install
don't install cargo-watch in ci
make composite setup script
use env var for windows ci
undo all powershell stuff
* better windows ci
* don't install cargo-watch in ci
* only run cache factory on main
* i'm silly
* debug only ci
* check runner instead of matrix in setup action
* don't save cache output most of the time
* no more os-specific features
* cache entire workspace
* only cache on main again
* test instead of buidl in cache factory
* smaller ci + testing
* don't individually test each crate
* remove unnecessary needs
* smaller formatting and more clippy
* undo rustfmt changes
* disable tests
* fix `spacedrive://` custom protocol on Windows
(hopefully)
* custom protocol using `http::Response` + fix broken web
* import patches before App on web
* use `http::Request` for input to `handle_custom_uri`
* break into dedicated file + error handling
* serving files via custom protocol
* cargo fmt because vscode did cringe
* lru cache to reduce video chunk request time
* add helper to JS
* clippy be like
* remove duplicate Open buttons in context menu
* fix Linux 🙏
* no shot
* fix Windows custom URI passing (hopefully)
* better fix for custom uri on Linux
* upgrade Tauri for feature
* switch url replacement order
* prevent React dev tools script being added in prod to desktop
* remove React devtools from html
* upgrade Tauri; required upgrading rspc, Axum, PCR
* pass typecheck + less cringe bigint
* clippy is love, clippy is life
* Typecheck plz
* fix bigint to number conversion
* use httpz + localhost server for Linux
* clippy be right
* Remove console.log
* [wip] proper auth
* fix Linux sidebar padding
* Secure Axum server with random
* Extracting app setup specific to linux to a different file
* remove outdated comment
* Some tweaks on cursom_uri.rs
* file_path_with_location doesn't need to be a named include
* fix typo
* factually wrong comment
* Change `unwrap` to `expect`
* bruh
---------
Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
* begin better onboarding
* added input and altered text
* better router & text + database icon
Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>
* work on privacy screen + radio buttons
* fix video extension bug and alter screens
* add pending schema and location manager helper
* functional onboarding
* added secure temp store and started creating library loading screen
* fix secure temp keystore + api
* better onboarding
* added location settings and some overview concept, all WIP
* fix switch
* prep
* fix location router
* added backend settings
* attempted to fix form
* begin indexer rules editor, plus tweaks
* indexer rules coming soon
* fix onboarding img size
* cleanup
* clone is needed here, but clippy no like
* sike
* whole bunch of fixes
* clippy + ts
* Removing some TODOs from api/libraries.rs and fixing db size calculation
* moved object kind to client, added half functionality for appearance settings
* fix RadioGroup helper
* fix type issues
* cargo fmt
* fix creating library error handling + invalidate location list on update
* forgot to switch back to onError
* Invalidating getStatistics query on library creation and introducing the concept of waiting for a job on FileCopierJob
* F* cargo fmt
* fix RadioGroup interactivity
* wipe all migrations
* put back COLLATE NOCASE on extension columns
* update core.ts
* remove unused device component
* fix typeerror in mobile
---------
Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
* update crypto MSRV
* rename `keychain` to `keyring`
* make a start on the keymanager unlock refactor/keychain integration
* update routes
* update bindings
* add const identifiers
* add UI/front-end support for unlocking KM with OS keychains
* remove SK from lib creation dialog
* update query name
* add keyring functions
* attempt to update `change_master_password()` to use the keychain
* cleanup, fix master password change ui, better secret key in keyring detection
* cleanup TS a little
* add route for getting secret key from keyring
* update bindings
* update var names + show secret key in keys settings
* add `react-qr-code` and option to view the secret key (if it's in the OS keyring)
* allow copying SK to clipboard
* add `key_type` so we're not reliant on specific UUIDs for root/verification key handling
* clippy
* fix mobile typecheck
* fix typecheck, fix typo and tweak balloon hash parameters
* minor cleanup + typo fix
* use newtype structs
* WIP type refactoring (major readability boost!)
* update `use`
* add tokio `sync` feature
* too many structs? idk
* more cleanup
* add `generate` and `Nonce`
* `Nonce` and `Key` typesafety (beautiful)
* clippy + cleanup
* update code & examples
* fix bug & remove `ProtectedVec` as it looked out of place
* use `Key`
* add a query invalidation to make the UI extremely responsive
* ci pls work
* remove `keyringHasSk` route
* super barebones keychain start
* working+unfinished linux keychain
* add `copy` to `Identifier` and add `delete()`
* add generic errors + code cleanup
* cleanup code & add support for apple keychains
* remove `users` dep
* use uppercase UUID and tweak apple `account` variable
* revert uppercase change and clean up linux labels
* code cleanup & add a readme to the crypto crate
* remove useless `map`
* correctly handle keyring not supported errors
* add `Send` to `Box<dyn Keyring>`
* remove useless `cfg`s
* only return `Ok()` if we support keychains (pls work CI)
* clippy
* Minor fixes
---------
Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
* force key updates once a new key is mounted
* set KM decryption type if a single key is mounted
* prevent the key viewer dialog from changing size based on encryption algorithm
* fix spacing for the key mounter slider and remove unfitting text
* bump rspc version (fixes a lot of KM concurrency bugs)
* add personal reference for rspc override
Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
* add blake3, `derive_key()` and clean up code
* fix a couple of things from the previous commit
* add context strings for root/file key derivation
* add salt to schema
* update refs of `salt` to `content_salt` within the keyslot
* cleanup code and add kdf salt to the keyslot
* rename salt to content salt in examples
* cleanup header code + remove dead code
* implement key derivation for keyslots
* gen new migrations that contain a salt column
* keymanager refactor (code is very idiomatic now) - needs thorough testing
* further cleanup
* clippy
* add a master password context string
* use key derivation for deriving keys from the root key
* update to use new code and remove `match` from `en/decrypt_bytes()`
* clippy
* use less unwraps in library manager code
Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
* Introducing location online/offline checks and location relink
* Some initial drafts for location watchers
* Location metadata relink and add library
* Many improvements at job system
Now using prisma batching at identifier job
Removing blocking I/O from extension subcrate
Implementing lazy generation of thumbnails
New current directory identifier job to be used on light rescans
* Some optimizations on identifier and object validator jobs
* merge jamie's identifier PR
* fully repaired identifier job
* properly hooked up object kind
* inspector fix
* fix video badge
* small improvements to libraries settings
* identifier and inspector improvements
* fix feature flags and hook up context menu location utilities
* BETTER CONTEXT MENU x100
* test-files
* style tweaks
* new icon designs
* manifest
* fix thumbnails on web
* media data
* New Location Watcher and some minor fixes
* disable broken media_data extractor, wip
* wip
* function name fix
* Fixing pnpm prep and some warnings
* Solving a race condition beetween indexer job and FS event handlerSome other minor warnings
* Generating thumbnails on watcher
* Remove event handler on watcher
* Some initial works on modify events and other small fixes
* File update event
* Trying to be more generic with used events and some tests to validate our assumptions
* Turning on location metadata file
* Introducing core unit tests on CI pipeline
* Submiting new unit test assumptions to validate on windows CI
* Fixing unit tests
* Fixing unit tests again
* Fixing unit tests
* Fixing unit tests for macos
* Fixing unit tests for macos again
* New structure for platform dependent event handling
Implementing event handlers for Linux and MacOS
* minor fixes + rustfmt + clippy
* Windows event handling
* Introducing a feature gate to only use location watching on desktop app for now
* Putting more stuff behind feature gates to avoid warnings
* Adding feature to cargo test on CI
* Changing some debug logs to trace logs and removing Jamie specific stuff
* Make location removal from manager less async
* fix build when "location-watcher" feature disabled
* fix types + clippy
* make location manager non-static
* remove uses of `to_string_lossy`
* more invalidate_query calls
* Expose `library_ctx` directly to avoid needless clones
* New materialized_path handling for directories
* Removing cascade delete between file_path and object
- Some other minor stuff
* remove unused `CurrentDirFileIdentifierJob`
Co-authored-by: Jamie Pine <ijamespine@me.com>
Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
* add benchmarks for encryption/hashing
* add more benchmarking sizes
* general performance improvements
* massive performance gain with minimal security impact
* update `sd-crypto` author info
* add keys router
* make progress on keymanager integration
* make name non-negotiable
* hyphenate encryption algorithm names
* Revert "make name non-negotiable"
This reverts commit 9c0f51329e.
* add some more keymanager queries
* add master password and default key routes
* add newly registered key to db + fmt
* clippy, formatting and `updateKeyName` route
* add automount to schema+automount keys where `true`
* update bindings
* working key add/mount
* working keylist
* mounted keys show first
* cleanup code
* add comments, code cleanup, more functions
* unmount all keys button
* comment and keymanager `clear_master_password()`
* add no keys available message
* fix unmount button
* use dashmap for concurrency
* fix missing keylist issue and add invalidate query macro
* set correct RSPC types
* statically set master password (TEMPORARILY)
* add remove key function within the keymanager
* key dropdown menu and impl
* formatting
* allow `option_if_let_else`
* add comment about key stats
* add additional comment
* rpsc error handling for the keys route
* fix rspc errors with an impl
* crypto crate errors to `sd-crypto::Error`
* remove `map_err`
* use custom result type
* cargo fmt
* clippy
* fix builds
* remove `Error::MutexLock`
* fix unnecessary unwrap
* mutex error handling (buggy for some reason)
* clean default key logic
* fix default key clearing
* allow a key to be removed without bugs
* implement requested changes
* use a single `useMemo`
* update schema with defaults
* re-generate migrations
* use rust enums in TS
* remove dead code
* remove mutate expansion
* read key list from keymanager, not prisma
* add "Default" key marker and cleanup TS
* rustfmt
* remove dead code