fix(translator): Ensure loading state is reset after error handling in TranslatorPage
This commit is contained in:
parent
83d94daa82
commit
372b985ee9
2 changed files with 6 additions and 3 deletions
|
|
@ -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-";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue