add whisper download utils. add react-navigator.

This commit is contained in:
Jordan
2025-02-16 19:55:26 -08:00
parent 081ac367ba
commit bc3d481d25
11 changed files with 682 additions and 85 deletions

View File

@ -1,6 +1,7 @@
import { Cache } from "react-native-cache";
import { LIBRETRANSLATE_BASE_URL } from "@/constants/api";
import AsyncStorage from '@react-native-async-storage/async-storage';
import { Settings } from "../lib/settings";
type language_t = string;
@ -51,6 +52,11 @@ export class LanguageServer {
throw new Error(`Can't extract values from data: ${JSON.stringify(data)}`)
}
}
static async getDefault() {
const settings = await Settings.getDefault();
return new LanguageServer(await settings.getLibretranslateBaseUrl());
}
}
export class Translator {