fix: client indexing & outdated scheme (#14160)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Optimized storage handling with platform-specific
implementations—SQLite for Electron and IndexedDB for other environments
for improved performance.

* **Bug Fixes**
* Enhanced recording file access and retrieval functionality for better
reliability.
  * Strengthened local file protocol handling and security restrictions.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2025-12-27 17:56:42 +08:00
committed by GitHub
parent 78949044ec
commit 702dbf7be4
7 changed files with 85 additions and 57 deletions

View File

@@ -28,7 +28,9 @@ async function readRecordingFile(filepath: string) {
const fileUrl = new URL(
filepath,
location.origin.replace(/\.$/, 'local-file')
typeof location !== 'undefined' && location.protocol === 'assets:'
? 'assets://local-file'
: location.origin
);
const response = await fetch(fileUrl);
if (!response.ok) {