Commit graph

833 commits

Author SHA1 Message Date
Jamie Pine 2c533c7599
[Feature] Inspector video preview 2023-04-05 21:07:20 -07:00
Jamie Pine cee435938e
[Fix] Add location button went ugly 2023-04-05 19:55:57 -07:00
Brendan Allan 071af22b42
fix syncing (#679) 2023-04-05 19:47:10 -07:00
Brendan Allan b32ea8438c
fix quick rescan loop (#678) 2023-04-05 19:21:03 -07:00
Utku 63afacbc54
Mobile Analytics and some changes (#667)
* update contributing & environment-setup

* fix pods deployment target to 13.0

* Track app screen changes with plausible

* Don't track onboarding

* remove platformType from usePlausibleEvent

* submit custom plausible events
2023-04-04 05:41:09 +00:00
Utku 86c47dde4a
Prettier & Format (#668)
* format

* fix lint issues
2023-04-04 05:39:07 +00:00
nikec fc830ff922
[Desktop] Add label & error to form field (#659)
* Add label and error to form field

* Add error styling

* Update other form fields

* Update FormField.tsx

* Update Input.tsx

* Move field state to hook

* remove required
2023-03-31 10:34:52 +00:00
Brendan Allan 5782af36eb
fix ts (#661)
* fix ts

* eslint
2023-03-31 00:22:54 -07:00
nikec 8aa1a5ff28
[Desktop] Fix edit library navigation (#658)
Fix edit lib navigation
2023-03-31 05:41:54 +00:00
nikec 8584f23b9c
[Desktop] Fix current library label (#656)
Fix current lib label
2023-03-31 05:01:13 +00:00
nikec 7d996a10cc
[Desktop] Menu tag assignment (#647)
* [Desktop] Improve explorer item context menu tags

* [Desktop] Add tag assignment to file inspector

* clean up

* Update tags/CreateDialog.tsx

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-30 03:11:21 +00:00
nikec 04542a367c
[Desktop] Fix popover props (#653)
* clean up, add fade in animation

* Update DebugPopover.tsx
2023-03-30 03:09:01 +00:00
nikec afb2cea12d
[Desktop] Fix input right buttons (#651)
* update color picker

* fix position and ref

* style hex input

* update input field

* add Icon type option

* Update input

* change right padding on lg size

* update other inputs

* update color picker input

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-30 03:08:04 +00:00
nikec 5377f1b012
[Desktop] Fix color picker ref forwarding, add hex input and styles (#649)
* update color picker

* fix position and ref

* style hex input
2023-03-30 02:49:19 +00:00
nikec 35e8b78634
[Desktop] Fix inspector tag overflow (#637)
* [Desktop] Truncate inspector tag names

* replace title with tooltip
2023-03-29 04:59:41 -07:00
nikec 8f3d135caa
[Desktop] Fix menu colors and arrow highlighting (#639)
* [Desktop] Context Menu cleanup

* [Desktop] Update dropdown with new menu changes

* [UI] Change dark menu line color

* [Desktop] remove menu animate prop and make it a default

* Remove duplicate classes
2023-03-29 10:54:02 +00:00
Vítor Vasconcellos 20f0e7f15a
Fix adding Locations that already have a .spacedrive file (#627)
* Handle RPC errors when adding Locations
 - Add custom error codes for NeedRelink and AddLibraryToMetadata errors in backend
 - Handle errors in AddLocationDialog form
 - Show custom error message for above errors and ask user to confirm action
 - Handle user action confirmation with appropriate RPC method (`locations.relink`/`locations.addLibrary`)

* Abstract openDirectoryPickerDialog logic to a function
 - Add 'Unkown Error' when code doesn't match a know one

* Fix bugs in logic to handle `locations.create` errors
 - Fix minor issue: AddLocationButton opened the dialog in desktop even when the user cancelled the file picker
 - Replace ternary with object for custom form error messages to allow for easier expansion
 - Break onSubmit logic up into functions
 - Remove incorrect `locations.indexer_rules.delete` call
 - Fix Checkbox element state not updating on external form state changes

* Adjust AddLocationDialog style to match other Dialogs in the app
 - Reset exception code at the end of `confirmAfterError`

* Rework how backend errors are handled when adding Locations
 - Change NeedRelink and AddLibraryToMetadata errors to use 409 (Conflict) status code and a static message.
 - Only enable custom submit logic in AddLocationDialog for 409 (Conflict) errors that have a known custom error form message.
 - Differentiate previous errors based on their messages instead of status code in AddLocationDialog onSubmit.
 - Add @hookform/error-message dependency for improved form validation error rendering.

* Invalidate library.list to ensure it is shown on sidebar

* Improvements to AddLocationDialog
 - Remove uncessary scope block and make useEffect depend directly on `form`
 - Move `form.handleSubmit` from `onSubmit` call to `handleSubmit` definition
 - Change basic Checkbox to RadixCheckbox and adapt onChange logic to onCheckedChange
 - Some simple styling improvements to the error message
2023-03-28 07:09:52 +00:00
Oscar Beaumont c2666f7f63
Sync over p2p (#606)
* sync no networkey

* sync technically wired up

* fix p2p endianness for sync payload

* some sync debug stuff

* feature gate message production

* bump lockfile

* execute queries when sync messages disabled

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-21 06:03:08 -07:00
nikec bf7d728730
[Desktop] Fix initial edit location load (#626)
[Desktop] Fix initial load
2023-03-21 05:02:16 +00:00
nikec 29f0dfb338
[Desktop, UI] Fix library dropdown overflow & navigation (#619)
* add radix dropdown menu

* [desktop] Improve Libraries Dropdown

* rename alignToParent prop and fix sizing

* Update pnpm-lock.yaml

* Revert "Update pnpm-lock.yaml"

This reverts commit 6113361c51.

* fix pnpm lock
2023-03-21 05:01:48 +00:00
Vítor Vasconcellos 0fd53d1287
Improve AddLocationButton & Implement UI for indexer rules (#620)
* Improve AddLocationButton + Implement UI for indexer rules

* Minor code clean-ups
 - Remove unused variables and imports

* cleanup AddLocationDialog props

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-19 17:08:48 +00:00
Vítor Vasconcellos a6a57bbd50
Fix pnpm format command failing with some files (#622)
* Fix `pnpm format` command failure
 - Update prettier and plugins dependencies
 - Add auto-install-peers to .npmrc
 - Fix formating of previously failing files
 - Some basic security mitigations (`pnpm audit --fix`)

* setup-system.sh: Don't do a full system update on ArchLinux

* Revert "Some basic security mitigations (`pnpm audit --fix`)"
2023-03-19 16:47:10 +00:00
nikec 249d5b5534
[desktop] fix tag & location name overflow (#618) 2023-03-19 06:02:10 +00:00
Utku 902a3b5ba1
Onboarding, Spacedrop & Location Settings Screen & Styled API (#596)
* fix wrong current lib logic

* add delete lib dialog to LibraryGeneralSettings

* add delete lib to mobile LibraryGeneralSettings too

* onboarding screens

* move zxcvbn to @sd/client

* get started screen and bloom

* merge fix

* move generatePassword back to interface

* add useZodForm to mobile and match react-hook-form versions

* new lib screen

* Implement styled api

* create lib screen and some tweaks

* password input

* fix password meter comp

* new library style tweaks

* Fix remove password bug (interface)

* master password screen

* privacy screen

* creating lib screen

* hexagons are cool

* Expo 48

* keyboard handling

* fix P2P on IOS

* fix types

* asset script

* new icons

* Spacedrop screen

* Fix mobile asset imports

* fix import cycle warning

* Edit Location Settings screen and style changes on other setting screens

* fix library creating bug? hopefully lol

* move PasswordMeter to interface

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-03-17 02:00:02 +00:00
Jamie Pine 3b4248c836
[ENG-441] Explorer size toggle (#611)
explorer size toggle + light theme icons start + radix checkbox
2023-03-16 18:59:06 -07:00
Brendan Allan 145f87cdab
Data Router (#609)
* data router time

* update pnpm.lock
2023-03-15 16:11:47 +00:00
Utku 5b6c8c9165
Assets Export Script (#608)
* asset script

* Add commonjs vite plugin

* Use the index file and rename some images

* Delete unsued files and imports

* Change require to import

* Remove @ts-nocheck bcs why not
2023-03-15 11:15:59 +00:00
Ericson "Fogo" Soares 4a6b057872
[ENG-371] Subpath shallow re indexing (#599)
* Introducing sub path indexing for IndexerJob

* Introducing shallow indexer job

* Some feature flags to avoid warnings at pnpm prep

* Many fixes at shallow indexer job

* Changing how we implement the bookkeeping for file_path ids
Now we're account for independent locations, and also integrating
better with the LibraryContext, instead of using a static global

* Making indexer job reentrant

* Introducing shallow file identifier job
And a bunch of minor refactors

* Rust fmt

* Removing light scan from getExplorerData query
Light scan is a mutation, so we can call it on useEffect function from
the Explorer component in the frontend, when a location_id or the explorer
path changes

* Handling job early finish on init for identifier

* Only invalidate query if we have orphan paths

* Introducing ShalowThumbnailerJob

* Clippy warnings about `into_iter()`

* Naming scheme for Prisma's selects and includes

* Invalidating getExplorerData at thumbnailer

* Small mistakes lol

* Some nitpicks with pnpm prep

* Rust fmt

* Changing indexer's walk log to `trace!`

* Not deleting all file_paths on location fullRescan

* TS typecheck

* Removing `file_path` selection just with id
2023-03-10 16:25:58 +00:00
Oscar Beaumont 7c5f760fbd
Basic Spacedrop working with rspc! (#601) 2023-03-09 06:23:17 -08:00
Jamie Pine f98d7ad6e0
[ENG-408] Dynamic Object icons (#600)
* improved object icons

* remove redundant control flow

* added support for base icon overrides by extension
+ deleted old icons folder and moved official icons into there

* fixed folder icon error

* removed temp nodes example

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-03-09 11:08:10 +00:00
Oscar Beaumont 66fe8d1814
[ENG-227] Desktop app and landing page telemetry using Plausible Analytics (#583)
* add Plausible analytics to landing page

* proxy plausible through vercel

* fix typo & add other options

* add plausible to `sd/client`

* add telemetry sharing option into library config

* add telemetry config option to lib creation dialog

* revert error message change but keep the typo fix

* add telemetry sharing & error handling to client context

* add important note about requiring the tracker component in root/base layouts

* add the `PlausibleTracker`

* grammatical tweaks

* some TS cleanup

* disable analytics in debug mode

* further component improvements and use custom event props

* more cleanup

* remove tracking from onboarding (no telemetry sharing config option)

* update comment

* add fancy new plausible hooks/tracking

* add `pageview` monitoring hook to `$libraryId` layout

* add library creation events to onboarding and creation dialog

* revert `useCurrentLibraryId()` error handling & add important comment

* minor comment tweaks

* replace `usage` with `telemetry`

* add missing newline

* add location create & delete events

* add tag create & delete events

* add/update library create & delete events

* add fn for getting telemetry settings for library by uuid

* add more events + fix a few bugs

* update generics

* add `telemetryState` `valtio` store

* use new telemetry state

* remove old artifacts from `ClientContext`

* Revert "add telemetry sharing option into library config"

This reverts commit afb9f892ab.

* update events, docs & generics

* add `tagAssign` event

* light comment updates

* const names, comments, etc

* add additional info to props and update comment

* add telemetry sharing to debug state (for sharing telemetry in debug mode)

* update `debugState` item name

* change how `Switch` updates the store in privacy settings

* remove `getTelemetryState` from `telemetryState`

* cleanup library creation event handling/telemetry config updating

* add `DebugPopover` to onboarding in debug mode

* improve code quality/comments

* remove useless comment

* rename `ob_store` and `shareTelemetryDataWithDevelopers`

* fix typo

* add `telemetryLogger` and prevent multiple of the same events from firing consecutively

* add more unique path matching and fix an issue with events

* rename `telemetryLogger` -> `telemetryLogging`

---------

Co-authored-by: brxken128 <77554505+brxken128@users.noreply.github.com>
2023-03-09 08:37:57 +00:00
jake ad157f58a5
[ENG-376] Fix double libraries being created during onboarding (#582)
* ensure the library creation `useEffect` only ever fires once

* use an early return
2023-02-28 12:19:55 +00:00
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