mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
remove some old stuff
This commit is contained in:
parent
b5dae824c8
commit
e57d4578a2
3 changed files with 1 additions and 44 deletions
|
@ -1,30 +0,0 @@
|
|||
import { useSettings } from "@/state/settings";
|
||||
|
||||
import { Icon, Icons } from "./Icon";
|
||||
|
||||
export const colors = ["#ffffff", "#00ffff", "#ffff00"];
|
||||
export default function CaptionColorSelector({ color }: { color: string }) {
|
||||
const { captionSettings, setCaptionColor } = useSettings();
|
||||
return (
|
||||
<div
|
||||
className={`flex h-8 w-8 items-center justify-center rounded transition-[background-color,transform] duration-100 hover:bg-[#1c161b79] active:scale-110 ${
|
||||
color === captionSettings.style.color ? "bg-[#1C161B]" : ""
|
||||
}`}
|
||||
onClick={() => setCaptionColor(color)}
|
||||
>
|
||||
<div
|
||||
className="h-4 w-4 cursor-pointer appearance-none rounded-full"
|
||||
style={{
|
||||
backgroundColor: color,
|
||||
}}
|
||||
/>
|
||||
<Icon
|
||||
className={[
|
||||
"absolute text-xs text-[#1C161B]",
|
||||
color === captionSettings.style.color ? "" : "hidden",
|
||||
].join(" ")}
|
||||
icon={Icons.CHECKMARK}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -8,7 +8,7 @@ import { registerSW } from "virtual:pwa-register";
|
|||
|
||||
import { ErrorBoundary } from "@/components/layout/ErrorBoundary";
|
||||
import App from "@/setup/App";
|
||||
import { assertConfig, conf } from "@/setup/config";
|
||||
import { conf } from "@/setup/config";
|
||||
import i18n from "@/setup/i18n";
|
||||
|
||||
import "@/setup/ga";
|
||||
|
@ -29,7 +29,6 @@ registerSW({
|
|||
});
|
||||
|
||||
const LazyLoadedApp = React.lazy(async () => {
|
||||
await assertConfig();
|
||||
await initializeStores();
|
||||
i18n.changeLanguage(SettingsStore.get().language ?? "en");
|
||||
return {
|
||||
|
|
|
@ -39,18 +39,6 @@ function getKey(key: keyof Config, defaultString?: string): string {
|
|||
return getKeyValue(key) ?? defaultString ?? "";
|
||||
}
|
||||
|
||||
export function assertConfig() {
|
||||
const keys: Array<keyof Config> = ["TMDB_READ_API_KEY", "CORS_PROXY_URL"];
|
||||
const values = keys.map((key) => {
|
||||
const val = getKeyValue(key);
|
||||
if (val) return val;
|
||||
// eslint-disable-next-line no-alert
|
||||
window.alert(`Misconfigured instance, missing key: ${key}`);
|
||||
return val;
|
||||
});
|
||||
if (values.includes(undefined)) throw new Error("Misconfigured instance");
|
||||
}
|
||||
|
||||
export function conf(): RuntimeConfig {
|
||||
return {
|
||||
APP_VERSION,
|
||||
|
|
Loading…
Reference in a new issue