mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-14 18:55:10 +01:00
Merge pull request #940 from qtchaos/remove-default-setup
Disable default setup option if no proxies are set, remove extension help once it succeeds
This commit is contained in:
commit
d1c58041c4
@ -1,6 +1,7 @@
|
|||||||
window.__CONFIG__ = {
|
window.__CONFIG__ = {
|
||||||
// The URL for the CORS proxy, the URL must NOT end with a slash!
|
// The URL for the CORS proxy, the URL must NOT end with a slash!
|
||||||
VITE_CORS_PROXY_URL: "CHANGEME",
|
// If not specified, the onboarding will not allow a "default setup". The user will have to use the extension or set up a proxy themselves
|
||||||
|
VITE_CORS_PROXY_URL: "",
|
||||||
|
|
||||||
// The READ API key to access TMDB
|
// The READ API key to access TMDB
|
||||||
VITE_TMDB_READ_API_KEY: "CHANGEME",
|
VITE_TMDB_READ_API_KEY: "CHANGEME",
|
||||||
|
@ -13,6 +13,7 @@ import {
|
|||||||
} from "@/pages/onboarding/onboardingHooks";
|
} from "@/pages/onboarding/onboardingHooks";
|
||||||
import { Card, CardContent, Link } from "@/pages/onboarding/utils";
|
import { Card, CardContent, Link } from "@/pages/onboarding/utils";
|
||||||
import { PageTitle } from "@/pages/parts/util/PageTitle";
|
import { PageTitle } from "@/pages/parts/util/PageTitle";
|
||||||
|
import { getProxyUrls } from "@/utils/proxyUrls";
|
||||||
|
|
||||||
function VerticalLine(props: { className?: string }) {
|
function VerticalLine(props: { className?: string }) {
|
||||||
return (
|
return (
|
||||||
@ -27,6 +28,7 @@ export function OnboardingPage() {
|
|||||||
const skipModal = useModal("skip");
|
const skipModal = useModal("skip");
|
||||||
const { completeAndRedirect } = useRedirectBack();
|
const { completeAndRedirect } = useRedirectBack();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const noProxies = getProxyUrls().length === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MinimalPageLayout>
|
<MinimalPageLayout>
|
||||||
@ -85,7 +87,8 @@ export function OnboardingPage() {
|
|||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
{noProxies ? null : (
|
||||||
|
<>
|
||||||
<p className="text-center hidden md:block mt-12">
|
<p className="text-center hidden md:block mt-12">
|
||||||
<Trans i18nKey="onboarding.start.options.default.text">
|
<Trans i18nKey="onboarding.start.options.default.text">
|
||||||
<br />
|
<br />
|
||||||
@ -96,7 +99,6 @@ export function OnboardingPage() {
|
|||||||
/>
|
/>
|
||||||
</Trans>
|
</Trans>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className=" max-w-[300px] mx-auto md:hidden mt-12 ">
|
<div className=" max-w-[300px] mx-auto md:hidden mt-12 ">
|
||||||
<Button
|
<Button
|
||||||
className="!text-type-text !bg-opacity-50"
|
className="!text-type-text !bg-opacity-50"
|
||||||
@ -111,6 +113,8 @@ export function OnboardingPage() {
|
|||||||
</span>
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</CenterContainer>
|
</CenterContainer>
|
||||||
</MinimalPageLayout>
|
</MinimalPageLayout>
|
||||||
);
|
);
|
||||||
|
@ -115,7 +115,7 @@ export function ExtensionStatus(props: {
|
|||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
{lastKnownStatus === "unknown" ? <RefreshBar /> : null}
|
{lastKnownStatus === "unknown" ? <RefreshBar /> : null}
|
||||||
{props.showHelp ? (
|
{props.showHelp && props.status !== "success" ? (
|
||||||
<Card className="mt-4">
|
<Card className="mt-4">
|
||||||
<div className="flex items-center space-x-7">
|
<div className="flex items-center space-x-7">
|
||||||
<Icon icon={Icons.WARNING} className="text-type-danger text-2xl" />
|
<Icon icon={Icons.WARNING} className="text-type-danger text-2xl" />
|
||||||
|
Loading…
Reference in New Issue
Block a user