Files
Warp/apps/ui/src/components/WBanner.vue
T
tajniak81andClaude Opus 5.5 7e5e38c921 Admin panel (warp-admin) and the apps/ui design system
apps/ui: Warp's design system for Vue 3 + Tailwind v4. Tokens, fonts,
icons and logo come from the brand package, with a Tailwind theme on the
tokens and Vue components on the brand component styles.

apps/admin: the admin panel as a separate, optional service. warp-admin
embeds the built Vue app and proxies only the login endpoints and
/_warp/admin/v1 to the homeserver. Pages: dashboard, users, rooms,
federation, registration and tokens, server notices, application
services, audit log.

Also: pnpm workspace, go.work entry, Dockerfile, an `admin` compose
profile, Makefile targets, a CI job with a proxy smoke test, and docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 15:05:16 +02:00

35 lines
1.1 KiB
Vue

<script setup lang="ts">
import { computed } from 'vue'
import WIcon from './WIcon.vue'
import type { IconName } from '../icons'
const props = withDefaults(
defineProps<{
tone?: 'info' | 'success' | 'warning' | 'danger'
title?: string
/** Defaults to the tone's own icon: status is never colour alone. */
icon?: IconName
}>(),
{ tone: 'info', title: undefined, icon: undefined },
)
const toneIcon: Record<'info' | 'success' | 'warning' | 'danger', IconName> = {
info: 'server',
success: 'shield-check',
warning: 'shield-alert',
danger: 'shield-alert',
}
const shown = computed(() => props.icon ?? toneIcon[props.tone])
</script>
<template>
<div :class="['wp-banner', `wp-banner-${tone}`]" :role="tone === 'danger' ? 'alert' : 'status'">
<WIcon :name="shown" />
<div class="wp-banner-body">
<p v-if="title" class="wp-banner-title">{{ title }}</p>
<p v-if="$slots.default" class="wp-banner-text"><slot /></p>
</div>
<div v-if="$slots.action" class="wp-banner-action"><slot name="action" /></div>
</div>
</template>