refactor(frontend) : reorganize components into subdirectories and fix imports
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
26
frontend/components/ui/SidebarTimer.vue
Normal file
26
frontend/components/ui/SidebarTimer.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<button
|
||||
class="flex w-full items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-semibold text-white transition"
|
||||
:class="timerStore.isRunning
|
||||
? 'bg-red-500 hover:bg-red-600'
|
||||
: 'bg-primary-500 hover:bg-primary-600'"
|
||||
:title="timerStore.isRunning ? 'Arrêter le timer' : 'Démarrer un timer'"
|
||||
@click="timerStore.isRunning ? timerStore.stop() : timerStore.start()"
|
||||
>
|
||||
<Icon
|
||||
:name="timerStore.isRunning ? 'mdi:stop' : 'mdi:play'"
|
||||
size="16"
|
||||
/>
|
||||
<span v-if="!collapsed" class="font-mono tracking-wide">
|
||||
{{ timerStore.elapsedFormatted }}
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
collapsed: boolean
|
||||
}>()
|
||||
|
||||
const timerStore = useTimerStore()
|
||||
</script>
|
||||
Reference in New Issue
Block a user