From 4bf572e71fc04d949cdbd210f22196425c70cd60 Mon Sep 17 00:00:00 2001 From: ThaUnknown <6506529+ThaUnknown@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:38:48 +0200 Subject: [PATCH] feat: better android file picker, validate that selected directories have read/write permissions --- package.json | 4 +-- pnpm-lock.yaml | 12 ++++----- src/lib/modules/navigate.ts | 1 + src/lib/modules/settings/defaults.ts | 3 ++- src/routes/app/settings/client/+page.svelte | 28 ++++++++++++++++----- src/routes/setup/storage/+page.svelte | 28 ++++++++++++++++----- 6 files changed, 55 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 4780019..da98236 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ui", - "version": "6.4.71", + "version": "6.4.72", "license": "BUSL-1.1", "private": true, "packageManager": "pnpm@9.15.5", @@ -33,6 +33,7 @@ "gql.tada": "^1.8.10", "hayase-extensions": "github:hayase-app/extensions", "jassub": "^1.8.6", + "native": "github:hayase-app/native", "rollup-plugin-license": "^3.6.0", "simple-copy": "^2.2.1", "svelte": "^4.2.19", @@ -74,7 +75,6 @@ "js-levenshtein": "^1.1.6", "lucide-svelte": "^0.511.0", "marked": "^15.0.11", - "native": "github:hayase-app/native", "p2pt": "github:ThaUnknown/p2pt#modernise", "semver": "^7.7.2", "simple-store-svelte": "^1.0.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ffda5ee..0a0cf83 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -89,9 +89,6 @@ importers: marked: specifier: ^15.0.11 version: 15.0.11 - native: - specifier: github:hayase-app/native - version: https://codeload.github.com/hayase-app/native/tar.gz/31eb40c6c662dc58030bd70a279d9b8d38e3b904 p2pt: specifier: github:ThaUnknown/p2pt#modernise version: https://codeload.github.com/ThaUnknown/p2pt/tar.gz/9ad7a56ed6ee43f5664ebad33b803702ee349316 @@ -183,6 +180,9 @@ importers: jassub: specifier: ^1.8.6 version: 1.8.6 + native: + specifier: github:hayase-app/native + version: https://codeload.github.com/hayase-app/native/tar.gz/61d27bc30411840846e4e8ec5ea8ce875305e424 rollup-plugin-license: specifier: ^3.6.0 version: 3.6.0(picomatch@4.0.2)(rollup@4.40.2) @@ -1900,8 +1900,8 @@ packages: engines: {node: ^18 || >=20} hasBin: true - native@https://codeload.github.com/hayase-app/native/tar.gz/31eb40c6c662dc58030bd70a279d9b8d38e3b904: - resolution: {tarball: https://codeload.github.com/hayase-app/native/tar.gz/31eb40c6c662dc58030bd70a279d9b8d38e3b904} + native@https://codeload.github.com/hayase-app/native/tar.gz/61d27bc30411840846e4e8ec5ea8ce875305e424: + resolution: {tarball: https://codeload.github.com/hayase-app/native/tar.gz/61d27bc30411840846e4e8ec5ea8ce875305e424} version: 1.0.0 natural-compare@1.4.0: @@ -4550,7 +4550,7 @@ snapshots: nanoid@5.1.5: {} - native@https://codeload.github.com/hayase-app/native/tar.gz/31eb40c6c662dc58030bd70a279d9b8d38e3b904: {} + native@https://codeload.github.com/hayase-app/native/tar.gz/61d27bc30411840846e4e8ec5ea8ce875305e424: {} natural-compare@1.4.0: {} diff --git a/src/lib/modules/navigate.ts b/src/lib/modules/navigate.ts index 084db6f..bb4ca40 100644 --- a/src/lib/modules/navigate.ts +++ b/src/lib/modules/navigate.ts @@ -79,6 +79,7 @@ export function hover (node: HTMLElement, [cb = noop, hoverUpdate = noop]: [type const ctrl = new AbortController() node.addEventListener('wheel', e => { // cheap way to update hover state on scroll + // TODO: this is bad on touch, but good on mouse, fix it if (document.elementsFromPoint(e.clientX, e.clientY).includes(node)) { if (lastHoverElement !== hoverUpdate) lastHoverElement?.(false) lastHoverElement = hoverUpdate diff --git a/src/lib/modules/settings/defaults.ts b/src/lib/modules/settings/defaults.ts index 8cd0771..229c690 100644 --- a/src/lib/modules/settings/defaults.ts +++ b/src/lib/modules/settings/defaults.ts @@ -41,5 +41,6 @@ export default { playerSeek: '2', playerSkip: false, playerSkipFiller: false, - minimalPlayerUI: false + minimalPlayerUI: false, + androidStorageType: 'cache' } diff --git a/src/routes/app/settings/client/+page.svelte b/src/routes/app/settings/client/+page.svelte index a2dfa04..4d5f356 100644 --- a/src/routes/app/settings/client/+page.svelte +++ b/src/routes/app/settings/client/+page.svelte @@ -1,14 +1,29 @@