diff --git a/packages/repl/src/components/settings/AccountsTab.tsx b/packages/repl/src/components/settings/AccountsTab.tsx index 944a4a6..db69fef 100644 --- a/packages/repl/src/components/settings/AccountsTab.tsx +++ b/packages/repl/src/components/settings/AccountsTab.tsx @@ -13,6 +13,7 @@ import { LucideRefreshCw, LucideSearch, LucideTrash, + LucideTriangleAlert, LucideUser, LucideX, } from 'lucide-solid' @@ -22,6 +23,7 @@ import { nanoid } from 'nanoid' import { createEffect, createMemo, createSignal, For, on, onCleanup, Show } from 'solid-js' import { toast } from 'solid-sonner' import { copyToClipboard } from '../../lib/clipboard.tsx' +import { Alert, AlertDescription, AlertTitle } from '../../lib/components/ui/alert.tsx' import { Badge } from '../../lib/components/ui/badge.tsx' import { Button } from '../../lib/components/ui/button.tsx' import { Dialog, DialogContent } from '../../lib/components/ui/dialog.tsx' @@ -308,7 +310,23 @@ export function AccountsTab() { +
+ + + Warning + + This is an + {' '} + unofficial + {' '} + Telegram application. +
+ You might trigger anti-spam measures and get banned. +
+ Proceed at your own risk. +
+
+ No accounts yet
-
    +
    1. Open Telegram on your phone
    2. Go to @@ -147,7 +147,7 @@ function PhoneNumberStep(props: StepProps<'phone'>) {

      Log in with phone number

      -
      +
      Please confirm your country code
      and enter your phone number @@ -177,7 +177,7 @@ function PhoneNumberStep(props: StepProps<'phone'>) { {error()}
      -
      + -
      +
      {description()}
      @@ -363,7 +363,7 @@ function OtpStep(props: StepProps<'otp'>) { {error() && ( -
      {error()}
      +
      {error()}
      )} @@ -438,7 +438,7 @@ function PasswordStep(props: StepProps<'password'>) {

      2FA password

      -
      +
      Your account is protected with an additional password.
      @@ -483,9 +483,9 @@ function DoneStep(props: StepProps<'done'>) {
      -
      +
      Welcome, {' '} {props.ctx.account.name} diff --git a/packages/repl/src/lib/components/ui/alert.tsx b/packages/repl/src/lib/components/ui/alert.tsx new file mode 100644 index 0000000..1c29eca --- /dev/null +++ b/packages/repl/src/lib/components/ui/alert.tsx @@ -0,0 +1,64 @@ +import type { AlertRootProps } from '@kobalte/core/alert' +import type { PolymorphicProps } from '@kobalte/core/polymorphic' +import type { VariantProps } from 'class-variance-authority' +import type { ComponentProps, ValidComponent } from 'solid-js' +import { Alert as AlertPrimitive } from '@kobalte/core/alert' +import { cva } from 'class-variance-authority' +import { splitProps } from 'solid-js' +import { cn } from '../../utils.ts' + +export const alertVariants = cva( + 'relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', + { + variants: { + variant: { + default: 'bg-background text-foreground', + destructive: + 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive', + }, + }, + defaultVariants: { + variant: 'default', + }, + }, +) + +type alertProps = AlertRootProps & + VariantProps & { + class?: string + } + +export function Alert(props: PolymorphicProps>) { + const [local, rest] = splitProps(props as alertProps, ['class', 'variant']) + + return ( + + ) +} + +export function AlertTitle(props: ComponentProps<'div'>) { + const [local, rest] = splitProps(props, ['class']) + + return ( +
      + ) +} + +export function AlertDescription(props: ComponentProps<'div'>) { + const [local, rest] = splitProps(props, ['class']) + + return ( +
      + ) +}