chore(admin): disable platform login buttons
This commit is contained in:
@@ -16,14 +16,13 @@ import {
|
|||||||
TabsList,
|
TabsList,
|
||||||
TabsTrigger,
|
TabsTrigger,
|
||||||
} from "@/components/ui/tabs";
|
} from "@/components/ui/tabs";
|
||||||
import { ExternalLink, KeyRound } from "lucide-react";
|
import { KeyRound } from "lucide-react";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
type LoginMethodProps = {
|
type LoginMethodProps = {
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
href: string;
|
|
||||||
configured: boolean;
|
configured: boolean;
|
||||||
setupVariables: string[];
|
setupVariables: string[];
|
||||||
resultVariables: string[];
|
resultVariables: string[];
|
||||||
@@ -40,7 +39,6 @@ function EnvironmentBlock({ variables }: { variables: string[] }) {
|
|||||||
function LoginMethod({
|
function LoginMethod({
|
||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
href,
|
|
||||||
configured,
|
configured,
|
||||||
setupVariables,
|
setupVariables,
|
||||||
resultVariables,
|
resultVariables,
|
||||||
@@ -73,20 +71,10 @@ function LoginMethod({
|
|||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
<CardFooter className="border-t">
|
<CardFooter className="border-t">
|
||||||
{configured ? (
|
<Button disabled>
|
||||||
<Button asChild>
|
<KeyRound data-icon="inline-start" />
|
||||||
<a href={href}>
|
Login with {name} temporarily disabled
|
||||||
<KeyRound data-icon="inline-start" />
|
</Button>
|
||||||
Login with {name}
|
|
||||||
<ExternalLink data-icon="inline-end" />
|
|
||||||
</a>
|
|
||||||
</Button>
|
|
||||||
) : (
|
|
||||||
<Button disabled>
|
|
||||||
<KeyRound data-icon="inline-start" />
|
|
||||||
Login with {name}
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</CardFooter>
|
</CardFooter>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
@@ -123,7 +111,6 @@ export default function AdminLoginPage() {
|
|||||||
<LoginMethod
|
<LoginMethod
|
||||||
name="YouTube"
|
name="YouTube"
|
||||||
description="Authorize the channel used for video uploads."
|
description="Authorize the channel used for video uploads."
|
||||||
href="/api/auth/youtube"
|
|
||||||
configured={youtubeConfigured}
|
configured={youtubeConfigured}
|
||||||
setupVariables={[
|
setupVariables={[
|
||||||
"BASE_URL",
|
"BASE_URL",
|
||||||
@@ -140,7 +127,6 @@ export default function AdminLoginPage() {
|
|||||||
<LoginMethod
|
<LoginMethod
|
||||||
name="TikTok"
|
name="TikTok"
|
||||||
description="Authorize the account used for profile data and video publishing."
|
description="Authorize the account used for profile data and video publishing."
|
||||||
href="/api/auth/tiktok"
|
|
||||||
configured={tiktokConfigured}
|
configured={tiktokConfigured}
|
||||||
setupVariables={[
|
setupVariables={[
|
||||||
"BASE_URL",
|
"BASE_URL",
|
||||||
|
|||||||
Reference in New Issue
Block a user