mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
feat(ui): migrate to @recloudstudio/ui, add theme toggle and polish console UX
This commit is contained in:
45 files changed
+1489
-1343
No files matched your search
@@ -1,13 +1,32 @@
|
||||
<template>
|
||||
<div class="toasts">
|
||||
<div class="recloud-toasts" aria-live="polite" aria-atomic="true">
|
||||
<TransitionGroup name="toast">
|
||||
<div v-for="t in toasts" :key="t.id" class="toast" :class="t.kind" @click="dismiss(t.id)">
|
||||
{{ t.msg }}
|
||||
</div>
|
||||
<RcCard
|
||||
v-for="t in toasts"
|
||||
:key="t.id"
|
||||
:variant="t.kind === 'bad' ? 'soft' : 'outline'"
|
||||
padding="sm"
|
||||
class="recloud-toast"
|
||||
:class="t.kind"
|
||||
role="status"
|
||||
@click="dismiss(t.id)"
|
||||
>
|
||||
<component :is="t.kind === 'bad' ? CircleAlert : CircleCheck" :size="18" />
|
||||
<span>{{ t.msg }}</span>
|
||||
<X :size="15" class="toast-close" />
|
||||
</RcCard>
|
||||
</TransitionGroup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { CircleAlert, CircleCheck, X } from "lucide-vue-next";
|
||||
|
||||
const { toasts, dismiss } = useToasts();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.recloud-toasts { position: fixed; z-index: 70; right: 1rem; bottom: 1rem; display: grid; width: min(calc(100vw - 2rem), 390px); gap: .65rem; }
|
||||
.recloud-toast { display: flex; align-items: center; gap: .7rem; cursor: pointer; box-shadow: 0 16px 38px rgb(var(--wh-text) / .14); } .recloud-toast :deep(.rc-card-body) { display: flex; width: 100%; align-items: center; gap: .7rem; padding: .1rem; } .recloud-toast :deep(svg) { flex: none; color: rgb(var(--wh-ok)); } .recloud-toast.bad :deep(svg) { color: rgb(var(--wh-bad)); } .recloud-toast span { flex: 1; font-size: .8rem; font-weight: 700; } .recloud-toast .toast-close { color: rgb(var(--wh-faint)); }
|
||||
.toast-enter-active, .toast-leave-active { transition: opacity 180ms ease, transform 180ms ease; } .toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(16px); }
|
||||
</style>
|
||||
Reference in new issue
Block a user