Ground the 21-day habit myth in actual research (Lally et al. 2010) and let users pick a target period (21/66/254 days or unlimited) matching that study's easy/median/hard automaticity timelines when creating a habit, with progress shown on the habits list. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
44 lines
1.5 KiB
HTML
44 lines
1.5 KiB
HTML
<div class="field">
|
|
<label>시행 요일</label>
|
|
<div class="weekday-picker">
|
|
<template x-for="(day, idx) in days" :key="idx">
|
|
<button
|
|
type="button"
|
|
class="weekday-pill"
|
|
:class="{ selected: (mask & (1 << idx)) !== 0 }"
|
|
@click="if (mask !== (1 << idx)) mask = mask ^ (1 << idx)"
|
|
x-text="day"
|
|
></button>
|
|
</template>
|
|
<button
|
|
type="button"
|
|
class="everyday-btn"
|
|
:class="{ selected: mask === 127 }"
|
|
@click="mask = 127"
|
|
>매일</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<label style="display:flex; align-items:center; gap:8px;">
|
|
<input type="checkbox" x-model="alarmOn" style="width:auto;" />
|
|
알람 사용
|
|
</label>
|
|
<input x-show="alarmOn" x-cloak type="time" name="reminder_time" value="{{ reminder_value|default('') }}" style="margin-top:6px;" />
|
|
</div>
|
|
|
|
<div class="field">
|
|
<label>목표 기간 난이도</label>
|
|
<div class="difficulty-picker">
|
|
{% for d in habit_difficulties %}
|
|
<button
|
|
type="button"
|
|
class="difficulty-pill"
|
|
:class="{ selected: difficulty === '{{ d.value }}' }"
|
|
@click="difficulty = '{{ d.value }}'"
|
|
>{{ difficulty_label(d) }}</button>
|
|
{% endfor %}
|
|
</div>
|
|
<p class="difficulty-hint">습관 자동화까지 걸리는 기간에 대한 실증 연구(Lally et al., 2010, UCL) 기준입니다 — 하는 단순한 습관이 자동화되는 데 걸리는 기간(약 3주), 중은 전체 중앙값, 상은 노력이 많이 드는 습관의 상한(약 8개월)입니다.</p>
|
|
</div>
|