Commit graph

174 commits

Author SHA1 Message Date
Brendan Allan c65d92ee4c
[ENG-380] Interface code structure improvement (#581)
* beginnings of app directory

* settings mostly good

* colocate way more components

* flatten components folder

* reexport QueryClientProvider from client

* move CodeBlock back to interface

* colocate Explorer, KeyManager + more

* goddamn captialisation

* get toasts out of components

* please eslint

* no more src directory

* $ instead of :

* added back RowHeader component

* fix settings modal padding

* more spacing, less margin

* fix sidebar locations button

* fix tags sidebar link

* clean up back button

* added margin to explorer context menu to prevent contact with edge of viewport

* don't export QueryClientProvider from @sd/client

* basic guidelines

* import interface correctly

* remove old demo data

* fix onboarding layout

* fix onboarding navigation

* fix key manager settings button

---------

Co-authored-by: Jamie Pine <ijamespine@me.com>
2023-02-27 21:29:48 -08:00
Oscar Beaumont faeb0473cf
UI testing (#565)
* store demo data in React Query

* Playwright for UI screenshots

* use path based routing on web

* Fix Typescript error
2023-02-27 13:15:47 +08: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
Utku e9e8d2286c
Mobile Actions & File Info Modal (#573)
* better drawer

* fix build?

* style changes

* fix subfolder navigation

* bigger icons and drawer style tweaks

* Disable Menu animation

* more subfolder navigation & title stuff

* move tag dialogs to modal

* cleanup

* Fix text input sizing

* Improve modal component

* Hide modal close button & fix position

* update packages

* style create tag / update tag modals.

* move dialogs to modal & new modal component

* move IsPath and isObject to client + small fixes

* fix FileModal

* move kind to client

* move everything to components + cleanup

* move format bytes, info pills, work on fileinfo and actions modal, update packages, rename xcode build step

* Update Device.tsx

remove placeholder data

* small fixes

* actions modal header and some styling

* fav button

* actions item, divider and container components

* file actions

* file info modal

* remove bg-green from Inspector

* Add more info to fileinfo modal

* Delete unused Device component

* fix merge stuff

* linting + changed how we export tw + rename tw.style to twStyle
2023-02-20 05:24:59 +00:00
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
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 8c4cdb1ede Merge branch 'main' into closable-job-manager 2023-01-25 12:25:05 +08:00
nikec cd3b95bc3d popover 2023-01-24 23:54:01 +01:00
Brendan Allan ba6b417bd7
Merge branch 'main' into eslint-overhaul 2023-01-23 01:44:28 -08:00
maxichrome 1b6b3d8a48
Add clean command (#540)
Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>
2023-01-22 22:38:52 -08: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
maxichrome 7a107f134c refresh pnpm lockfile 2023-01-19 20:29:51 -08:00
maxichrome 7268495b6f install lint-staged 2023-01-19 19:19:35 -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
Brendan Allan c61c773147
relative imports in @sd/interface (#504) 2023-01-06 19:07:24 -08:00
Brendan Allan 05a6ea0319
Fix Vercel Deployments (#503) 2023-01-04 20:32:46 -08:00
Ericson "Fogo" Soares bcbcd260d4
ENG 223 Location Awareness (#468)
* 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>
2022-12-31 00:53:24 +08:00
Utku Bakir 959783b08a Bump node to lts (v18) 2022-12-14 12:43:02 +03:00
Utku 42f09b0918
Mobile - Settings & Tags (#479)
* Sync tailwind configs

* Switch to new colors part 1

* new colors part 2

* switched to new colors

* settings screens template

* settings progress

* Setting header titles

* Refactor settings icon

* Fix tsconfig relative path issue

* Move mobile eslint config to @sd/config

* Add no-restricted-imports rule to eslint

* rename TextInput to Input & tailwind font sizing

* General Settings screen + Card component

* Library settings screen & delete lib dialog

* autoform hook

* Mini tweaks and new packages

* Exclude android & ios from search

* Add Switch (Input)

* Library General settings screen

* Refactor settings + Switch and Switch Container

* Locations screen & delete and rescan locations

* Rename folder + small tweaks

* Make things Swipeable

* Create Tag Dialog with color picker

* Upgrade to Expo 47

* More tag stuff

* fix pnpm lock

* regen pnpm-lock

* Change CI node version to 16

* Move `isVideo` into shared package

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2022-12-13 15:18:03 +08:00
jake 3ce8c74a0d
[ENG-313] Key auto-generation and viewing (#478)
* add generic dialog for keys settings

* revert artifact failed key viewing attempt

* move `Select` key list component

* rename dialog

* remove unused imports and add new select option for *all* keys

* add WIP but broken key viewer dialog

* cleanup code and fix key viewer dialog

* add clipboard icon and copy functionality

* generalise the `AlertDialog` and refactor `BackupRestoreDialog` to use it

* use new alert dialog in place of JS/tauri alerts

* use generic alerts everywhere and bring generic alert props/default state

* make `SelectOptionKeyList` generic for mounted/unmounted keys (with the use of `map` for the latter)

* add clipboard to generic alert dialog + clean up

* fix accent colour button for backup restoration

* remove unneeded props from components

* add slider+automount button

* tweak password gen function

* add password autogeneration

* clippy

* tweak password generation

* use `crypto-random-string` and drop rust password generation

* add default TEMPORARY keymanager pass/secret key to library creation screen

* make key automounting functional

* clean up key viewer

* change dialog name

* remove slider as that wasn't even being used?

* make requested changes and hide key viewer if no keys are in the key manager

* prevent automount and library sync from being enabled simultaneously

* include `memoryOnly` in key

* mark keys as memoryOnly
2022-12-12 17:13:52 +00:00
jake 5651ac3f69
[ENG-251] Crypto Jobs (#475)
* add base crypto job

* leave hashing to the KM and not keyslots

* add latest header object versions and update examples

* add a very experimental (local file!) encrypt job

* working file encryption with default key

* working file decryption

* non-working encrypt file dialog

* general code cleanup

* comments and correct feature locking

* fix the `Dialog`

Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>

* WIP encrypt dialog

* massive encrypt dialog overhaul

* add generic explorer alert dialog

* better key naming/numbering, alerts for unsupported scenarios

* cleanup + decrypt file dialog

* remove debugging stuff

* remove dead code & fix a bug with key select being empty

* clean up dialog UI massively

* add support for setting output path

* add correct button type to prevent early dialog submits

* add "nice" job data for encrypt/decrypt

* tweak functionality of key setting in encrypt dialog

* include full file metadata if selected, and lay out groundwork for preview media inclusion

* add comment about not restoring metadata/pvm just yet

* general cleanup

Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>
2022-12-07 15:16:13 +00:00
jake 2baf16d982
[ENG-307] Key manager features (#467)
* working key management in settings page

* sync with library button

* fix `rspc` feature and add passphrase generation

* untested key manager rework

* trying to return values from mutations

* update library manager and remove settiong master PW

* update bindings

* set static secret key/master password

* prompt user for master password if correct one hasn't been provided yet

* add `hasMasterPassword` route

* add `clearMasterPassword` route + remove dead code

* tweak `set_master_password()` and add dedicated error

* tweak UI, fix `few hooks than expected`, add unmount+lock button

* remove old comment

* fmt

* clippy

* move static key/password setting so it doesn't fail sometimes

* add dedicated `get_key()` and remove keys from memory

* add `getKey` route

* update bindings

* use `const` instead of `let`

* comment updates

* update schema to remove salt

* add string parse error

* generate passphrase within key manager

* generate new migrations

* feature gate serde support in `crypto` crate

* fmt

* more specific error types

* foramatting

* add locking mechanism to keysettings page (not working?)

* fix react hook issues

Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>

* remove empty onclick

* add keymanager dropdown menu

* working key backup functionality

* add experimental master password changing support

* update bindings

* semi-working change master password dialog

* use gear/lock icons to clean up key manager UI

* make settings button functional

* make buttons uniform and format code

* fix double base64 encode

* add change master password dialog and secret key dialog

* code cleanup

* restore backup dialog

* change UI wording

* make a start on restoring from a backup

* potentially working keystore restore

* don't overwrite verification key if one is set

* working backup restore + fix master password changing

* fix typo in static password/verification key check logic

* change wording to make UI clearer

* disable mount button if key is empty

* handle errors+remove type annotations

* show total imported keys on backup restoration

* add zxcvbn package

* change input border colour based on zxcvbn score

* clippy and formatting

* password strength meter

* remove nbsp

* add button type to stop early form submission

* use `react-hook-form` for backup restoration dialog

* more `react-hook-form` stuff

* attempt to fix password meter

* small cleanup

* Fix password meter

* update colours

Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2022-12-02 10:18:21 +00:00
Brendan Allan c593fa3344
Utilise tsconfig paths for workspace module resolution (#454)
* use @sd/client for tsconfig extends

* move all svgs to @sd/assets

* only use vite-tsconfig-paths

* remove ui from web

* use relative extends for ui tsconfig

* remove aliases from landing?

* use wacky landing vite config

* try using tsconfig paths and root on landing

* Revert "try using tsconfig paths and root on landing"

This reverts commit 43bd2a0f84.

* remove tsconfig-paths from landing
2022-11-06 20:18:41 -08:00
Brendan Allan 8007523b80 use node 16 2022-11-06 10:14:09 +08:00
Brendan Allan edb0c41c49 remove 'tailwind' dependency 2022-11-06 10:08:58 +08:00
Utku 76e3d0b9a2
Mobile - File Import (#443)
* Fix File modal and Stats

* Add disabled and loading state for dialog

* Close library drowdown with drawer

* catch Rust panics on mobile to prevent UB

* Update packages

* Move create lib dialog to container

* Create library on onboarding

* Cleanup metro config & update packages

* onClose for Dialog & update library cache

* Fix pods, downgrade react-native-svg

* Fix lib switching, organization, start import modal

* Add device size info

* Revert merge + version upgrade/fix

* Create Location & Remove placeholder data

* Create default modal component

* Check if the location already exists

* Add media-library + prettier

* fix build

* Fix Xcode shellScript too

* More small fixes

* don't export bindings on mobile devices

* Explorer store + cleanup

* Explorer comp. & add flashlist

* [WIP] Files in Locations & new file thumb

* clean merge

* Fix imports

* Fix core on mobile

* Add platform context to mobile

* Refactor libraryStore

* Add thumb url path to platform context

* Try fixing app startup

* Add zip and video to filethumb

* Delete bindings.ts from mobile

* Remove heroicons from mobile too

* useForwardedRef hook

* Media Library permission stuff

* Clean import modal

* remove valtio-persist from @sd/client

* prevent Sentry capturing all events

* refactor `@sd/client` to make it better for mobile

* fix mobile splashscreen
Just trust me bro

* fix mobile draw active style

* use custom valtioPersist for current library state

* remove mobile lockfile
It's now in the pnpm workspace so it shared the main one.

* finally remove valtio-persist

* remove 'mobile' from Platform as it's in interface

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2022-11-01 21:32:56 +08:00
Oscar Beaumont 4e0b595073
Error Bounary Sentry support (#444)
* Sentry support

* remove broken import

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: Jamie Pine <ijamespine@me.com>
2022-10-29 02:06:09 -07:00
Brendan Allan b713c896a0
More Sync Stuff (#438)
* broken sync example

* move to react

* filter owned ops more

* update deps

* working sync

* relation operations

* fix pnpm lock

* please rustfmt

* fix api

* compare strings properly

* please clippy

* feature gate logging

* use bleeding rspc in example

* use bleeding rspc

* use generated rspc client
2022-10-27 23:12:28 -07:00
Jamie Pine 0725459fc0
Polish Icon Usage (#437) 2022-10-25 18:47:09 -07:00
Oscar Beaumont b099d47fec fix database migrations 2022-10-25 06:53:24 +10:00
Jamie Pine 2d8590c616 job indicator + styling 2022-10-24 01:17:10 -07:00
Jamie Pine 5ba07ac6c2 more theming 2022-10-22 22:46:46 -07:00
Jamie Pine da344f954c styled explorer top bar 2022-10-21 23:21:22 -07:00
Jamie Pine 2f105e9bb6 Merge remote-tracking branch 'refs/remotes/origin/spacedrive-but-themable'
Conflicts:
	packages/interface/src/screens/settings/client/GeneralSettings.tsx
	packages/ui/src/Dropdown.tsx
2022-10-21 21:53:45 -07:00
Jamie Pine a9e263e2f6 refactor switch component + update styles 2022-10-21 21:50:47 -07:00
Brendan Allan d6880c0343 dropdown refactor 2022-10-22 01:35:03 +08:00
Jamie Pine c4226f0e7a Merge branch 'eng-259-identify-objectkind'
Conflicts:
	apps/landing/package.json
	apps/landing/vite.config.ts
	packages/interface/src/AppLayout.tsx
	packages/interface/src/components/explorer/Explorer.tsx
	packages/interface/src/components/explorer/ExplorerTopBar.tsx
	packages/ui/src/ContextMenu.tsx
	pnpm-lock.yaml
2022-10-20 22:49:15 -07:00
Brendan Allan 09201d0fa8
use custom tailwind styled function (#426)
* use custom tailwind styled function

* update pnpm lock

* fix landing vite config
2022-10-20 17:34:40 -07:00
Jamie Pine e39f903b07
some esm vite plugin thing (#425) 2022-10-20 16:21:50 -07:00
Brendan Allan 3dc993122f remove tauricon 2022-10-20 03:51:35 +08:00
Brendan Allan 0f1a117f8f update pnpm-lock 2022-10-19 18:47:55 +08:00
Oscar Beaumont 4ab1e65059 Merge remote-tracking branch 'origin/main' into fix-reactivity 2022-10-18 22:09:33 +08:00
Oscar Beaumont 11c370e4c7 purge unused dependencies 2022-10-18 21:52:00 +08:00
Jamie Pine f300049873 improvements to key manager ui 2022-10-17 21:01:40 -07:00