alert-dialog

System update notification requiring application restart

System update notification requiring application restart

Загрузка превью…

src/alert-dialog/c-alert-dialog-11.vue

<!-- Иконка внутри AlertDialogMedia не монтируется в закрытом состоянии; путь lucide "shield-alert". -->
<script setup lang="ts">
import { Badge } from "@/components/reui/badge"
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogMedia, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog"
import { Button } from "@/components/ui/button"
</script>

<template>
  <AlertDialog>
    <AlertDialogTrigger as-child>
      <Button variant="outline">System Update</Button>
    </AlertDialogTrigger>
    <AlertDialogContent class="gap-0 p-0 sm:max-w-sm">
      <div class="mx-auto flex flex-col items-center justify-center gap-2 p-8">
        <AlertDialogMedia class="bg-info/10 text-info dark:bg-info/20 size-12 rounded-full">
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            stroke-width="2"
            stroke-linecap="round"
            stroke-linejoin="round"
            class="size-6"
          ><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /><path d="M12 8v4" /><path d="M12 16h.01" /></svg>
        </AlertDialogMedia>
        <AlertDialogTitle class="text-center">System Update Available!</AlertDialogTitle>
        <Badge variant="success-light">Release v28.1.0 (2026-01-12)</Badge>
      </div>

      <div class="bg-muted/60 flex flex-col items-center justify-center gap-5 rounded-b-2xl p-6">
        <AlertDialogDescription class="text-muted-foreground text-center">
          A new version of the application is ready. Restarting now will apply the latest security patches and
          features.
        </AlertDialogDescription>
        <AlertDialogFooter class="-mx-6 -mb-6 gap-4 self-stretch rounded-b-2xl p-6">
          <AlertDialogCancel>Remind Me Later</AlertDialogCancel>
          <AlertDialogAction>Update Now</AlertDialogAction>
        </AlertDialogFooter>
      </div>
    </AlertDialogContent>
  </AlertDialog>
</template>

Установка

npx shadcn-vue@latest add https://revueui.rootapi.dev/r/c-alert-dialog-11.json

Зависимости реестра

Источник: порт из ReUI (Keenthemes, MIT)