undo frontend changes

This commit is contained in:
Brandon Thomas committed 2026-04-15 13:13:38 -04:00
1 parent 198aed0f91
commit 54860302e0
8 files changed
+230 -118

No files matched your search

+9 -10
View File
@@ -11,16 +11,15 @@ const root = ReactDOM.createRoot(
document.getElementById("root") as HTMLElement,
);
// In development, route API through the Vite dev server proxy to avoid CORS,
// unless VITE_API_HOST is explicitly set (eg. for an unsafe browser that ignores CORS).
//if (import.meta.env.DEV && !import.meta.env.VITE_API_HOST) {
// try {
// const origin = window.location.origin;
// StorytellerApiHostStore.getInstance().setApiSchemeAndHost(origin);
// } catch (e) {
// console.warn("Failed to set dev API host override", e);
// }
//}
// In development, route API through the Vite dev server origin to avoid CORS
if (import.meta.env.DEV) {
try {
const origin = window.location.origin;
StorytellerApiHostStore.getInstance().setApiSchemeAndHost(origin);
} catch (e) {
console.warn("Failed to set dev API host override", e);
}
}
// Cache the referrer immediately — it can change or disappear on navigation.
// Only set once so subsequent in-site navigations don't overwrite the original.
@@ -40,9 +40,6 @@
{
"path": "../../libs/components/gravatar/tsconfig.lib.json"
},
{
"path": "../../libs/components/slider-v2/tsconfig.lib.json"
},
{
"path": "../../libs/components/tab-selector/tsconfig.lib.json"
},
@@ -5,9 +5,6 @@
{
"path": "../../libs/components/gravatar"
},
{
"path": "../../libs/components/slider-v2"
},
{
"path": "../../libs/components/tab-selector"
},
+1 -3
View File
@@ -60,9 +60,7 @@ export class ApiManager {
}
protected getApiSchemeAndHost(): string {
const host = StorytellerApiHostStore.getInstance().getApiSchemeAndHost();
console.log('getSchemaAndHost()', host);
return host;
return StorytellerApiHostStore.getInstance().getApiSchemeAndHost();
}
public async fetch<B, T>(
@@ -1,8 +1,5 @@
// Artcraft / Storyteller API backend
// Set VITE_API_HOST=http://localhost:12345 for local dev, or leave unset for production.
//const DEFAULT_API_HOST = (import.meta as any).env?.VITE_API_HOST || "https://api.storyteller.ai";
const DEFAULT_API_HOST = "http://localhost:12345";
const DEFAULT_API_HOST = "https://api.storyteller.ai";
// NB(bt,2025-09-25): 'nx' is creating multiple copies of the library with name
// mangling, so the singleton pattern fails to resolve to a single instance.
@@ -8,9 +8,6 @@
{
"path": "../../common"
},
{
"path": "../../api"
},
{
"path": "../loading-spinner"
},
@@ -27,10 +24,10 @@
"path": "../modal"
},
{
"path": "../toaster"
"path": "../../tauri-api"
},
{
"path": "../../tauri-api"
"path": "../../api"
},
{
"path": "../action-reminder-modal"
@@ -49,9 +49,6 @@
{
"path": "../../common/tsconfig.lib.json"
},
{
"path": "../../api/tsconfig.lib.json"
},
{
"path": "../loading-spinner/tsconfig.lib.json"
},
@@ -68,10 +65,10 @@
"path": "../modal/tsconfig.lib.json"
},
{
"path": "../toaster/tsconfig.lib.json"
"path": "../../tauri-api/tsconfig.lib.json"
},
{
"path": "../../tauri-api/tsconfig.lib.json"
"path": "../../api/tsconfig.lib.json"
},
{
"path": "../action-reminder-modal/tsconfig.lib.json"
+215 -85
View File
File diff suppressed because it is too large. Load diff