Files
portal/app/resources/js/components/ui/StatusPill.vue
T
Дмитрий cb05657f30 chore(format): prettier --write across 37 .vue/.ts files
Phase 1B audit found 48 files failing `prettier --check`. Auto-apply
via `npx prettier --write resources/js/**/*.{ts,vue,css}` produced
style-only changes:
- consistent quote style
- trailing comma normalization
- spaces around : in v-card style="position: relative" attrs
- explicit ; insertion

No semantic changes. No code-behavior changes. Production-code only;
test files batched separately into `test(frontend):` commit.

Verification:
- npx vitest run → 79/79 files, 614/614 + 3 skipped (no regression).
- npx vue-tsc --noEmit → 0 errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 20:24:33 +03:00

39 lines
977 B
Vue

<script setup lang="ts">
import { computed } from 'vue';
import { useStatusPill } from '../../composables/useStatusPill';
const props = defineProps<{
slug: string;
label?: string;
}>();
const style = computed<Record<string, string>>(() => {
const s = useStatusPill(props.slug);
const css: Record<string, string> = {
background: s.bg,
color: s.color,
};
if (s.fontWeight) css['font-weight'] = String(s.fontWeight);
if (s.textDecoration) css['text-decoration'] = s.textDecoration;
return css;
});
</script>
<template>
<span class="ld-status-pill" :style="style">{{ label ?? slug }}</span>
</template>
<style scoped>
.ld-status-pill {
display: inline-flex;
align-items: center;
padding: 3px 9px;
border-radius: var(--radius-full);
font-size: 11px;
font-weight: 500;
transition:
background 300ms cubic-bezier(0.16, 1, 0.3, 1),
color 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
</style>