Commit graph

1514 commits

Author SHA1 Message Date
Vítor Vasconcellos fd76705dd3
Improve Windows setup script (#673)
* Improve Windows setup script
 - Change LLVM install logic to use version 15 instead of the latest, due to incompatibilities of new LLVM (16) with `ffmpeg-sys-next` build script
 - Add check to ensure script is executed as administrator, due to chocolatey requiring admin privileges to install `protoc`
 - Update ffmpeg to 5.1.1 to match used `ffmpeg-sys-next` version
 - Don't attempt to reinstall LLVM when it is already installed

* Wait for key press before closing script

* Fix typo

* Choco install auto accept

* Specify PNPM version when installing on windows

* More logs

* Fix windows setup script not copying ffmpeg dlls to the correct location

* Better installation logic for llvm, protobuf, ffmpeg
 - Remove dependency in Chocolatey
 - Download ffmpeg version based on ffmpeg-sys-next version
 - Improve version checks
 - Install protobuf directly from github
 - Update rimraf so globbing works in Windows
 - Avoid dist/.gitignore being deleted by rimraf

* Fix bugs and handle errors in Windows setup script
- Check for connectivity with GitHub before proceeding with setup.
- Implement a workaround for pnpm bootstrap problems on Windows.
- Check if Cargo packages are up to date before parsing the metadata.
- Ensure that the FFMPEG_DIR environment variable is set.
- Use double quotes for rimraf arguments on Windows.

* Auto-install VisualBuildTools (C++) and Rust in Windows setup
 - Fix protoc envvars not being set in CI
 - Improve logs

* Install LLVM automatically
 - Remove sleeps
 - Uninstall any imcompatible LLVM version present
 - Ensure path is fresh after installing rust and cargo

* Fix system path not being set correctly in windows setup script
 - Install node with winget and pnpm with npm
 - Rewrite initial script message
 - Don't wait for user interaction when running in CI

* Improve environment check to ensure we are on Windows x64
 - Warn users if they have already installed incompatible versions of LLVM and pnpm instead of silently removing them

* Ensure Path and Env are correctly set and available in the windows setup script
 - Improve error handling
 - Improve logs

* Fix FFmpeg version parsing getting multiple version sometimes
- Fix some typos
2023-04-10 13:38:20 +00:00
nikec 6e985c68b7
Fix add location button (#685) 2023-04-10 12:00:37 +00:00
ameer2468 734a4e82e4
ENG-449 - Keyboard support for Search & Component Extraction (#683)
* Extracted components within TopBar to their own files as components. Added support for for cmd/ctrl + f and Esc for keyboard searchbar.

* Fixed misplaced event prevent default
2023-04-07 23:45:16 +00:00
Jamie Pine d081dd042f
[Fix] Spacedrop demo UI 2023-04-06 21:37:29 -07:00
ameer2468 d441d3c99c
ENG-448 - Refactor Sidebar index.tsx - separate components into their own file (#680)
Refactor Sidebar index.tsx - separate components into their own file
2023-04-06 23:40:27 +00:00
Vítor Vasconcellos 3304e8f6ce
QuickPreview Component (Needs test on MacOS) (#665)
* 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>
2023-04-05 21:15:13 -07:00
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
Vítor Vasconcellos b711fe8b27
Fix cas_id sample hashing logic (#672) 2023-04-04 13:59:19 +00:00
Brendan Allan ce9be10cdb fix core 2023-04-04 15:12:09 +08:00
Brendan Allan d44a70562b
some more sync impls (#669)
a lil more sync impls
2023-04-03 22:45:00 -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
Utku 54a2eee827
Mobile CI with Tests (#631)
* 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>
2023-04-03 08:12:28 +00:00
Jamie Pine 76c70d1052
[Fix] Convert blog to markdown, remove Ghost 2023-04-02 14:05:52 -07:00
vloe 8d20fcfe33
added title icons for slots (#660)
slot icons now works w phosphor
2023-03-31 13:36:20 +00:00
Brendan Allan 3aac6254bb
standardise vite configs (#662)
* standardise vite configs

* remove storybook from @sd/ui

* update pnpm lock
2023-03-31 04:08:22 -07: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
Brendan Allan fcf32575db
remove haden from codeowners 2023-03-30 22:49:11 -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
Ericson "Fogo" Soares b346e7ac52
Eng 372 location awareness improvements (#612)
* 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
2023-03-31 04:59:33 +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
Vítor Vasconcellos fb405f55df
Replace thumbnail server shutdown signal with a channel Receiver (#644)
- Fix tauri signal handlers being overwritten by `axum_shutdown_signal`
2023-03-29 15:47:37 +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
Brendan Allan b2455f9e8c fix typescript 2023-03-29 18:58:41 +08: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
Brendan Allan faefab2bd6
storybook v7 (#645)
storybook b7
2023-03-29 03:06:19 -07:00
Brendan Allan 21bacba28f
Sync debugging (#643)
* 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

* maybe fix ci?

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-03-29 00:38:48 -07:00
Vítor Vasconcellos 94a1f07094
Improve the way react-devtools script is injected in dev mode (#641)
* Improve the way react-devtools script is injected in dev mode
 - Implement a simple vite plugin to inject the reactdevtools script tag before serving index.html
 - Install reactdevtools and concurrently in desktop workspace
 - Replace tauri beforeDevCommand with concurrently for managing background process

* Revert adding concurrently and executing react-devtools alongside tauri desktop app
 - Add instructions on how to run desktop app alongside react-devtools to CONTRIBUTING.md

* Remove unnecessary 'react-devtools' script
 - Update wording in CONTRIBUTING.md to clarify how to launch 'react-devtools'
2023-03-29 05:14:54 +00:00
Vítor Vasconcellos c84e28189c
Fix thumbnails and file previews on Linux (#635)
* 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
2023-03-28 21:19:11 +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
Jamie Pine 2e3c708db8
[Fix] lockfile 2023-03-18 01:49:15 -07:00
Jamie Pine 3ddd83000e
[Refactor] CAS id generation code simplify
Credit: ChatGPT 4
"In this simplified version, the code calculates the sample interval based on the file size and then uses a single loop to handle both the small and large file cases. The last sample is always taken from the end of the file."
2023-03-17 20:11:08 -07:00
Jamie Pine 3b8c866cbc
[Landing Fix] App embed horizontal padding 2023-03-17 20:08:53 -07: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
Jamie Pine 776c2afd6c
update team page 2023-03-16 14:09:04 -07:00