Commit Graph

375 Commits

Author SHA1 Message Date
Utku
b856f15b22 Tailwind Prettier Plugin (#557)
* add tailwind prettier plugin + run prettier

* add eslint tailwind plugin and eslint fix to turbo

* Ran eslint fix + fixed every other lint issues

* twStyle and lint stuff

* remove auto lint as it's buggy

* update eslint & add twStyle to tailwind regex

* Fix auto lint + config inconsistencies

* Add tailwind config to prettier config

* run lint:fix

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-02-16 07:04:19 +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
Brendan Allan
808bc9f33a Merge pull request #566 from JulesGuesnon/fix/file-unhighlighting 2023-02-10 12:03:15 +08:00
JulesGuesnon
4db0116bad refactor(Explorer): Removed long check by a stopPropagation 2023-02-10 11:59:31 +09:00
JulesGuesnon
3a2e34664c fix(Explorer): Added unhighlightning when clicking outside a file 2023-02-09 20:25:07 +09: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
Jules Guesnon
07401ac08f [Fix] Dropdown focus when app is launching (#563)
fix(Interface): Removed the focus when app is launching
2023-02-08 13:37:25 -08: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
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
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
Brendan Allan
8c4cdb1ede Merge branch 'main' into closable-job-manager 2023-01-25 12:25:05 +08:00
Brendan Allan
c1cccc29cc convert overlay to popover 2023-01-25 12:24:38 +08:00
nikec
cd3b95bc3d popover 2023-01-24 23:54:01 +01:00
nikec
a90cc42385 Revert "overlay panel ctx, closable job manager"
This reverts commit 96978785b9.
2023-01-24 22:53:57 +01:00
brxken128
5053b6ab53 fix broken forms 2023-01-24 16:23:03 +00:00
brxken128
0ba0945662 use alertDialog within key mnanager panel 2023-01-24 16:22:48 +00:00
brxken128
ecc6ac9a53 update bindings and TS mutations 2023-01-24 14:57:44 +00:00
brxken128
b2193cb537 fix missing trashsimple icon 2023-01-23 11:33:50 +00:00
brxken128
2d2f45be3d Merge branch 'main' into eng-345-cut-copy-duplicate-actions 2023-01-23 11:03:27 +00:00
nikec
96978785b9 overlay panel ctx, closable job manager 2023-01-22 17:54:11 +01:00
Brendan Allan
c064d094d5 fix dependencies 2023-01-22 16:09:28 +08:00
Brendan Allan
d3737cea97 simplify eslint configs + add CI job 2023-01-22 16:01:15 +08:00
maxichrome
a0975ec8c0 fix prettier unparseable file issues 2023-01-20 23:40:30 -08:00
Brendan Allan
e4e80fa603 Refactor routes (#535)
* refactor routes

* use default export for screens

* use "route" relative routing

* don't use absolute import for root screens

* no absolute importing folders!!!

* fine we can absolute import folders
2023-01-20 12:40:36 -08:00
brxken128
2a40bf403d clean things up a tad 2023-01-20 14:02:36 +00:00
brxken128
8c70bc40ea remove unused icon 2023-01-20 13:26:07 +00:00
brxken128
e26cbd77fc add "nice data" for jobs 2023-01-20 13:26:04 +00:00
brxken128
508c6bdd6b attempt to move duplicate over to copy job 2023-01-20 13:23:17 +00:00
brxken128
efc7843c24 use files.cutFiles route within TS 2023-01-20 13:21:05 +00:00
brxken128
6b5af02b87 add frontend ground work for cut/copy actions 2023-01-20 13:18:11 +00:00
brxken128
f81c1b35a8 basic single file duplication 2023-01-20 13:12:11 +00:00
Brendan Allan
24de617b92 Fix webkit reload (#534)
* wrap WKWebView in UnsafePointer

* formatting

* more formatting
2023-01-20 00:25:12 -08:00
maxichrome
ec4352a30a cleanup(don't hate me): prettier format everything 2023-01-19 19:32:35 -08:00
Brendan Allan
c2ab9466f5 New dialog system (#531)
* use new dialog system

* rename + cleanup

* fix util imports

* remove GenericAlertDialog*

* remove unnecessary setShow
2023-01-19 19:23:22 -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
Brendan Allan
2059c64e1f stop doing useRef outside component (#530) 2023-01-18 19:49:17 -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
Jeremy Möglich
1a1ddf3409 Desktop - Add more tooltips (#519) 2023-01-16 17:32:14 -08: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
Brendan Allan
ae94ada4f8 Begin form abstraction (#515) 2023-01-12 07:26:59 -08:00
Utku
783d7736f6 Mobile Explorer (#512)
* Fix spacing

* Primitive popup menu

* Sort by & layout menu

* Add sort direction

* Style sort by menu

* new file icons

* thumb wrapper

* update packages & fix folder color

* explorer list & grid views

* Fix grid view spacing

* Grid image sizing

* Explorer store + calculation of grid item size

* Explorer list view

* Explorer store on filerow too
2023-01-11 14:39:19 +03:00
jake
4536710586 Detect SD-encrypted files and display them as such (#511)
* add encrypted file magic bytes/extension

* use archive icon for encrypted files temporarily

* use pascal case for encrypted extensions

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-01-11 00:40:49 -08:00
jake
434bc81deb [ENG-329] Crypto dialog refactor (#509)
* update backup restoration dialog

* restructure MPC dialog

* refactor `EncryptFileDialog`

* dialog changes

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-01-11 00:38:45 -08:00
jake
fbd8b6d199 [ENG-327] Crypto refactor (#510)
* fix secret key showing as `Some()` when it's empty

* rename function

* use `uuid` feature of `rspc`  so clippy works with `--all-features`

* remove dead error

* update clippy rules

* more idiomatic + cleaner hashing, that handles secrets better

* remove dead code + minor refactor of the KM

* cleanup`KeyManager::get_key()`

* cleanup keys router

* variable inlining, idiomatic rust, etc

* clean up encrypt/decrypt jobs

* embed preview media into encrypted files

* even more idiomatic rust

* fix previous file extension code (no amount of idiomatic rust can fix bad patterns)

* hopefully make large serialization slightly more efficient

* remove dead code + old tests

* inline key derivation (not so sure about this one)

* use `then` instead of `if`

* stop using expensive clones

* add `Protected::into_inner()` to prevent `.expose().clone()` patterns

* use `tokio::fs::File` where possible

* add and use `JobError::MissingData`

* use `|| null` for the secret key

* use `block_in_place` for large r/w sync tasks
2023-01-10 12:36:28 -08:00
Brendan Allan
c08622827c Use import aliases (#508)
* implement a bunch of aliases

* build packages with tsc for turbo
2023-01-06 20:21:36 -08:00
Brendan Allan
c61c773147 relative imports in @sd/interface (#504) 2023-01-06 19:07:24 -08:00