File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -55,18 +55,22 @@ watch(
55
55
);
56
56
</script >
57
57
<template >
58
- <dialog ref =" dialog" class =" m-auto bg-transparent" @close =" close" >
58
+ <dialog
59
+ ref =" dialog"
60
+ class =" m-auto translate-y-2 bg-transparent opacity-0 transition-all transition-discrete duration-500 backdrop:opacity-0 backdrop:transition-all backdrop:transition-discrete backdrop:duration-500 open:translate-0 open:opacity-100 open:backdrop:opacity-100 starting:open:translate-y-2 starting:open:opacity-0 starting:open:backdrop:opacity-0"
61
+ @close =" close"
62
+ >
59
63
<LayoutStack
60
- v-show =" open"
61
64
tag =" form"
65
+ method =" dialog"
62
66
space =" 1"
63
67
class =" w-full rounded-lg border border-blue-200 bg-white px-4 py-2 dark:border-sky-400 dark:bg-stone-800"
64
- @submit.prevent =" submit"
68
+ @submit =" submit"
65
69
>
66
- <h2 class =" self-center text-lg" >
70
+ <h1 class =" self-center text-lg" >
67
71
<BaseIcon name =" wrench" class =" align-middle" />
68
72
Settings
69
- </h2 >
73
+ </h1 >
70
74
<div class =" space-y-1 px-4 py-2" >
71
75
<IntervalEditBox
72
76
v-for =" interval in intervalsRef"
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import BaseTimer from ' @/components/BaseTimer.vue' ;
3
3
import { useCycle } from ' @/stores/cycle' ;
4
+ import { computed } from ' vue' ;
4
5
5
6
const cycle = useCycle ();
7
+ const currentCycle = computed (() => cycle .intervals [cycle .current ]);
8
+ const countdown = computed (() => cycle .countdowns [cycle .current ]);
6
9
</script >
7
10
<template >
8
11
<TransitionGroup
@@ -16,11 +19,10 @@ const cycle = useCycle();
16
19
class =" grid-overlap grid"
17
20
>
18
21
<BaseTimer
19
- v-for =" (interval, i) in cycle.intervals"
20
- v-show =" i === cycle.current"
21
- :key =" interval.id"
22
- :duration =" cycle.countdowns[i]"
23
- :type =" interval.type"
22
+ v-if =" currentCycle"
23
+ :key =" currentCycle.id"
24
+ :duration =" countdown"
25
+ :type =" currentCycle.type"
24
26
class =" will-change-transform"
25
27
/>
26
28
</TransitionGroup >
You can’t perform that action at this time.
0 commit comments