Wrap title + filters in a sticky container (top-8 sm:top-12, z-20, bg-white) on all pages for consistent scroll behavior. Also fix SidebarTimer icon visibility when sidebar is collapsed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
927 B
Vue
30 lines
927 B
Vue
<template>
|
|
<button
|
|
class="flex w-full items-center justify-center gap-2 rounded-md py-2 text-sm font-semibold text-white transition"
|
|
:class="[
|
|
timerStore.isRunning
|
|
? 'bg-[#F18619] hover:bg-[#d97314]'
|
|
: 'bg-primary-500 hover:bg-primary-600',
|
|
collapsed ? 'px-2' : 'px-4'
|
|
]"
|
|
: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="collapsed ? '20' : '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>
|