Commit graph

268 commits

Author SHA1 Message Date
Jamie Pine 677e1b63e9
[ENG-379] Explorer item resizer (#580)
* added item resizer
fixed explorer store bug
refactored file image component

* better sizing for videos

* fixed inspector width issue

* remove console.log

* added column titles to list view + extra details

* moved util

* remove imports

* Update packages/interface/src/components/explorer/FileColumns.tsx

Co-authored-by: Brendan Allan <brendonovich@outlook.com>

* address issues

* fix extension in file list name

* Update packages/interface/src/components/explorer/FileColumns.tsx

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-25 06:16:57 +00:00
Jamie Pine 3f44d6f521
[ENG-363] Spacedrop UI + Misc Improvements (#568)
* begin spacedrop ui + misc ui improvements

* better 404 xox

* Update extensions.rs

I think I prefer Container

* added DragRegion component,  ot tested cuz im on my fone

* Update DragRegion.tsx

fix import

* added dummy drop items

* better dummy data

* added clouds & search bar

* added action buttons to spacedrop items

* customize subtle button

* added support for apng, thanks luka big pants

* use relative path in sidebar

* use BYTES const

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-24 08:12:21 +00:00
Brendan Allan fd39dc3a3d
Replace Location.local_path with path (#571)
* replace Location.local_path with path

* Using more references to avoid unneeded moves and removing unneeded errors variants

* remove unnecessary stuff

* location id checks

---------

Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-02-20 05:14:47 +00:00
jake c7dbc784cd
[ENG-361] Crypto crate docs and tests (#572)
* add hashing tests

* add encryption/decryption tests

* remove `reason`

* add file header tests (preview media deserialization is broken)

* fix keyslot reading bug

* add sd-crypto testing to ci

* add tests/constants for all hashing algorthms and param levels

* add blake3-kdf tests

* use `const` arrays for storing expected output

* test for `5MiB` `encrypt_streams` and `decrypt_streams`

* add invalid/mismatched nonce tests

* update `primitives` docs

* remove erroneous `,`

* grammar tweaks

* add errors to `#[should_panic]`

* cleanup `stream` tests

* cleanup hashing tests a little

* function docs
2023-02-16 11:42:30 +00:00
Oscar Beaumont a9fceae819
improvements to spacedrive:// custom URI protocol (#550)
* 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>
2023-02-14 13:27:11 +08:00
Jamie Pine f47a2d58e5
[ENG 239] Onboarding Flow & Location Settings (#529)
* 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>
2023-02-10 14:08:13 -08:00
jake 9c3aab2f70
[ENG-357] Automatically mount associated key during decryption (#564)
* auto-mount associated key during decryption based on content salt

* use iterator directly

* cleanup
2023-02-09 10:07:53 +00:00
jake 5b78bbbb7d
[ENG-358] Malicious client protection for the KM (#562)
* add `queue_check`, `mount_check` and `unlock_check`

* make `unlock_check` marginally more readable

* clippy

* clean up & rename functions

* remove unlock check on `keys.list`

* use american spelling of `favorite`

* use `then_some` (thanks clippy)

* more american spelling
2023-02-09 09:30:26 +00:00
Brendan Allan 1436d779b8
Move location online status out of database (#560)
* move location online status out of database

* remove useLibrarySubscription

* remove old code
2023-02-07 05:58:47 -08:00
Brendan Allan 21b3a5a504 Merge branch 'main' of https://github.com/spacedriveapp/spacedrive 2023-02-07 21:26:06 +08:00
Brendan Allan 8396d0f3ee damn i'm stupid 2023-02-07 21:00:27 +08:00
jake d1b6263ae7
[ENG-355] Keychain integration (and some typesafety) (#558)
* 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
2023-02-07 12:03:12 +00:00
Brendan Allan 19765404f2 update msrv to 1.67 2023-02-01 12:21:34 +08:00
Brendan Allan 58da1822e5 remove TryInto usage in sync manager 2023-02-01 11:42:43 +08:00
Brendan Allan 95ba2e1246 remove temp_cas_id 2023-02-01 11:23:59 +08:00
Ericson Fogo Soares dd1db0338e A bunch of minor fixes 2023-01-31 20:02:23 -03:00
Brendan Allan 494e87d115 Merge branch 'main' into non-unique-objects 2023-01-30 12:11:35 +08:00
Brendan Allan bf362eadd6 store cas ids on file paths 2023-01-28 11:42:24 +08:00
brxken128 3f2a62feb4
Merge branch 'main' into eng-348-async-crypto 2023-01-25 22:02:23 +00:00
brxken128 a11d81549f
use a tokio::sync::Mutex just to be safe 2023-01-25 18:20:29 +00:00
brxken128 a3b1c8f5b8
tell everything to use workspace tokio + add tokio git patch 2023-01-25 14:36:29 +00:00
Brendan Allan 3c7c05cc87 update shared sync functions to use new system 2023-01-25 13:17:01 +08:00
brxken128 371ac93bcf
async crypto! 2023-01-24 14:19:27 +00:00
brxken128 cea4562cdc
include resumable jobs within the job match 2023-01-23 11:02:32 +00:00
Ericson Fogo Soares 5e30cf6354 Removing some unnecessary clones and other small fixes 2023-01-20 18:22:17 -03:00
brxken128 b97ad909ee remove move as it's not a valid module name (it's called cut instead) 2023-01-20 13:24:33 +00:00
brxken128 83cc7ace2d async just dropped 2023-01-20 13:24:33 +00:00
brxken128 4d79239957 major cleanup + clippy 2023-01-20 13:24:31 +00:00
brxken128 0af8f5bf57 even better copy 2023-01-20 13:23:43 +00:00
brxken128 f98ffd79c2 even more cleaning up (starting to look better) 2023-01-20 13:23:21 +00:00
brxken128 22bf284150 further cleanup 2023-01-20 13:23:21 +00:00
brxken128 639ce36242 remove duplicate 2023-01-20 13:23:21 +00:00
brxken128 cb240099e2 slowly start to cleanup copy code 2023-01-20 13:23:21 +00:00
brxken128 e9b79358bd basic file duplication with the copy job 2023-01-20 13:23:21 +00:00
brxken128 508c6bdd6b attempt to move duplicate over to copy job 2023-01-20 13:23:17 +00:00
brxken128 99440c4930 super nice file AND directory copying (the new duplicate too) 2023-01-20 13:21:08 +00:00
brxken128 8b9f05f168 working single file copy 2023-01-20 13:21:08 +00:00
brxken128 6196df4e48 add (working!) cut job 2023-01-20 13:18:17 +00:00
brxken128 1397d84e15 add file cutter to files route 2023-01-20 13:18:17 +00:00
brxken128 6b5af02b87 add frontend ground work for cut/copy actions 2023-01-20 13:18:11 +00:00
brxken128 b9f4d59bf4 fully working file duplicator 2023-01-20 13:12:26 +00:00
brxken128 bd8b6446aa cleanup duplicator job 2023-01-20 13:12:26 +00:00
brxken128 e86ed4e212 working dir duplication 2023-01-20 13:12:26 +00:00
brxken128 f81c1b35a8 basic single file duplication 2023-01-20 13:12:11 +00:00
Ericson "Fogo" Soares 50a8eb689b
[ENG-342] Block location watcher for files that are being actively modified (#522)
* Introducing LocationManager to stop and reinit watching a location

* Temporarely ignore events for a path at location manager

* Refactoring some functions to a functional style
Also introducing a tracing directive to use info level on manager logs
and fixing pnpm prep due to a conditional compilation error

* Refactoring location manager actor

* Fixing pnpm prep due to conditional compilation problems
2023-01-19 19:49:23 -08:00
jake 0a31e7f8ce
[ENG-257] File erasure and deletion (#524)
* add helper functions for getting context-menu related filesystem info

* update comments and such

* add a barebones delete job

* add file deletion route

* add (empty but working) delete file dialog

* add super experimental file erase function

* update function doc

* add erase files route

* add erase files job

* tweak file erasing in crypto crate

* bindings

* add erase files dialog

* add missing `?`

* fix erase file form trickery

* remove unused imports

* terrible attempt at recursion for file erase

* IT WORKS

* code cleanup + clippy

* async just dropped (not for erase yet)

* async erase just dropped (+async crypto crate)

* add "nice data" for jobs
2023-01-18 19:55:14 -08:00
jake 0ef7f64bbb
[ENG-328] Keymanager mounting queue (#514)
* add `get_queue` and `is_queued` to KM and router

* mark keys as being mounted/finished mounting, use a `DashSet` instead of vec

also includes temporary `dbg!()`s for manual valdiation that it works

* remove dbg and fix build (works great)

* mark key manager as unlocking correctly

* cleanup keys api

* add `KeyAlreadyQueued` error

* use react mounting queue

* fully prevent against multiple mount jobs of the same key with the rust queue

* show keymanager as unlocking in the UI

* handle query invalidation for `isKeyManagerUnlocking` with a closure (semi-temporary)

* revert changing text (doesn't work where the keymanager is unlocked from, only the other unlock screen)

* clippy

* add `useRef` for mounting queue within react

* pass `ref.current` to `Key` instead
2023-01-17 06:19:54 -08:00
Ericson "Fogo" Soares 31d04d5594
[ENG-333] Handle .spacedrive existing instead of throwing error (#521)
* Removing metadata files that failed to be deserialized

* Reintroducing deserialize error for location metadata on prod builds
2023-01-17 06:17:14 -08:00
Ericson "Fogo" Soares 31b5c4b1db
Merge pull request #517 from spacedriveapp/eng-304-too-many-files-macos-unhappy-with-prod
[ENG-304] "Too many files" macOS unhappy with prod!
2023-01-16 20:03:45 -03:00
Brendan Allan 8e479f736f
Eng 332 auto generate sync ids (#523)
* generate sync ids and use model name from ModelActions

* cleanup AddLocationDialog imports

* rustfmt
2023-01-15 07:25:11 -08:00