mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-29 03:21:53 +01:00
commit
aab58815e0
@ -60,6 +60,10 @@ This project would not be possible without our amazing contributors and the comm
|
|||||||
|
|
||||||
<a href="https://github.com/JamesHawkinss/movie-web/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/JamesHawkinss/movie-web?style=flat-square"></a>
|
<a href="https://github.com/JamesHawkinss/movie-web/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/JamesHawkinss/movie-web?style=flat-square"></a>
|
||||||
|
|
||||||
|
<div style="display:flex;align-items:center;grid-gap:10px">
|
||||||
|
<img src="https://github.com/JamesHawkinss.png?size=20" width="20"><span><a href="https://github.com/JamesHawkinss">@JamesHawkinss</a> for original concept.</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="display:flex;align-items:center;grid-gap:10px">
|
<div style="display:flex;align-items:center;grid-gap:10px">
|
||||||
<img src="https://github.com/JipFr.png?size=20" width="20"><span><a href="https://github.com/JipFr">@JipFr</a> for initial work on <a href="https://github.com/JipFr/movie-cli">movie-cli</a>.</span>
|
<img src="https://github.com/JipFr.png?size=20" width="20"><span><a href="https://github.com/JipFr">@JipFr</a> for initial work on <a href="https://github.com/JipFr/movie-cli">movie-cli</a>.</span>
|
||||||
</div>
|
</div>
|
||||||
@ -68,10 +72,6 @@ This project would not be possible without our amazing contributors and the comm
|
|||||||
<img src="https://github.com/mrjvs.png?size=20" width="20"><span><a href="https://github.com/mrjvs">@mrjvs</a> for leading the port to React, and for the beautiful design.</span>
|
<img src="https://github.com/mrjvs.png?size=20" width="20"><span><a href="https://github.com/mrjvs">@mrjvs</a> for leading the port to React, and for the beautiful design.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display:flex;align-items:center;grid-gap:10px">
|
|
||||||
<img src="https://github.com/JoshHeng.png?size=20" width="20"><span><a href="https://github.com/JoshHeng">@JoshHeng</a> for the Cloudflare CORS Proxy and URL routing.</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="display:flex;align-items:center;grid-gap:10px">
|
<div style="display:flex;align-items:center;grid-gap:10px">
|
||||||
<img src="https://github.com/binaryoverload.png?size=20" width="20"><span><a href="https://github.com/binaryoverload">@binaryoverload</a> for help rewriting the application into React and making the README look ✨ pretty ✨.</span>
|
<img src="https://github.com/binaryoverload.png?size=20" width="20"><span><a href="https://github.com/binaryoverload">@binaryoverload</a> for help rewriting the application into React and making the README look ✨ pretty ✨.</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<script src="config.js"></script>
|
<script src="config.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/gh/movie-web/6C6F6C7A/out.js"></script>
|
||||||
<title>movie-web</title>
|
<title>movie-web</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "movie-web",
|
"name": "movie-web",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://movie.squeezebox.dev",
|
"homepage": "https://movie.squeezebox.dev",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { APP_VERSION, GITHUB_LINK, DISCORD_LINK } from "@/constants";
|
import { APP_VERSION, GITHUB_LINK, DISCORD_LINK } from "@/constants";
|
||||||
|
|
||||||
export interface Config {
|
interface Config {
|
||||||
APP_VERSION: string;
|
APP_VERSION: string;
|
||||||
GITHUB_LINK: string;
|
GITHUB_LINK: string;
|
||||||
DISCORD_LINK: string;
|
DISCORD_LINK: string;
|
||||||
@ -9,6 +9,10 @@ export interface Config {
|
|||||||
CORS_PROXY_URL: string;
|
CORS_PROXY_URL: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface RuntimeConfig extends Config {
|
||||||
|
BASE_PROXY_URL: string;
|
||||||
|
}
|
||||||
|
|
||||||
const env: Record<keyof Config, undefined | string> = {
|
const env: Record<keyof Config, undefined | string> = {
|
||||||
OMDB_API_KEY: import.meta.env.VITE_OMDB_API_KEY,
|
OMDB_API_KEY: import.meta.env.VITE_OMDB_API_KEY,
|
||||||
TMDB_API_KEY: import.meta.env.VITE_TMDB_API_KEY,
|
TMDB_API_KEY: import.meta.env.VITE_TMDB_API_KEY,
|
||||||
@ -38,13 +42,14 @@ function getKey(key: keyof Config): string {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function conf(): Config {
|
export function conf(): RuntimeConfig {
|
||||||
return {
|
return {
|
||||||
APP_VERSION,
|
APP_VERSION,
|
||||||
GITHUB_LINK,
|
GITHUB_LINK,
|
||||||
DISCORD_LINK,
|
DISCORD_LINK,
|
||||||
OMDB_API_KEY: getKey("OMDB_API_KEY"),
|
OMDB_API_KEY: getKey("OMDB_API_KEY"),
|
||||||
TMDB_API_KEY: getKey("TMDB_API_KEY"),
|
TMDB_API_KEY: getKey("TMDB_API_KEY"),
|
||||||
|
BASE_PROXY_URL: getKey("CORS_PROXY_URL"),
|
||||||
CORS_PROXY_URL: `${getKey("CORS_PROXY_URL")}/?destination=`,
|
CORS_PROXY_URL: `${getKey("CORS_PROXY_URL")}/?destination=`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,15 @@ import { HashRouter } from "react-router-dom";
|
|||||||
import "./index.css";
|
import "./index.css";
|
||||||
import { ErrorBoundary } from "@/components/layout/ErrorBoundary";
|
import { ErrorBoundary } from "@/components/layout/ErrorBoundary";
|
||||||
import App from "./App";
|
import App from "./App";
|
||||||
import './i18n';
|
import "./i18n";
|
||||||
|
import { conf } from "./config";
|
||||||
|
|
||||||
|
// initialize
|
||||||
|
const key =
|
||||||
|
(window as any)?.__CONFIG__?.VITE_KEY ?? import.meta.env.VITE_KEY ?? null;
|
||||||
|
if (key) {
|
||||||
|
(window as any).initMW(conf().BASE_PROXY_URL, key);
|
||||||
|
}
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
export const DISCORD_LINK = "https://discord.gg/Jhqt4Xzpfb";
|
export const DISCORD_LINK = "https://discord.gg/Jhqt4Xzpfb";
|
||||||
export const GITHUB_LINK = "https://github.com/JamesHawkinss/movie-web";
|
export const GITHUB_LINK = "https://github.com/movie-web/movie-web";
|
||||||
export const APP_VERSION = "2.1.1";
|
export const APP_VERSION = "2.1.2";
|
||||||
|
Loading…
Reference in New Issue
Block a user