mirror of
https://github.com/decolua/9router.git
synced 2026-05-08 12:01:28 +00:00
fix(translator): Ensure loading state is reset after error handling in TranslatorPage
This commit is contained in:
@@ -180,8 +180,11 @@ export default function TranslatorPage() {
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ file: "5_res_provider.txt", content: full })
|
||||
});
|
||||
} catch (e) { alert(e.message); }
|
||||
setLoad("send", false);
|
||||
} catch (e) {
|
||||
alert(e.message);
|
||||
} finally {
|
||||
setLoad("send", false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleCopy = async (id) => {
|
||||
|
||||
@@ -47,9 +47,9 @@ export const APIKEY_PROVIDERS = {
|
||||
hyperbolic: { id: "hyperbolic", alias: "hyp", name: "Hyperbolic", icon: "bolt", color: "#00D4FF", textIcon: "HY", website: "https://hyperbolic.xyz" },
|
||||
deepgram: { id: "deepgram", alias: "dg", name: "Deepgram", icon: "mic", color: "#13EF93", textIcon: "DG", website: "https://deepgram.com" },
|
||||
assemblyai: { id: "assemblyai", alias: "aai", name: "AssemblyAI", icon: "record_voice_over", color: "#0062FF", textIcon: "AA", website: "https://assemblyai.com" },
|
||||
ollama: { id: "ollama", alias: "ollama", name: "Ollama Cloud", icon: "cloud", color: "#ffffffff", textIcon: "OL", website: "https://ollama.com" },
|
||||
nanobanana: { id: "nanobanana", alias: "nb", name: "NanoBanana", icon: "image", color: "#FFD700", textIcon: "NB", website: "https://nanobananaapi.ai" },
|
||||
chutes: { id: "chutes", alias: "ch", name: "Chutes AI", icon: "water_drop", color: "#ffffffff", textIcon: "CH", website: "https://chutes.ai" },
|
||||
ollama: { id: "ollama", alias: "ollama", name: "Ollama Cloud", icon: "cloud", color: "#ffffffff", textIcon: "OL", website: "https://ollama.com" },
|
||||
};
|
||||
|
||||
export const OPENAI_COMPATIBLE_PREFIX = "openai-compatible-";
|
||||
|
||||
Reference in New Issue
Block a user