Refactor proxyFetch and enhance MediaProviderDetailPage layout
- Removed the isCloud check from proxyFetch.js, simplifying the fetch patching logic. - Updated MediaProviderDetailPage to include a new section for API key retrieval, improving user experience with clearer layout and additional notice text. - Enhanced ConnectionRow to better handle email display names. - Improved ProviderDetailPage to conditionally render provider notices and API key links. - Refactored localDb, requestDetailsDb, and usageDb to remove unnecessary isCloud checks, streamlining database interactions. - Updated OAuthModal to combine waiting and manual input steps for a more cohesive user flow. - Added API key URLs to several providers in providers.js for better accessibility.
This commit is contained in:
1 parent
f8d2a9ff76
commit
f410061e70
9 files changed
+144
-147
No files matched your search
@@ -1,8 +1,6 @@
|
||||
import { Readable } from "stream";
|
||||
import { MEMORY_CONFIG } from "../config/runtimeConfig.js";
|
||||
|
||||
const isCloud = typeof caches !== "undefined" && typeof caches === "object";
|
||||
|
||||
const originalFetch = globalThis.fetch;
|
||||
const proxyDispatchers = new Map();
|
||||
|
||||
@@ -263,8 +261,8 @@ async function patchedFetch(url, options = {}) {
|
||||
}
|
||||
|
||||
// Idempotency guard — only patch once to avoid wrapping multiple times
|
||||
if (!isCloud && globalThis.fetch !== patchedFetch) {
|
||||
if (globalThis.fetch !== patchedFetch) {
|
||||
globalThis.fetch = patchedFetch;
|
||||
}
|
||||
|
||||
export default isCloud ? originalFetch : patchedFetch;
|
||||
export default patchedFetch;
|
||||
Reference in new issue
Block a user