v0.0.6
This commit is contained in:
114
src/App.vue
114
src/App.vue
@@ -20,6 +20,10 @@ function createEmptyTimetable() {
|
||||
return Array.from({ length: timetableCellCount }, () => false)
|
||||
}
|
||||
|
||||
function createTaskLabel(index) {
|
||||
return `${index + 1}`.padStart(2, '0')
|
||||
}
|
||||
|
||||
function createTimetableFromRanges(ranges) {
|
||||
const timetable = createEmptyTimetable()
|
||||
|
||||
@@ -37,21 +41,21 @@ const plannerSeed = {
|
||||
dday: 'D-12 LAUNCH',
|
||||
comment: '집중 작업 3개만 남기고, 10분 단위로 흐름을 끊지 않기.',
|
||||
tasks: [
|
||||
{ id: '01', title: '홈 화면 정보 구조 정리', checked: true },
|
||||
{ id: '02', title: '플래너 페이지 헤더 상태 연결', checked: true },
|
||||
{ id: '03', title: '타임테이블 액티브 블록 설계' },
|
||||
{ id: '04', title: '우측 캘린더 빠른 이동 구현' },
|
||||
{ id: '05', title: '전날 요약 영역 문구 다듬기' },
|
||||
{ id: '06', title: '다음날 할 일 자동 제안 시나리오' },
|
||||
{ id: '07', title: '통계 카드 레이아웃 정리' },
|
||||
{ id: '08', title: '모바일 스택 레이아웃 점검' },
|
||||
{ id: '09', title: '체크박스 인터랙션 연결' },
|
||||
{ id: '10', title: '페이지 넘김 애니메이션 방향 검토' },
|
||||
{ id: '11', title: 'Tailwind 토큰 정리' },
|
||||
{ id: '12', title: 'Vue 컴포넌트 분리 기준 정하기' },
|
||||
{ id: '13', title: '빈 상태 문구 작성' },
|
||||
{ id: '14', title: '주간 리듬 회고 메모 추가' },
|
||||
{ id: '15', title: '디자인 QA 체크리스트 정리' },
|
||||
{ label: '01', title: '홈 화면 정보 구조 정리', checked: true },
|
||||
{ label: '02', title: '플래너 페이지 헤더 상태 연결', checked: true },
|
||||
{ label: '03', title: '타임테이블 액티브 블록 설계' },
|
||||
{ label: '04', title: '우측 캘린더 빠른 이동 구현' },
|
||||
{ label: '05', title: '전날 요약 영역 문구 다듬기' },
|
||||
{ label: '06', title: '다음날 할 일 자동 제안 시나리오' },
|
||||
{ label: '07', title: '통계 카드 레이아웃 정리' },
|
||||
{ label: '08', title: '모바일 스택 레이아웃 점검' },
|
||||
{ label: '09', title: '체크박스 인터랙션 연결' },
|
||||
{ label: '10', title: '페이지 넘김 애니메이션 방향 검토' },
|
||||
{ label: '11', title: 'Tailwind 토큰 정리' },
|
||||
{ label: '12', title: 'Vue 컴포넌트 분리 기준 정하기' },
|
||||
{ label: '13', title: '빈 상태 문구 작성' },
|
||||
{ label: '14', title: '주간 리듬 회고 메모 추가' },
|
||||
{ label: '15', title: '디자인 QA 체크리스트 정리' },
|
||||
],
|
||||
memo: [
|
||||
'오른쪽 패널은 정보 확인과 이동이 한 번에 되도록 유지.',
|
||||
@@ -78,21 +82,21 @@ const plannerSeed = {
|
||||
dday: 'D-11 LAUNCH',
|
||||
comment: '초반 90분은 구현, 후반은 문장과 사용성 정리에 사용.',
|
||||
tasks: [
|
||||
{ id: '01', title: '통계 섹션 수치 실제 계산 연결', checked: true },
|
||||
{ id: '02', title: '날짜 선택 시 상태 동기화' },
|
||||
{ id: '03', title: '다음날 할 일 템플릿 개선' },
|
||||
{ id: '04', title: '2페이지 보기 비교 카피 작성' },
|
||||
{ id: '05', title: '주간 흐름 카드 추가' },
|
||||
{ id: '06', title: '메모 영역 편집 UX 개선' },
|
||||
{ id: '07', title: '프린트 스타일 초안 점검' },
|
||||
{ id: '08', title: '색 대비 보정' },
|
||||
{ id: '09', title: '우측 패널 축약 버전 검토' },
|
||||
{ id: '10', title: '마감용 체크리스트 분리' },
|
||||
{ id: '11', title: '키보드 탐색 흐름 다듬기' },
|
||||
{ id: '12', title: '데이터 구조 문서화' },
|
||||
{ id: '13', title: '테스트 날짜 더미 세트 늘리기' },
|
||||
{ id: '14', title: '브랜드 푸터 위치 확정' },
|
||||
{ id: '15', title: '빈 상태 일러스트 여부 결정' },
|
||||
{ label: '01', title: '통계 섹션 수치 실제 계산 연결', checked: true },
|
||||
{ label: '02', title: '날짜 선택 시 상태 동기화' },
|
||||
{ label: '03', title: '다음날 할 일 템플릿 개선' },
|
||||
{ label: '04', title: '2페이지 보기 비교 카피 작성' },
|
||||
{ label: '05', title: '주간 흐름 카드 추가' },
|
||||
{ label: '06', title: '메모 영역 편집 UX 개선' },
|
||||
{ label: '07', title: '프린트 스타일 초안 점검' },
|
||||
{ label: '08', title: '색 대비 보정' },
|
||||
{ label: '09', title: '우측 패널 축약 버전 검토' },
|
||||
{ label: '10', title: '마감용 체크리스트 분리' },
|
||||
{ label: '11', title: '키보드 탐색 흐름 다듬기' },
|
||||
{ label: '12', title: '데이터 구조 문서화' },
|
||||
{ label: '13', title: '테스트 날짜 더미 세트 늘리기' },
|
||||
{ label: '14', title: '브랜드 푸터 위치 확정' },
|
||||
{ label: '15', title: '빈 상태 일러스트 여부 결정' },
|
||||
],
|
||||
memo: [
|
||||
'한 화면에 모든 정보를 모으되 시선 이동은 짧게.',
|
||||
@@ -136,7 +140,7 @@ function buildFallbackRecord(date) {
|
||||
dday: 'D-00 FOCUS',
|
||||
comment: '',
|
||||
tasks: Array.from({ length: 15 }, (_, index) => ({
|
||||
id: `${index + 1}`.padStart(2, '0'),
|
||||
label: createTaskLabel(index),
|
||||
title: '',
|
||||
checked: false,
|
||||
})),
|
||||
@@ -150,6 +154,11 @@ function buildFallbackRecord(date) {
|
||||
function normalizeRecord(record) {
|
||||
return {
|
||||
...record,
|
||||
tasks: record.tasks.map((task, index) => ({
|
||||
label: task.label ?? task.id ?? createTaskLabel(index),
|
||||
title: task.title ?? '',
|
||||
checked: Boolean(task.checked),
|
||||
})),
|
||||
timetable: Array.isArray(record.timetable) && record.timetable.length === timetableCellCount
|
||||
? [...record.timetable]
|
||||
: createEmptyTimetable(),
|
||||
@@ -252,6 +261,10 @@ function updateComment(record, value) {
|
||||
record.comment = value
|
||||
}
|
||||
|
||||
function updateTaskLabel(record, { index, value }) {
|
||||
record.tasks[index].label = value
|
||||
}
|
||||
|
||||
function updateTaskTitle(record, { index, value }) {
|
||||
record.tasks[index].title = value
|
||||
}
|
||||
@@ -276,6 +289,18 @@ function hasPlannerContent(record) {
|
||||
record.timetable.some(Boolean),
|
||||
)
|
||||
}
|
||||
|
||||
function fillTaskLabelsWithNumbers(record) {
|
||||
record.tasks.forEach((task, index) => {
|
||||
task.label = createTaskLabel(index)
|
||||
})
|
||||
}
|
||||
|
||||
function clearTaskLabels(record) {
|
||||
record.tasks.forEach((task) => {
|
||||
task.label = ''
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -345,6 +370,7 @@ function hasPlannerContent(record) {
|
||||
:hours="hours"
|
||||
:timetable="planner.timetable"
|
||||
@update:comment="updateComment(planner, $event)"
|
||||
@update:task-label="updateTaskLabel(planner, $event)"
|
||||
@update:task-title="updateTaskTitle(planner, $event)"
|
||||
@toggle:task="toggleTask(planner, $event)"
|
||||
@update:memo="updateMemo(planner, $event)"
|
||||
@@ -365,6 +391,29 @@ function hasPlannerContent(record) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="border border-stone-200 bg-white/80 p-5">
|
||||
<p class="mb-3 text-[11px] font-bold tracking-[0.22em] text-ink">TASK LABELS</p>
|
||||
<p class="text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-600">
|
||||
왼쪽 라벨은 직접 입력할 수 있고, 필요하면 아래 버튼으로 순번을 한 번에 채울 수 있습니다.
|
||||
</p>
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-3 py-2 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="fillTaskLabelsWithNumbers(planner)"
|
||||
>
|
||||
번호 채우기
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-3 py-2 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="clearTaskLabels(planner)"
|
||||
>
|
||||
라벨 비우기
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="border border-stone-200 bg-white/80 p-5">
|
||||
<p class="mb-4 text-[11px] font-bold tracking-[0.22em] text-ink">READ NEXT</p>
|
||||
<div class="space-y-3">
|
||||
@@ -386,6 +435,7 @@ function hasPlannerContent(record) {
|
||||
:marked-keys="markedDateKeys"
|
||||
@shift-month="shiftCalendarMonth"
|
||||
@shift-year="shiftCalendarYear"
|
||||
@go-today="selectDate(new Date())"
|
||||
@select="selectDate"
|
||||
/>
|
||||
|
||||
@@ -431,6 +481,7 @@ function hasPlannerContent(record) {
|
||||
:hours="hours"
|
||||
:timetable="planner.timetable"
|
||||
@update:comment="updateComment(planner, $event)"
|
||||
@update:task-label="updateTaskLabel(planner, $event)"
|
||||
@update:task-title="updateTaskTitle(planner, $event)"
|
||||
@toggle:task="toggleTask(planner, $event)"
|
||||
@update:memo="updateMemo(planner, $event)"
|
||||
@@ -446,6 +497,7 @@ function hasPlannerContent(record) {
|
||||
:hours="hours"
|
||||
:timetable="secondaryPlanner.timetable"
|
||||
@update:comment="updateComment(secondaryPlanner, $event)"
|
||||
@update:task-label="updateTaskLabel(secondaryPlanner, $event)"
|
||||
@update:task-title="updateTaskTitle(secondaryPlanner, $event)"
|
||||
@toggle:task="toggleTask(secondaryPlanner, $event)"
|
||||
@update:memo="updateMemo(secondaryPlanner, $event)"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
monthLabel: {
|
||||
type: String,
|
||||
required: true,
|
||||
@@ -22,50 +24,94 @@ defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['select', 'shift-month', 'shift-year'])
|
||||
const emit = defineEmits(['select', 'shift-month', 'shift-year', 'go-today'])
|
||||
|
||||
const isYearPickerOpen = ref(false)
|
||||
const currentYearNumber = computed(() => Number(props.yearLabel))
|
||||
const yearRangeStart = computed(() => currentYearNumber.value - (currentYearNumber.value % 12))
|
||||
const visibleYears = computed(() =>
|
||||
Array.from({ length: 12 }, (_, index) => yearRangeStart.value + index),
|
||||
)
|
||||
|
||||
function selectYear(year) {
|
||||
emit('shift-year', year - currentYearNumber.value)
|
||||
isYearPickerOpen.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="border border-stone-200 bg-white/80 p-5">
|
||||
<div class="mb-4 flex items-start justify-between gap-4">
|
||||
<div class="relative mb-4 flex items-start justify-between gap-4">
|
||||
<div>
|
||||
<h2 class="text-[11px] font-bold tracking-[0.22em] text-ink">CALENDAR</h2>
|
||||
<div class="mt-2 space-y-1">
|
||||
<p class="text-base font-semibold tracking-[-0.04em] text-stone-900">{{ monthLabel }}</p>
|
||||
<p class="text-[11px] font-semibold tracking-[0.16em] text-stone-500">{{ yearLabel }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="mt-2 flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-3 py-1 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="emit('shift-year', -1)"
|
||||
>
|
||||
-1Y
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-3 py-1 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="emit('shift-year', 1)"
|
||||
>
|
||||
+1Y
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-3 py-1 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
class="rounded-full border border-stone-200 px-2 py-1 text-xs font-bold text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="emit('shift-month', -1)"
|
||||
>
|
||||
PREV
|
||||
←
|
||||
</button>
|
||||
<div class="flex items-center gap-2">
|
||||
<p class="text-base font-semibold tracking-[-0.04em] text-stone-900">{{ monthLabel }}</p>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full px-2 py-1 text-[11px] font-semibold tracking-[0.16em] text-stone-500 transition hover:bg-stone-100 hover:text-ink"
|
||||
@click="isYearPickerOpen = !isYearPickerOpen"
|
||||
>
|
||||
{{ yearLabel }}
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-3 py-1 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
class="rounded-full border border-stone-200 px-2 py-1 text-xs font-bold text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="emit('shift-month', 1)"
|
||||
>
|
||||
NEXT
|
||||
→
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-3 py-2 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="emit('go-today')"
|
||||
>
|
||||
TODAY
|
||||
</button>
|
||||
|
||||
<div
|
||||
v-if="isYearPickerOpen"
|
||||
class="absolute right-0 top-14 z-10 w-[220px] rounded-2xl border border-stone-200 bg-white p-4 shadow-lg"
|
||||
>
|
||||
<div class="mb-3 flex items-center justify-between">
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-2 py-1 text-xs font-bold text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="emit('shift-year', -12)"
|
||||
>
|
||||
←
|
||||
</button>
|
||||
<p class="text-[11px] font-bold tracking-[0.16em] text-stone-500">
|
||||
{{ visibleYears[0] }} - {{ visibleYears[visibleYears.length - 1] }}
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-stone-200 px-2 py-1 text-xs font-bold text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||
@click="emit('shift-year', 12)"
|
||||
>
|
||||
→
|
||||
</button>
|
||||
</div>
|
||||
<div class="grid grid-cols-3 gap-2">
|
||||
<button
|
||||
v-for="year in visibleYears"
|
||||
:key="year"
|
||||
type="button"
|
||||
class="rounded-xl border px-3 py-2 text-[11px] font-semibold transition"
|
||||
:class="year === currentYearNumber ? 'border-ink bg-ink text-white' : 'border-stone-200 text-stone-700 hover:border-stone-400 hover:bg-stone-50'"
|
||||
@click="selectYear(year)"
|
||||
>
|
||||
{{ year }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,6 +42,7 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits([
|
||||
'update:comment',
|
||||
'update:task-label',
|
||||
'update:task-title',
|
||||
'toggle:task',
|
||||
'update:memo',
|
||||
@@ -143,8 +144,14 @@ onBeforeUnmount(() => {
|
||||
class="flex h-[38px] items-center border-b"
|
||||
:class="index % 5 === 4 || index === tasks.length - 1 ? 'border-ink' : 'border-line'"
|
||||
>
|
||||
<div class="h-full w-[62px] border-r border-dashed border-ink px-2 py-2 text-[9px] text-stone-500">
|
||||
{{ task.id }}
|
||||
<div class="h-full w-[62px] border-r border-dashed border-ink px-2 py-[7px]">
|
||||
<input
|
||||
:value="task.label"
|
||||
type="text"
|
||||
class="w-full bg-transparent text-center text-[9px] font-semibold tracking-[0.08em] text-stone-500 outline-none placeholder:text-stone-300"
|
||||
:placeholder="`${index + 1}`.padStart(2, '0')"
|
||||
@input="emit('update:task-label', { index, value: $event.target.value })"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex min-w-0 flex-1 items-center px-3">
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user