Commit graph

534 commits

Author SHA1 Message Date
Oscar Beaumont 39744b5c55
Reduce production logs + button on error page for logs (#1565)
* reduce prod logs

* Open logs dir button on error page
2023-10-13 08:50:01 +00:00
Brendan Allan 25fa1f0974
[ENG-1255] Feedback popover with new API (#1532)
* feedback popover with new api

* allow unauthed feedback

* add login information

* allow no auth

* fix hooks

* remove emoji on reset

* show cancel on left of login button
2023-10-13 08:08:07 +00:00
Ericson "Fogo" Soares 996361f081
[ENG-1160] Opening a location while indexing causes a lot of jobs to be spawned (#1554)
Solved, but missing a frontend error message
2023-10-13 02:47:13 +00:00
Brendan Allan eb208a9e17
ffmpeg error (#1556) 2023-10-13 10:30:03 +08:00
Ericson "Fogo" Soares 20fde557d4
[ENG-1225] Put brakes on thumbnail generation for ephemeral locations (#1523)
* Done

* Small nitpick
2023-10-12 04:02:27 +00:00
Brendan Allan 287ccad11f
Wrong invalidate args (#1493)
wrong invalidate args
2023-10-11 09:29:29 +00:00
Ericson "Fogo" Soares bc0f4787bd
[ENG-1222] udevadm doesn't exist in Docker container (#1471)
* Changing how we watch for volumes

* Small nitpick
2023-10-11 05:59:15 +00:00
jake 078490cdd5
[ENG-1143] Media View sort by date taken (#1390)
* clippy -_-

* migrations

* alter the migration so it just renames the `dimensions` field (no db re-creation required)

* remove confusing semver addition for `libheif-sys`

* remove warning on the migration as it's just a rename

* add sort opts for resolution and date image was truly taken

* major serde ckeanup & add epoch_time and pixel_count

* rename, cleanup et optimise

* clippy

* ignore this mess

* bindings

* add explanation to schema

* comment out dt test

* better comment and WIP time

* cleanup rust

* failed timezone attempt

* remove image resolution as a sort by option

* update schema (and rename the dimensions table instead of dropping it)

* just show raw date

* add comments and update bindings

* fix migration hopefully

* fix broken migration

---------

Co-authored-by: Jamie Pine <32987599+jamiepine@users.noreply.github.com>
Co-authored-by: Jamie Pine <ijamespine@me.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-10-11 00:58:59 +00:00
Vítor Vasconcellos 9ca22733ad
[ENG-1086, ENG-1087] Add error and loading indicator to thumbnail (#1448)
* Add onLoad and onError listeners to FileThumb
 - Show toast when Original file fails loading in QuickPreview
 - Formatting

* Fix close toast not working when QuickPreview was open

* Fix panic when serving unsupported files

* Formatting & lint
2023-10-11 00:52:21 +00:00
Jamie Pine 01dbc2caf7
[ENG-864] Create directory (#1458)
* folder

* wrote function

* Abstracting duplicate on file name

* Spliting between ephemeral and indexed

* Now with more type safety

* Forgot to prep

* location + path based

* bruh

* link frontend + error toast

* strip main separator

* dumb

* bruh

* create directory

Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com>

* make some reactivity happen

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com>
2023-10-11 00:47:56 +00:00
jake fb8af0832b
[ENG-1096] Image Conversions (#1364)
* derive `Type` on `*Extension`

* update `image`, `webp` and add `rspc::Error` support to the `sd-images` crate

* rename function for verbosity

* cleanup clippy allows and use scaling fn for svg conversions

* remove dead comment

* specify `generic` image extensions and add fn to enumerate all compatible extensions

* re-exports and inline hot provided method

* another inline on a provided method

* `formatter` -> `handler` and return an explicit error if the extension isn't supported, and add `convert_image()`

* `get_ext()` inlined helper fn

* add mutation for conversion and query for getting all supported extensions

* fix `svg` scaling and generation

* update bindings

* rm old const

* temporary test for all exts

* verbosity and no manual drop

* remove dbg test

* big enum and remove `cur` extension as `image` doesn't support it

* add huge extension enum

* hopefully get path from file path id and location id

* main merge fix

* chore: update toml and lockfile

* security: update webp

* comment entire crypto crate for build times

* add bincode, huge enum and custom ser/de

* Revert "comment entire crypto crate for build times"

This reverts commit 458addaad6.

* lockfile

* theoretically working ser/de

* add svg scaling

* fix pdf matching bug and use options

* move image scaling fn

* major consts overhaul with good ser/de

* disable heif checking for now due to new trait api

* make the generic handler truly generic

* fix pdf types

* fix pdf scaling so that it's 120dpi A4 paper size by default - height/aspect res are maintained

* heavy cleanup

* note to myself

* bindings & update core to use the scaling fn from the images crate (reducing code dupes)

* move vulnerable `aovec` to be a dev dep so it stays out of release builds (it's only used in tests)

* remoev exif crate from the core as it's handled in a sep. crate

* silence a clippy warning and update lockfile

* lower the maximum file size a slight amount

* bindings and minor dep bumps

* Some improvements

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 02:57:37 +00:00
nikec 0d837d2317
[ENG-1138] Fix list view thumb flicker (#1436)
* rename

* don't forget the table

* Update RenameTextBox.tsx
2023-10-09 13:44:31 +00:00
Jamie Pine ed751a46d0
[ENG-944] Sidebar UX Improvements (#1270)
* - added local section to sidebar
- added spacedrop screen, showing local peers
- added placeholder network screen
-removed unused swift package
- created a watcher for system volumes to invalidate ui when drives are added/removed

* clouds

* fix more imports

* see more

* open location if volume is location

* gen assets

* remove log

* [ENG-939, ENG-1173] PDF Thumbnails (#1242)

* sd-pdf

* Process PDF blocking render inside a spawn_blocking
 - Load a single global Pdfium instance

* Migrate pdf thumb logic to sd-images
 - Replace block_in_place with spawn_blocking
 - Only load LibHeif once
 - Allow thumbnailer (both indexed and non-indexed locations) to process documents
 - Disable loading pdf viewer in Inspection in favour of loading it's thumbnail

* Try to load pdfium lib from absolute path

* Revert removed import due to rebase

* Small nitpick and some warnings

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>

* [ENG-888] Media view should show current folder downward (#1437)

* Done but ugly

* layout

* Now with a select

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>

* add cool folder thing to inspector + stuff

* fix text color

* fix lock

* fix typescript

* fix ts

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-10-09 10:11:23 +00:00
jake 968e37afcd
[ENG-1176] Append (x) to the end of files instead of overwriting (#1425)
* append ` (x)` to files when duplicating, renaming or pasting instead of overwriting

* cleanup commented code

* fix renames

* rustfmt

* remove unused item

* Small tech debts and some nitpicks

* Bug with appending number on duplicates

* A bug on my new impl

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-07 11:59:58 +00:00
Ericson "Fogo" Soares 97a86a9fbb
[ENG-888] Media view should show current folder downward (#1437)
* Done but ugly

* layout

* Now with a select

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2023-10-06 20:46:26 +00:00
Vítor Vasconcellos 556cf1df63
[ENG-939, ENG-1173] PDF Thumbnails (#1242)
* sd-pdf

* Process PDF blocking render inside a spawn_blocking
 - Load a single global Pdfium instance

* Migrate pdf thumb logic to sd-images
 - Replace block_in_place with spawn_blocking
 - Only load LibHeif once
 - Allow thumbnailer (both indexed and non-indexed locations) to process documents
 - Disable loading pdf viewer in Inspection in favour of loading it's thumbnail

* Try to load pdfium lib from absolute path

* Revert removed import due to rebase

* Small nitpick and some warnings

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-06 20:41:22 +00:00
Ericson "Fogo" Soares 774e5b7839
[ENG-1124 | ENG-1154] Ephemeral location bug: Opening files | Path should always be in present in Inspector (#1401)
* New functions to open ephemeral files

* Review items for ephemeral files

* Open and OpenWith context menu for ephemeral paths

* Some warnings

* Fixing inspector

* Fixing windows

* Format

* Messy rebase

* Fix macos

* Cargo fmt

* Removing devtools as it can be opened with keybind

* Fix macos

* Separating ext for ephemeral files on inspector

* Fixing bad rebase

* Removing rename button from quickpreview for ephemeral files

* Quick Preview for ephemeral files

* Requested changes
2023-10-05 07:21:37 +00:00
Oscar Beaumont 9c6e418e0f
[ENG-982] Can't load original after renaming (#1430)
* we need new invalidation system

* clippy

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-10-05 04:35:11 +00:00
Vítor Vasconcellos d75a6e9b12
[ENG-1054] libheif for Linux (plus fixes) + Webp update (#1405)
* Move postinstall script to a preprep script
 - Fix libheif crate failing to build with our libheif
 - Rework CI due to postinstall to preprep changes

* Linux heif build script + Update webp

* Fix ctrl+c/ctrl+v bug

* Improve libheif linux script
 - Add support for linux aarch64
 - Add CI workflow to build libheif for linux
 - Some other misc fixes

* Fix libheif CI requires sudo

* Fix wrong path for libheif build.rs override in Windows

* Fix wrong path manipulations in libheif build script

* 🤦

* Use ubuntu-latest in libheif action
 - Specify glib version in target triple to support old distros
 - Fix libheif artifact publishing

* Fix artifact upload path again

* Add musl support for libheif
 - Remove unused files from libheif artifact
 - Add setup logic for libheif in postinstall script

* Build libheif for linux as a shared lib

* Fix meson not building the correct arch
 - Add logic to get git branch from githubs CI env vars

* libheif finnaly works on linux
 - Make spacedrive binary rpath point to where appimage and deb expects our libs to be
 - Add some logic to tauri.js to convince tauri to bundle our shared libs
 - Work-around appimage bundling step breaking sometimes
 - Add logic to handle sigint in tauri.js to ensure we clean up after ourselves
 - Rename postinstall.mjs to setup.mjs
 - Add logic to setup.mjs to point our dev build to our shared libs in linux

* Fix windows dekstop dev
 - Rename setup.mjs to preprep.mjs

* test cache-factory

* Fix preprep script not parsing the cross compilation target triple and always using the host info to download dependencies
 - Fix action env vars not being correctly passed
 - Remove possibility to pass multiple targests to rust action

* Don't compile mobile crates on desktop targets

* Remove cache-factory pull_request trigger

* remove patched tauri cli

* Use git plumbing command to get remote branch name
 - Fallback to reading .git/HEAD if remote name was not retrieved

* fix type

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-10-03 17:31:33 +00:00
Oscar Beaumont d6d5f1505c
[ENG-1141] Show running jobs first (#1400)
* Fix Rust panics when opening HEIC in `QuickPreview`

* Sort it

* improve sorting
2023-10-03 16:26:59 +00:00
Brendan Allan 3786e93a78
Remove client secret from apps (#1423)
* remove client secret from apps

* dumb
2023-10-03 14:45:19 +00:00
Brendan Allan 861cfb8b40
Use actual oauth clients + ship ids and secrets (#1415)
* use actual oauth clients + ship ids and secrets

* re-enable features

* use prod as default api url
2023-10-02 09:36:43 +00:00
Oscar Beaumont 02f03f5351
Improve QuickPreview (#1350)
* Handle large text files

* wip

* nit

* Fix syntax highlighting

* Requiring an API call for my dev builds, no shot

* backend for line counting + wip frontend

* 600 lines is too much for this file, ngl

* wip: `LimitedByLinesBody` & some more restructuring

* Virtualised list for QuickPreview

* yeet bad ideas

* general cleanup + hack to fix broken toml

* fix

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-09-29 04:58:29 +00:00
nikec cb320f2d04
[ENG-1131] File path hidden filter (#1398)
hidden filter
2023-09-28 18:52:35 +00:00
Ericson "Fogo" Soares 54c1223256
[ENG-1081] Ignore the case of extensions when matching (#1394)
Done
2023-09-28 17:04:07 +00:00
Brendan Allan 3109601fda
Desktop + Web auth flow (#1378)
* initial login session route

* auth works!

* auth on web is dummy easy

* load api url from envs

* SpacedriveAccount + oauth

* use verification url

* heif

* better env handling

* error handling

* handle config write error

* add logout config write error
2023-09-28 16:55:46 +00:00
Vítor Vasconcellos bd0a7ff434
[ENG-265] Improve setup scripts (#1368)
* Setup script revamp

* Move toml to dev dep + CI runs the postinstall in debug mode

* Fix windows CI

* chmod +x scripts/setup.sh

* Fix eslint and ts CI

* Remove binstall + Fix trying to read input in CI

* Doesn't need to check pnpm and rust in CI

* Run postinstall script for Clippy CI

* Attempt to fix windows CI not running postinstall
 - Ignore cache when running postinstall on CI

* commited generated config.toml by mistake

* Pass GITHUB_TOKEN to `pnpm i`

* Update archive-wasm + Increase minimum node version to 18.17

* CI: Move rust setup after post-install script

* Revert: CI: Move rust setup after post-install script

* Fix CI, generate dummy cargo config.toml to fix prisma generation

* Fix windows CI

* CI: Fix wrong command

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-09-28 10:03:46 +00:00
Ericson "Fogo" Soares bee583e836
[ENG-1140] Bind an entire location to a single device number (#1386)
Removing device from file_path
2023-09-26 19:54:09 +00:00
Ericson "Fogo" Soares 052028a9c7
[ENG-1139] Walker wrongly marking files for update (#1373)
* Small warnings

* Solved another bug and more logs

* Rust fmt

* Even more logs
2023-09-23 14:43:54 +00:00
Brendan Allan 3f1ea3df10
[ENG-1132] Disable pagination for ordering by file path size (#1365)
* disable pagination for order by size

* disable 'take' when paginating on size
2023-09-22 10:12:30 +00:00
Ericson "Fogo" Soares f888054441
[ENG-1135] Locations: Total size query and return to Frontend (#1366)
* Done

* Fix size text to take its space

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2023-09-22 10:11:59 +00:00
Ericson "Fogo" Soares 3cd55bb551
[ENG-812] Folder size calculation (#1362)
* Fix warnings

* Working when doing a full location indexing

* Directory size calculation for sub_path indexing
Also for shallow indexer
Now shallow indexer dispatches sub_path scans when it finds a new folder

* Directory size calculations in the watcher

* Pass directory sizes to sync system
2023-09-21 13:11:25 +00:00
Ericson "Fogo" Soares 5005c50e23
[ENG-1116] Distinct job manager for library (#1363)
Done
2023-09-21 11:10:56 +00:00
Oscar Beaumont 1cae4fab53
[ENG-1060] Fix the PlatformProvider bug (#1353)
* Life is a lie and nothing makes sense

* consistent version

* Web uses the relative alias resolver it would seem

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-09-15 12:02:50 +00:00
nikec 42c6c358c6
[ENG-1113] Toggleable list columns (#1352)
* Toggleable list columns

* type
2023-09-15 11:03:28 +00:00
Brendan Allan e5cab646c4
[ENG-1022] Keep track of hidden files (#1328)
* allow indexing + viewing hidden files

* generate db migration

* add 'Show hidden files' control to OptionsPanel

* clippy

* handle file renames

* use macos file attributes along with unix heuristic

* handle hidden ephemeral paths

* use un-deprecated st_flags getter

* tweak for uniformity

* formatting?

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
2023-09-14 07:05:45 +00:00
Ericson "Fogo" Soares 9076709314
[ENG-1076] Opening a sub dir closes the app (#1349)
Fix
2023-09-14 02:52:50 +00:00
Ericson "Fogo" Soares 7da0fdef0d
[ENG-1107] file_path unlinked from object (#1345)
Done
2023-09-13 20:06:53 +00:00
Oscar Beaumont 94d8f61de9
Update Rust dependencies (#1314)
* Update most of Rust dependencies

* downgrade notify

* a

* fix Linux?

* Android is painful

* update build.gradle

* The lord Clippy has spoken

* Bruh

---------

Co-authored-by: jake <77554505+brxken128@users.noreply.github.com>
Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
2023-09-12 14:03:25 +00:00
Ericson "Fogo" Soares 5101ad35e5
[ENG-736] Watcher should check if a file has open write handles before processing it (#1319)
* Handling temporary files events on MacOS

* Debouncing create and update events

* Take files being updated for a long period
of time into account

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-09-12 03:23:47 +00:00
Ericson "Fogo" Soares cf39ae830b
[ENG-874] Windows needs reindex after renaming a file (#1303)
* Done

* Rust FMT

* Better debounce create and update events

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
2023-09-12 03:22:22 +00:00
Brendan Allan 4b60ff2e08
[ENG-1023] Change location path from settings page (#1301)
* update location path in db

* remove + add location watcher if path is changed

---------

Co-authored-by: Ericson "Fogo" Soares <ericson.ds999@gmail.com>
2023-09-08 11:46:16 +00:00
jake 7edcbb15d6
[ENG-621][ENG-1074] Trait-based image conversion overhaul (#1307)
* sd-images crate which will support raw/dng, bmp, etc

* more work on the image formatter

* re-work `sd-images`, add svg support, r/g/b and r/g/b/a HEIF image support (will all be async again soon)

* remove `ImageFormatter`, add note about r/g/b/(a) heif impl

* implement the image formatter

* rename the conversion trait and minor cleanups

* isolate heif feature and major cleanup

* very untested raw support

* change fn name to `from_path` (a lot more idiomatic)

* clean up orientation fixing

* heif is no longer forbidden (linux has good heif)

also all extensions are correctly matched in lowercase

* fix builds, ext matching, feature gating

* attempt to fix svg handling?

* raw attempt, quite a few errors

* add comment

* new (untested) attempt

* remove `raw` stuff for now

* replace `sd-svg` with a `ToImage` `SvgHandler` impl

* add some simple math to appropriately scale thumbnails (and bmp/ico support)

* add comments regarding how the math works for image thumbs

* rename the trait to `ImageHandler`
2023-09-07 14:08:17 +00:00
Ericson "Fogo" Soares f8033d1842
[ENG-941] Jobs running in another library do not appear in the job manager (#1306)
* Fetching job reports from all libraries
Some clippy warnings
pnpm format

* Reverting expects to unwraps
2023-09-07 04:15:31 +00:00
ameer2468 5860016789
[ENG-934] EXIF UI (#1305)
* Media data UI

* Make `MediaTime` adjacently tagged

* cleanup ts

* don't destructure accordion props

* Large bruh

* round location coords

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-09-06 13:51:15 +00:00
Oscar Beaumont 65ea570d0b
[ENG-1055] Fix previewing large files (#1304)
* Proper streaming from disk

* Handle `If-Range`

* fix bad merge

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-09-06 08:06:29 +00:00
Oscar Beaumont 5a0d0396d0
[ENG-566] Stream files through P2P (#1282)
* Add range to `SpaceblockRequest`

* Determine if file should be served from P2P

* Feature flag serveFromP2P + fix `ServeFrom` logic

* wip: yeet files over P2P

* Just work, argh

* restore backend feature flags after restart

* cleanup
2023-09-06 07:22:04 +00:00
Oscar Beaumont 251703104c
[ENG-1036] Fix library rename (#1300)
* Fix Library Rename + `RwLock` on `LibraryConfig`

* Input width fix

* cleanup

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2023-09-06 01:01:18 +00:00
Brendan Allan 2d1ce9af03
[ENG-1078] Fix pagination (#1299)
* fix 'load more' breaking

* paginate all paginated queries by model id

* arrays start at 0 stupid
2023-09-05 08:11:04 +00:00
jake a92d6c2faf
[ENG-1039] Apply hard clippy lints to the entire ffmpeg crate (#1281)
* apply clippy lints to the entire ffmpeg crate in hopes of making it safer

* wording

* revert the prisma changes

* fix typo

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>

* fix another typo

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>

* remove so many `#[must_use]`s

* fix bad merge and hopefully clippy

* clippy please work i beg

* make HEIF_EXTENSIONS always available

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-09-05 07:35:26 +00:00