Files
vue-pult/docs/migration/footer/PAUSE_BUTTON.md
2025-10-01 11:54:13 +03:00

28 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Документация по переносу кнопки "Пауза" в футере
## Общая структура в React
- **Расположение**: В BottomPanel.tsx, центр группы элементов.
- **Тип**: PauseButton компонент, button with onClick={togglePause}, title "Пауза/Возобновить".
- **Зависимости**: Tailwind CSS, lucide-react (Pause/Play icon), usePauseSystem for isPaused.
- **JSX**: <PauseButton /> — button class "w-16 h-16 rounded-full bg-red-500 hover:bg-red-600 flex items-center justify-center shadow-lg transition-all" title="Пауза" onClick={handlePauseToggle}.
- Icon: Pause (w-6 h-6, white) or Play if paused.
## Элементы
- Icon: Pause or Play (w-6 h-6, white).
- Title: "Пауза" or "Возобновить".
- Dynamic: icon/color based on isPaused from hook.
## Стили (Tailwind примеры)
- Button: w-16 h-16 rounded-full bg-red-500 hover:bg-red-600 flex items-center justify-center shadow-lg transition-all.
- Hover: hover:bg-red-600.
- Responsive: w-12 h-12 mobile, min-height 44px touch.
## Взаимодействие
- Click: toggle isPaused via usePauseSystem, send 'pause'/'resume' via WebSocket.
- In BottomPanel: <PauseButton /> in center.
## Vue маппинг
- <template>: <button @click="togglePause" class="w-16 h-16 rounded-full bg-red-500 ..." title="Пауза">
<component :is="isPaused ? Play : Pause" class="w-6 h-6" />
</button>.
- Composables: usePauseSystem (isPaused, togglePause).