mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-13 09:25:07 +01:00
feat: disable default setup option if no proxies set, remove extension help on OK
This commit is contained in:
parent
0a86c59cfb
commit
1df0ac000d
@ -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,32 +87,34 @@ export function OnboardingPage() {
|
|||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
{noProxies ? null : (
|
||||||
<p className="text-center hidden md:block mt-12">
|
<>
|
||||||
<Trans i18nKey="onboarding.start.options.default.text">
|
<p className="text-center hidden md:block mt-12">
|
||||||
<br />
|
|
||||||
<a
|
|
||||||
onClick={skipModal.show}
|
|
||||||
type="button"
|
|
||||||
className="text-onboarding-link hover:opacity-75 cursor-pointer"
|
|
||||||
/>
|
|
||||||
</Trans>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className=" max-w-[300px] mx-auto md:hidden mt-12 ">
|
|
||||||
<Button
|
|
||||||
className="!text-type-text !bg-opacity-50"
|
|
||||||
theme="secondary"
|
|
||||||
onClick={skipModal.show}
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
<Trans i18nKey="onboarding.start.options.default.text">
|
<Trans i18nKey="onboarding.start.options.default.text">
|
||||||
<span />
|
<br />
|
||||||
<span />
|
<a
|
||||||
|
onClick={skipModal.show}
|
||||||
|
type="button"
|
||||||
|
className="text-onboarding-link hover:opacity-75 cursor-pointer"
|
||||||
|
/>
|
||||||
</Trans>
|
</Trans>
|
||||||
</span>
|
</p>
|
||||||
</Button>
|
<div className=" max-w-[300px] mx-auto md:hidden mt-12 ">
|
||||||
</div>
|
<Button
|
||||||
|
className="!text-type-text !bg-opacity-50"
|
||||||
|
theme="secondary"
|
||||||
|
onClick={skipModal.show}
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
<Trans i18nKey="onboarding.start.options.default.text">
|
||||||
|
<span />
|
||||||
|
<span />
|
||||||
|
</Trans>
|
||||||
|
</span>
|
||||||
|
</Button>
|
||||||
|
</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