v0.1.39 - 달력 원형과 D-DAY 표시 상태 보정
This commit is contained in:
11
src/App.vue
11
src/App.vue
@@ -212,7 +212,7 @@ function startOfDay(date) {
|
||||
function buildFallbackRecord(date) {
|
||||
return {
|
||||
comment: '',
|
||||
goalEnabled: true,
|
||||
goalEnabled: false,
|
||||
selectedGoalId: null,
|
||||
tasks: Array.from({ length: 15 }, (_, index) => ({
|
||||
label: '',
|
||||
@@ -363,6 +363,7 @@ const activePlannerGoals = computed(() =>
|
||||
}),
|
||||
)
|
||||
const plannerGoal = computed(() => activePlannerGoals.value[0] ?? null)
|
||||
const plannerGoalToggleOn = computed(() => Boolean(plannerGoal.value) && planner.value.goalEnabled)
|
||||
const plannerDday = computed(() => {
|
||||
if (!planner.value.goalEnabled || !plannerGoal.value) {
|
||||
return ''
|
||||
@@ -1930,13 +1931,13 @@ onBeforeUnmount(() => {
|
||||
<button
|
||||
type="button"
|
||||
class="relative h-8 w-16 shrink-0 rounded-full transition-colors duration-300 ease-out disabled:cursor-not-allowed disabled:opacity-50"
|
||||
:class="planner.goalEnabled ? 'bg-stone-900' : 'bg-stone-300'"
|
||||
:class="plannerGoalToggleOn ? 'bg-stone-900' : 'bg-stone-300'"
|
||||
:disabled="!hasActiveGoalForSelectedDate"
|
||||
@click="updateGoalEnabled(planner, !planner.goalEnabled)"
|
||||
>
|
||||
<span
|
||||
class="absolute left-1 top-1 h-6 w-6 transform-gpu rounded-full bg-white shadow-sm transition-transform duration-300 ease-out will-change-transform"
|
||||
:class="planner.goalEnabled ? 'translate-x-8' : 'translate-x-0'"
|
||||
:class="plannerGoalToggleOn ? 'translate-x-8' : 'translate-x-0'"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
@@ -2091,13 +2092,13 @@ onBeforeUnmount(() => {
|
||||
<button
|
||||
type="button"
|
||||
class="relative h-8 w-16 shrink-0 rounded-full transition-colors duration-300 ease-out disabled:cursor-not-allowed disabled:opacity-50"
|
||||
:class="planner.goalEnabled ? 'bg-stone-900' : 'bg-stone-300'"
|
||||
:class="plannerGoalToggleOn ? 'bg-stone-900' : 'bg-stone-300'"
|
||||
:disabled="!hasActiveGoalForSelectedDate"
|
||||
@click="updateGoalEnabled(planner, !planner.goalEnabled)"
|
||||
>
|
||||
<span
|
||||
class="absolute left-1 top-1 h-6 w-6 transform-gpu rounded-full bg-white shadow-sm transition-transform duration-300 ease-out will-change-transform"
|
||||
:class="planner.goalEnabled ? 'translate-x-8' : 'translate-x-0'"
|
||||
:class="plannerGoalToggleOn ? 'translate-x-8' : 'translate-x-0'"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user