Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 82 additions & 80 deletions apps/mcp-dockmaster/src/components/InstalledServers.tsx

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions apps/mcp-dockmaster/src/components/terms-consent-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ import { Label } from "./ui/label";
import { termsOfServiceMarkdown } from "../constants/terms-of-service";
import { saveUserConsent } from "../lib/localStorage";
import { updateAnalyticsConsent } from "../lib/analytics";
import { useTranslation } from "@mcp-dockmaster/i18n";

interface TermsConsentDialogProps {
open: boolean;
onAccept: () => void;
}

export const TermsConsentDialog = ({ open, onAccept }: TermsConsentDialogProps) => {
const { t } = useTranslation();
const [termsAccepted, setTermsAccepted] = useState(false);
const [analyticsEnabled, setAnalyticsEnabled] = useState(true);

Expand All @@ -33,9 +35,9 @@ export const TermsConsentDialog = ({ open, onAccept }: TermsConsentDialogProps)
<Dialog open={open} onOpenChange={() => {}}>
<DialogContent className="max-w-3xl max-h-[80vh] flex flex-col">
<DialogHeader>
<DialogTitle>Terms of Service & Privacy Settings</DialogTitle>
<DialogTitle>{t('terms_consent.title')}</DialogTitle>
<DialogDescription>
Please review and accept our terms of service to continue using MCP Dockmaster.
{t('terms_consent.description')}
</DialogDescription>
</DialogHeader>

Expand All @@ -53,7 +55,7 @@ export const TermsConsentDialog = ({ open, onAccept }: TermsConsentDialogProps)
onCheckedChange={setTermsAccepted}
/>
<Label htmlFor="terms" className="font-medium">
I accept the Terms of Service
{t('terms_consent.accept_terms')}
</Label>
</div>

Expand All @@ -64,7 +66,7 @@ export const TermsConsentDialog = ({ open, onAccept }: TermsConsentDialogProps)
onCheckedChange={setAnalyticsEnabled}
/>
<Label htmlFor="analytics" className="font-medium">
Enable anonymous analytics to help improve the application
{t('terms_consent.enable_analytics')}
</Label>
</div>
</div>
Expand All @@ -74,7 +76,7 @@ export const TermsConsentDialog = ({ open, onAccept }: TermsConsentDialogProps)
onClick={handleAccept}
disabled={!termsAccepted}
>
Continue
{t('common.continue')}
</Button>
</DialogFooter>
</DialogContent>
Expand Down
5 changes: 4 additions & 1 deletion apps/mcp-dockmaster/src/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from "react";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { XIcon } from "lucide-react";
import { useTranslation } from "@mcp-dockmaster/i18n";

import { cn } from "@/lib/utils";

Expand Down Expand Up @@ -49,6 +50,8 @@ function DialogContent({
children,
...props
}: React.ComponentProps<typeof DialogPrimitive.Content>) {
const { t } = useTranslation();

return (
<DialogPortal data-slot="dialog-portal">
<DialogOverlay />
Expand All @@ -63,7 +66,7 @@ function DialogContent({
{children}
<DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4">
<XIcon />
<span className="sr-only">Close</span>
<span className="sr-only">{t('ui.close')}</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
</DialogPortal>
Expand Down
5 changes: 4 additions & 1 deletion apps/mcp-dockmaster/src/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from "react";
import * as SheetPrimitive from "@radix-ui/react-dialog";
import { XIcon } from "lucide-react";
import { useTranslation } from "@mcp-dockmaster/i18n";

import { cn } from "@/lib/utils";

Expand Down Expand Up @@ -50,6 +51,8 @@ function SheetContent({
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
side?: "top" | "right" | "bottom" | "left";
}) {
const { t } = useTranslation();

return (
<SheetPortal>
<SheetOverlay />
Expand All @@ -72,7 +75,7 @@ function SheetContent({
{children}
<SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none">
<XIcon className="size-4" />
<span className="sr-only">Close</span>
<span className="sr-only">{t('ui.close')}</span>
</SheetPrimitive.Close>
</SheetPrimitive.Content>
</SheetPortal>
Expand Down
Loading
Loading