# All files / src/components/admin/systemConfiguration LoginBackdropsCard.tsx

0% Statements 0/8
0% Branches 0/2
0% Functions 0/3
0% Lines 0/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78

     'use client';

    import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
    import { Label } from '@/components/ui/label';
    import { Textarea } from '@/components/ui/textarea';
    import { Button } from '@/components/ui/button';
    import { Save, Settings } from 'lucide-react';

    export type LoginBackdropsCardProps = {
      t: (key: string, options?: Record<string, any>) => string;
      loginSeriesBackdrops: string;
      setLoginSeriesBackdrops: (value: string) => void;
      loginMoviesBackdrops: string;
      setLoginMoviesBackdrops: (value: string) => void;
      onSave: () => void;
      isSaving: boolean;
    };

    export default function LoginBackdropsCard({
      t,
      loginSeriesBackdrops,
      setLoginSeriesBackdrops,
      loginMoviesBackdrops,
      setLoginMoviesBackdrops,
      onSave,
      isSaving}: LoginBackdropsCardProps) {
      return (
        <Card>
          <CardHeader>
            <CardTitle className="flex items-center gap-2">
              <Settings className="h-5 w-5" />
              {t('systemConfiguration.forms.loginBackdropsTitle', {})}
            </CardTitle>
            <CardDescription>
              {t('systemConfiguration.forms.loginBackdropsDescription', {})}
            </CardDescription>
          </CardHeader>
          <CardContent className="space-y-4">
            <div className="space-y-2">
              <Label htmlFor="login-series-backdrops">
                {t('systemConfiguration.forms.loginSeriesBackdropsLabel', {})}
              </Label>
              <Textarea
                id="login-series-backdrops"
                value={loginSeriesBackdrops}
                onChange={(e) => setLoginSeriesBackdrops(e.target.value)}
                placeholder="/backdrops/backdrop-1.png,\n/backdrops/backdrop-2.png"
                className="min-h-28"
              />
              <p className="text-xs text-muted-foreground">
                {t('systemConfiguration.forms.loginBackdropsHelp', {})}
              </p>
            </div>

            <div className="space-y-2">
              <Label htmlFor="login-movies-backdrops">
                {t('systemConfiguration.forms.loginMoviesBackdropsLabel', {})}
              </Label>
              <Textarea
                id="login-movies-backdrops"
                value={loginMoviesBackdrops}
                onChange={(e) => setLoginMoviesBackdrops(e.target.value)}
                placeholder="/backdrops/backdrop-3.png,\n/backdrops/backdrop-4.png"
                className="min-h-28"
              />
            </div>

            <Button onClick={onSave} disabled={isSaving}>
              <Save className="h-4 w-4 mr-2" />
              {isSaving
                ? t('common.saving', {})
                : t('systemConfiguration.forms.saveLoginBackdrops', {})}
            </Button>
          </CardContent>
        </Card>
      );
    }