1
0
Files
TaskBoard/front_vue/src/components/ui/Loader.vue
Falknat cb075e56be Правка фронта
1. Улучшения мобильной версии
2. Улучшения комментариев фронта
3. Единый лоадер UI
2026-01-16 05:41:30 +07:00

61 lines
1.0 KiB
Vue

<template>
<div class="loader-container" :class="{ 'loader--inline': inline }">
<div class="loader-spinner"></div>
<span v-if="text" class="loader-text">{{ text }}</span>
</div>
</template>
<script setup>
defineProps({
text: {
type: String,
default: 'Загрузка...'
},
inline: {
type: Boolean,
default: false
}
})
</script>
<style scoped>
.loader-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
padding: 80px;
color: var(--text-secondary);
}
.loader-container.loader--inline {
flex-direction: row;
padding: 40px;
gap: 12px;
}
.loader-spinner {
width: 40px;
height: 40px;
border: 3px solid rgba(255, 255, 255, 0.1);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 1s linear infinite;
}
.loader--inline .loader-spinner {
width: 24px;
height: 24px;
border-width: 2px;
}
.loader-text {
font-size: 14px;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
</style>