|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
|
<script setup>
|
|
|
|
|
import { computed, onMounted, reactive, ref, watch, nextTick } from 'vue'
|
|
|
|
|
import { computed, nextTick, onBeforeUnmount, onMounted, reactive, ref, watch } from 'vue'
|
|
|
|
|
import AuthDialog from './components/AuthDialog.vue'
|
|
|
|
|
import GoalsDashboard from './components/GoalsDashboard.vue'
|
|
|
|
|
import MiniCalendar from './components/MiniCalendar.vue'
|
|
|
|
|
@@ -45,6 +45,9 @@ const syncMessage = ref('')
|
|
|
|
|
const syncToastVisible = ref(false)
|
|
|
|
|
const selectedDate = ref(new Date())
|
|
|
|
|
const calendarViewDate = ref(new Date(selectedDate.value))
|
|
|
|
|
const windowWidth = ref(typeof window === 'undefined' ? 1920 : window.innerWidth)
|
|
|
|
|
const leftPanelOpen = ref(false)
|
|
|
|
|
const rightPanelOpen = ref(false)
|
|
|
|
|
const statsRangeStart = ref(toKey(new Date(new Date().setDate(new Date().getDate() - 6))))
|
|
|
|
|
const statsRangeEnd = ref(toKey(new Date()))
|
|
|
|
|
const authForm = reactive({
|
|
|
|
|
@@ -314,7 +317,7 @@ const calendarDays = computed(() => {
|
|
|
|
|
const start = new Date(first)
|
|
|
|
|
start.setDate(first.getDate() - first.getDay())
|
|
|
|
|
|
|
|
|
|
return Array.from({ length: 35 }, (_, index) => {
|
|
|
|
|
return Array.from({ length: 42 }, (_, index) => {
|
|
|
|
|
const date = new Date(start)
|
|
|
|
|
date.setDate(start.getDate() + index)
|
|
|
|
|
return {
|
|
|
|
|
@@ -401,6 +404,16 @@ function formatTotalTime(record) {
|
|
|
|
|
return `${hoursPart}H ${minutesPart}M`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function formatMinutesKorean(totalMinutes) {
|
|
|
|
|
const hoursPart = `${Math.floor(totalMinutes / 60)}`.padStart(2, '0')
|
|
|
|
|
const minutesPart = `${totalMinutes % 60}`.padStart(2, '0')
|
|
|
|
|
return `${hoursPart}시간 ${minutesPart}분`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function formatTotalTimeKorean(record) {
|
|
|
|
|
return formatMinutesKorean(record.timetable.filter(Boolean).length * 10)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getFocusedMinutes(record) {
|
|
|
|
|
return record.timetable.filter(Boolean).length * 10
|
|
|
|
|
}
|
|
|
|
|
@@ -546,7 +559,7 @@ const aggregateCompletionRate = computed(() => {
|
|
|
|
|
const overviewCards = computed(() => [
|
|
|
|
|
{
|
|
|
|
|
label: 'TOTAL FOCUSED',
|
|
|
|
|
value: formatMinutes(totalFocusedMinutes.value),
|
|
|
|
|
value: formatMinutesKorean(totalFocusedMinutes.value),
|
|
|
|
|
caption: '지금까지 기록된 전체 집중 시간',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@@ -588,7 +601,7 @@ const weeklyRecords = computed(() => {
|
|
|
|
|
key,
|
|
|
|
|
weekday: weekdayShort,
|
|
|
|
|
focusedMinutes,
|
|
|
|
|
focusedTime: formatMinutes(focusedMinutes),
|
|
|
|
|
focusedTime: formatMinutesKorean(focusedMinutes),
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
@@ -612,7 +625,7 @@ const recentRecords = computed(() =>
|
|
|
|
|
key,
|
|
|
|
|
dateLabel: createDateLabel(key),
|
|
|
|
|
comment: record.comment.trim(),
|
|
|
|
|
focusedTime: formatTotalTime(record),
|
|
|
|
|
focusedTime: formatTotalTimeKorean(record),
|
|
|
|
|
completionRate: getCompletionRate(record),
|
|
|
|
|
})),
|
|
|
|
|
)
|
|
|
|
|
@@ -631,7 +644,7 @@ const bestDay = computed(() => {
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
dateLabel: createDateLabel(bestKey),
|
|
|
|
|
summary: `${formatTotalTime(bestRecord)} 집중, 완료율 ${getCompletionRate(bestRecord)}%, 코멘트 "${
|
|
|
|
|
summary: `${formatTotalTimeKorean(bestRecord)} 집중, 완료율 ${getCompletionRate(bestRecord)}%, 코멘트 "${
|
|
|
|
|
bestRecord.comment.trim() || '없음'
|
|
|
|
|
}"`,
|
|
|
|
|
}
|
|
|
|
|
@@ -661,7 +674,7 @@ const prevSnapshotItems = computed(() => {
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
`${createDateLabel(entryKey)} 기록`,
|
|
|
|
|
`${formatTotalTime(entryRecord)} 집중 / 완료 ${completedCount}개`,
|
|
|
|
|
`${formatTotalTimeKorean(entryRecord)} 집중 / 완료 ${completedCount}개`,
|
|
|
|
|
previousComment || (previousTopTask ? `주요 작업: ${previousTopTask.title}` : '남겨진 코멘트 없음'),
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
@@ -687,6 +700,52 @@ const readNextItems = computed(() => {
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const isWideFocusSidebar = computed(() => windowWidth.value >= 1620)
|
|
|
|
|
const isOverlayFocusSidebar = computed(() => windowWidth.value < 1280)
|
|
|
|
|
const showInlineLeftSidebar = computed(() => windowWidth.value >= 1280)
|
|
|
|
|
const isCompactMobile = computed(() => windowWidth.value < 800)
|
|
|
|
|
const showInlineFocusSidebar = computed(() => !isOverlayFocusSidebar.value)
|
|
|
|
|
const focusSidebarOuterClass = computed(() =>
|
|
|
|
|
showInlineFocusSidebar.value
|
|
|
|
|
? isWideFocusSidebar.value
|
|
|
|
|
? 'xl:w-[640px]'
|
|
|
|
|
: 'xl:w-full xl:max-w-[360px]'
|
|
|
|
|
: '',
|
|
|
|
|
)
|
|
|
|
|
const focusSidebarGridClass = computed(() =>
|
|
|
|
|
isWideFocusSidebar.value
|
|
|
|
|
? '2xl:grid-cols-[280px_minmax(0,1fr)] 2xl:items-start'
|
|
|
|
|
: 'grid-cols-1',
|
|
|
|
|
)
|
|
|
|
|
const spreadScale = computed(() => {
|
|
|
|
|
const reservedWidth = windowWidth.value >= 1280 ? 410 : 96
|
|
|
|
|
const availableWidth = Math.max(windowWidth.value - reservedWidth, 980)
|
|
|
|
|
const baseWidth = 1548
|
|
|
|
|
const nextScale = Math.min(1, availableWidth / baseWidth)
|
|
|
|
|
|
|
|
|
|
return Number(Math.max(nextScale, 0.86).toFixed(3))
|
|
|
|
|
})
|
|
|
|
|
const spreadCanvasStyle = computed(() => {
|
|
|
|
|
const scale = spreadScale.value
|
|
|
|
|
return {
|
|
|
|
|
width: `${1548 * scale}px`,
|
|
|
|
|
minWidth: `${1548 * scale}px`,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const spreadPageFrameStyle = computed(() => {
|
|
|
|
|
const scale = spreadScale.value
|
|
|
|
|
return {
|
|
|
|
|
width: `${762 * scale}px`,
|
|
|
|
|
height: `${1118 * scale}px`,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const spreadPageStyle = computed(() => ({
|
|
|
|
|
width: '762px',
|
|
|
|
|
maxWidth: 'none',
|
|
|
|
|
transform: `scale(${spreadScale.value})`,
|
|
|
|
|
transformOrigin: 'top left',
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
[plannerRecords, selectedDate, calendarViewDate, statsRangeStart, statsRangeEnd],
|
|
|
|
|
() => {
|
|
|
|
|
@@ -733,6 +792,41 @@ function areTaskLabelsNumbered(record) {
|
|
|
|
|
return record.tasks.every((task, index) => task.label === createTaskLabel(index))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateWindowWidth() {
|
|
|
|
|
windowWidth.value = window.innerWidth
|
|
|
|
|
|
|
|
|
|
if (windowWidth.value >= 1280) {
|
|
|
|
|
leftPanelOpen.value = false
|
|
|
|
|
rightPanelOpen.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function openLeftPanel() {
|
|
|
|
|
leftPanelOpen.value = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function closeLeftPanel() {
|
|
|
|
|
leftPanelOpen.value = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function openRightPanel() {
|
|
|
|
|
rightPanelOpen.value = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function closeRightPanel() {
|
|
|
|
|
rightPanelOpen.value = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setScreenMode(mode) {
|
|
|
|
|
screenMode.value = mode
|
|
|
|
|
closeLeftPanel()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setViewMode(mode) {
|
|
|
|
|
viewMode.value = mode
|
|
|
|
|
closeLeftPanel()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setSyncFeedback(status, message, options = {}) {
|
|
|
|
|
const {
|
|
|
|
|
visible = true,
|
|
|
|
|
@@ -1294,8 +1388,14 @@ onMounted(() => {
|
|
|
|
|
setSyncFeedback('local', '로그인 후 클라우드 저장을 사용할 수 있습니다.', {
|
|
|
|
|
visible: false,
|
|
|
|
|
})
|
|
|
|
|
updateWindowWidth()
|
|
|
|
|
window.addEventListener('resize', updateWindowWidth)
|
|
|
|
|
restoreAuthSession()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
window.removeEventListener('resize', updateWindowWidth)
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
@@ -1304,11 +1404,57 @@ onMounted(() => {
|
|
|
|
|
class="print-root mx-auto flex max-w-[1760px] flex-col gap-6"
|
|
|
|
|
:class="isAuthenticated ? 'xl:h-[calc(100vh-3rem)] xl:grid xl:grid-cols-[300px_minmax(0,1fr)] xl:items-start' : 'min-h-[calc(100vh-3rem)] items-center justify-center'"
|
|
|
|
|
>
|
|
|
|
|
<section
|
|
|
|
|
v-if="isAuthenticated && !showInlineLeftSidebar"
|
|
|
|
|
class="print-hidden rounded-[28px] border border-white/60 bg-white/78 p-4 shadow-[0_18px_60px_rgba(28,25,23,0.08)] backdrop-blur"
|
|
|
|
|
>
|
|
|
|
|
<div class="flex items-start justify-between gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[10px] font-bold uppercase tracking-[0.22em] text-stone-500">10 Minute Planner</p>
|
|
|
|
|
<p class="mt-2 text-lg font-semibold tracking-[-0.04em] text-stone-900">
|
|
|
|
|
{{ screenMode.toUpperCase() }}
|
|
|
|
|
</p>
|
|
|
|
|
<p class="mt-1 text-[11px] font-semibold text-stone-500">
|
|
|
|
|
{{ currentUser?.nickname }} 님의 플래너
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="rounded-full border border-stone-200 bg-white px-4 py-2 text-[11px] font-bold tracking-[0.16em] text-stone-700 transition hover:border-stone-400 hover:text-ink"
|
|
|
|
|
@click="openLeftPanel"
|
|
|
|
|
>
|
|
|
|
|
MENU
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
v-if="isAuthenticated && !showInlineLeftSidebar && leftPanelOpen"
|
|
|
|
|
class="fixed inset-0 z-40 bg-stone-900/22 backdrop-blur-[2px]"
|
|
|
|
|
@click="closeLeftPanel"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<aside
|
|
|
|
|
v-if="isAuthenticated"
|
|
|
|
|
class="scrollbar-hide print-hidden rounded-[28px] border border-white/60 bg-white/70 p-5 backdrop-blur sm:p-6 xl:h-full xl:overflow-y-auto"
|
|
|
|
|
class="scrollbar-hide print-hidden rounded-[28px] border border-white/60 bg-white/70 p-5 backdrop-blur sm:p-6"
|
|
|
|
|
:class="showInlineLeftSidebar ? 'xl:h-full xl:overflow-y-auto' : 'fixed inset-y-4 left-4 z-50 w-[min(360px,calc(100vw-2rem))] overflow-y-auto shadow-[0_18px_60px_rgba(28,25,23,0.14)]'"
|
|
|
|
|
v-show="showInlineLeftSidebar || leftPanelOpen"
|
|
|
|
|
>
|
|
|
|
|
<div class="space-y-6">
|
|
|
|
|
<div v-if="!showInlineLeftSidebar" class="flex items-center justify-between rounded-[20px] border border-stone-200 bg-white/85 px-4 py-3">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[10px] font-bold uppercase tracking-[0.2em] text-stone-500">Navigation</p>
|
|
|
|
|
<p class="mt-1 text-sm font-semibold text-stone-900">{{ currentUser?.nickname }}</p>
|
|
|
|
|
</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"
|
|
|
|
|
@click="closeLeftPanel"
|
|
|
|
|
>
|
|
|
|
|
CLOSE
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="space-y-2">
|
|
|
|
|
<p class="text-[11px] font-bold uppercase tracking-[0.28em] text-stone-500">10 Minute Planner</p>
|
|
|
|
|
<h1 class="text-2xl font-semibold tracking-[-0.04em] text-stone-900">
|
|
|
|
|
@@ -1363,7 +1509,7 @@ onMounted(() => {
|
|
|
|
|
type="button"
|
|
|
|
|
class="rounded-[20px] border px-4 py-4 text-left transition"
|
|
|
|
|
:class="screenMode === 'planner' ? 'border-stone-900 bg-stone-900 text-white shadow-[0_12px_24px_rgba(28,25,23,0.18)]' : 'border-stone-200 bg-white text-stone-700 hover:border-stone-400'"
|
|
|
|
|
@click="screenMode = 'planner'"
|
|
|
|
|
@click="setScreenMode('planner')"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-xs font-bold tracking-[0.18em]">PLANNER</p>
|
|
|
|
|
<p class="mt-1 text-[11px] font-semibold tracking-[0.04em]" :class="screenMode === 'planner' ? 'text-stone-200' : 'text-stone-500'">오늘 문서 작성과 캘린더 이동</p>
|
|
|
|
|
@@ -1372,7 +1518,7 @@ onMounted(() => {
|
|
|
|
|
type="button"
|
|
|
|
|
class="rounded-[20px] border px-4 py-4 text-left transition"
|
|
|
|
|
:class="screenMode === 'stats' ? 'border-stone-900 bg-stone-900 text-white shadow-[0_12px_24px_rgba(28,25,23,0.18)]' : 'border-stone-200 bg-white text-stone-700 hover:border-stone-400'"
|
|
|
|
|
@click="screenMode = 'stats'"
|
|
|
|
|
@click="setScreenMode('stats')"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-xs font-bold tracking-[0.18em]">STATS</p>
|
|
|
|
|
<p class="mt-1 text-[11px] font-semibold tracking-[0.04em]" :class="screenMode === 'stats' ? 'text-stone-200' : 'text-stone-500'">기간별 집중 시간과 완료율</p>
|
|
|
|
|
@@ -1381,7 +1527,7 @@ onMounted(() => {
|
|
|
|
|
type="button"
|
|
|
|
|
class="rounded-[20px] border px-4 py-4 text-left transition"
|
|
|
|
|
:class="screenMode === 'goals' ? 'border-stone-900 bg-stone-900 text-white shadow-[0_12px_24px_rgba(28,25,23,0.18)]' : 'border-stone-200 bg-white text-stone-700 hover:border-stone-400'"
|
|
|
|
|
@click="screenMode = 'goals'"
|
|
|
|
|
@click="setScreenMode('goals')"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-xs font-bold tracking-[0.18em]">GOALS</p>
|
|
|
|
|
<p class="mt-1 text-[11px] font-semibold tracking-[0.04em]" :class="screenMode === 'goals' ? 'text-stone-200' : 'text-stone-500'">D-DAY 목표와 표시 기간 관리</p>
|
|
|
|
|
@@ -1390,7 +1536,7 @@ onMounted(() => {
|
|
|
|
|
type="button"
|
|
|
|
|
class="rounded-[20px] border px-4 py-4 text-left transition"
|
|
|
|
|
:class="screenMode === 'settings' ? 'border-stone-900 bg-stone-900 text-white shadow-[0_12px_24px_rgba(28,25,23,0.18)]' : 'border-stone-200 bg-white text-stone-700 hover:border-stone-400'"
|
|
|
|
|
@click="screenMode = 'settings'"
|
|
|
|
|
@click="setScreenMode('settings')"
|
|
|
|
|
>
|
|
|
|
|
<p class="text-xs font-bold tracking-[0.18em]">SETTINGS</p>
|
|
|
|
|
<p class="mt-1 text-[11px] font-semibold tracking-[0.04em]" :class="screenMode === 'settings' ? 'text-stone-200' : 'text-stone-500'">계정 정보와 비밀번호 수정</p>
|
|
|
|
|
@@ -1405,7 +1551,7 @@ onMounted(() => {
|
|
|
|
|
type="button"
|
|
|
|
|
class="rounded-2xl px-4 py-3 text-xs font-bold tracking-[0.14em] transition"
|
|
|
|
|
:class="viewMode === 'focus' ? 'bg-stone-900 text-white' : 'bg-stone-100 text-stone-500'"
|
|
|
|
|
@click="viewMode = 'focus'"
|
|
|
|
|
@click="setViewMode('focus')"
|
|
|
|
|
>
|
|
|
|
|
1 PAGE + INFO
|
|
|
|
|
</button>
|
|
|
|
|
@@ -1413,7 +1559,7 @@ onMounted(() => {
|
|
|
|
|
type="button"
|
|
|
|
|
class="rounded-2xl px-4 py-3 text-xs font-bold tracking-[0.14em] transition"
|
|
|
|
|
:class="viewMode === 'spread' ? 'bg-stone-900 text-white' : 'bg-stone-100 text-stone-500'"
|
|
|
|
|
@click="viewMode = 'spread'"
|
|
|
|
|
@click="setViewMode('spread')"
|
|
|
|
|
>
|
|
|
|
|
2 PAGE SPREAD
|
|
|
|
|
</button>
|
|
|
|
|
@@ -1522,9 +1668,25 @@ onMounted(() => {
|
|
|
|
|
|
|
|
|
|
<section
|
|
|
|
|
v-else-if="screenMode === 'planner' && viewMode === 'focus'"
|
|
|
|
|
class="print-hidden grid gap-6 xl:h-full xl:min-h-0 xl:grid-cols-[minmax(0,1fr)_340px]"
|
|
|
|
|
class="print-hidden relative grid gap-6 xl:h-full xl:min-h-0"
|
|
|
|
|
:class="showInlineFocusSidebar ? 'xl:grid-cols-[minmax(0,1fr)_minmax(0,360px)] 2xl:grid-cols-[minmax(0,1fr)_640px]' : ''"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
v-if="isOverlayFocusSidebar && rightPanelOpen"
|
|
|
|
|
class="fixed inset-0 z-30 bg-stone-900/18 backdrop-blur-[2px]"
|
|
|
|
|
@click="closeRightPanel"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<div class="scrollbar-hide print-target rounded-[28px] border border-white/60 bg-white/45 p-4 shadow-[0_18px_60px_rgba(28,25,23,0.06)] xl:h-full xl:min-h-0 xl:overflow-y-auto xl:pr-3">
|
|
|
|
|
<div v-if="isOverlayFocusSidebar" class="mb-4 flex justify-end">
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="rounded-full border border-stone-200 bg-white px-4 py-2 text-[11px] font-bold tracking-[0.16em] text-stone-700 transition hover:border-stone-400 hover:text-ink"
|
|
|
|
|
@click="openRightPanel"
|
|
|
|
|
>
|
|
|
|
|
OPEN SIDE PANEL
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<PlannerPage
|
|
|
|
|
:date-main="selectedDateDisplay.main"
|
|
|
|
|
:date-weekday="selectedDateDisplay.weekday"
|
|
|
|
|
@@ -1547,141 +1709,169 @@ onMounted(() => {
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<aside class="scrollbar-hide print-hidden rounded-[28px] border border-white/60 bg-white/50 p-3 shadow-[0_18px_60px_rgba(28,25,23,0.06)] xl:h-full xl:min-h-0 xl:overflow-y-auto">
|
|
|
|
|
<div class="flex flex-col gap-4 rounded-[22px] p-2">
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<p class="mb-4 text-[11px] font-bold tracking-[0.22em] text-ink">PREV SNAPSHOT</p>
|
|
|
|
|
<div class="space-y-3">
|
|
|
|
|
<p
|
|
|
|
|
v-for="item in prevSnapshotItems"
|
|
|
|
|
:key="item"
|
|
|
|
|
class="border-b border-stone-200 pb-3 text-[11px] font-semibold tracking-[0.08em] text-stone-700 last:border-b-0 last:pb-0"
|
|
|
|
|
>
|
|
|
|
|
{{ item || ' ' }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<aside
|
|
|
|
|
v-if="showInlineFocusSidebar || rightPanelOpen"
|
|
|
|
|
class="scrollbar-hide print-hidden rounded-[28px] border border-white/60 bg-[#f7f2ea]/95 p-3 shadow-[0_18px_60px_rgba(28,25,23,0.12)]"
|
|
|
|
|
:class="[
|
|
|
|
|
focusSidebarOuterClass,
|
|
|
|
|
showInlineFocusSidebar
|
|
|
|
|
? 'xl:h-full xl:min-h-0 xl:overflow-y-auto'
|
|
|
|
|
: 'fixed inset-y-4 right-4 z-40 w-[min(360px,calc(100vw-2rem))] overflow-y-auto',
|
|
|
|
|
]"
|
|
|
|
|
>
|
|
|
|
|
<div v-if="!showInlineFocusSidebar" class="mb-3 flex items-center justify-between rounded-[18px] border border-stone-200 bg-white/90 px-4 py-3">
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.18em] text-ink">SIDE PANEL</p>
|
|
|
|
|
<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="closeRightPanel"
|
|
|
|
|
>
|
|
|
|
|
CLOSE
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<div class="flex items-start justify-between gap-3">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.22em] text-ink">TASK LABELS</p>
|
|
|
|
|
<p class="mt-2 text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-600">
|
|
|
|
|
ON이면 왼쪽 라벨을 01, 02 형태로 채우고 OFF이면 비워 둡니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="relative h-8 w-16 shrink-0 rounded-full transition-colors duration-300 ease-out"
|
|
|
|
|
:class="areTaskLabelsNumbered(planner) ? 'bg-stone-900' : 'bg-stone-300'"
|
|
|
|
|
@click="areTaskLabelsNumbered(planner) ? clearTaskLabels(planner) : fillTaskLabelsWithNumbers(planner)"
|
|
|
|
|
>
|
|
|
|
|
<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="areTaskLabelsNumbered(planner) ? 'translate-x-8' : 'translate-x-0'"
|
|
|
|
|
<div class="grid gap-4 rounded-[22px] p-2" :class="focusSidebarGridClass">
|
|
|
|
|
<div class="grid gap-4" :class="isWideFocusSidebar ? '' : 'max-w-[360px]'">
|
|
|
|
|
<section class="2xl:w-[280px]">
|
|
|
|
|
<MiniCalendar
|
|
|
|
|
:month-label="monthLabel"
|
|
|
|
|
:year-label="yearLabel"
|
|
|
|
|
:days="calendarDays"
|
|
|
|
|
:selected-key="toKey(selectedDate)"
|
|
|
|
|
:marked-keys="markedDateKeys"
|
|
|
|
|
@shift-month="shiftCalendarMonth"
|
|
|
|
|
@shift-year="shiftCalendarYear"
|
|
|
|
|
@go-today="selectDate(new Date())"
|
|
|
|
|
@select="selectDate"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<p class="mb-4 text-[11px] font-bold tracking-[0.22em] text-ink">READ NEXT</p>
|
|
|
|
|
<div class="space-y-3">
|
|
|
|
|
<p
|
|
|
|
|
v-for="item in readNextItems"
|
|
|
|
|
:key="item"
|
|
|
|
|
class="border-b border-stone-200 pb-3 text-[11px] font-semibold tracking-[0.08em] text-stone-700 last:border-b-0 last:pb-0"
|
|
|
|
|
>
|
|
|
|
|
{{ item || ' ' }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<div class="flex items-start justify-between gap-3">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.22em] text-ink">D-DAY 사용</p>
|
|
|
|
|
<p class="mt-2 text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-600">
|
|
|
|
|
목표 검색과 기간 설정은 GOALS 화면에서 관리하고, 여기서는 현재 날짜에 D-DAY를 보여줄지 여부만 제어합니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<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'"
|
|
|
|
|
: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'"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mt-4 space-y-3">
|
|
|
|
|
<div v-if="plannerGoal" class="rounded-2xl border border-stone-200 bg-white px-4 py-3">
|
|
|
|
|
<p class="text-[10px] font-bold tracking-[0.16em] text-stone-500">현재 목표</p>
|
|
|
|
|
<p class="mt-2 text-sm font-semibold tracking-[0.02em] text-stone-900">{{ plannerGoal.title }}</p>
|
|
|
|
|
<p class="mt-1 text-[11px] font-semibold tracking-[0.06em] text-stone-500">
|
|
|
|
|
목표일 {{ plannerGoal.targetDate }} / 적용 {{ plannerGoal.activeFrom }} ~ {{ plannerGoal.activeUntil }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="plannerGoal" class="rounded-2xl border border-stone-200 bg-[#fbf7f0] px-4 py-4">
|
|
|
|
|
<p class="text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-600">
|
|
|
|
|
이 날짜에는 이미 적용된 목표가 있으므로 토글만으로 표시 여부를 빠르게 조절할 수 있습니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-else class="rounded-2xl border border-dashed border-stone-300 bg-white/70 px-4 py-4">
|
|
|
|
|
<p class="text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-500">
|
|
|
|
|
현재 날짜에 적용된 목표가 없습니다. GOALS 화면에서 표시 기간을 지정하면 여기 토글이 자동으로 활성화됩니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<MiniCalendar
|
|
|
|
|
:month-label="monthLabel"
|
|
|
|
|
:year-label="yearLabel"
|
|
|
|
|
:days="calendarDays"
|
|
|
|
|
:selected-key="toKey(selectedDate)"
|
|
|
|
|
:marked-keys="markedDateKeys"
|
|
|
|
|
@shift-month="shiftCalendarMonth"
|
|
|
|
|
@shift-year="shiftCalendarYear"
|
|
|
|
|
@go-today="selectDate(new Date())"
|
|
|
|
|
@select="selectDate"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<section class="grid grid-cols-2 gap-4">
|
|
|
|
|
<article class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.22em] text-ink">STATS</p>
|
|
|
|
|
<div class="mt-5 space-y-4">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[28px] font-semibold tracking-[-0.05em] text-stone-900">{{ completionRate }}%</p>
|
|
|
|
|
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-500">TASK COMPLETION</p>
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/88 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<div class="flex items-start justify-between gap-3">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.22em] text-ink">TASK LABELS</p>
|
|
|
|
|
<p class="mt-2 text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-600">
|
|
|
|
|
번호가 필요한 날만 빠르게 채우고, 필요 없으면 바로 비울 수 있습니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="relative h-8 w-16 shrink-0 rounded-full transition-colors duration-300 ease-out"
|
|
|
|
|
:class="areTaskLabelsNumbered(planner) ? 'bg-stone-900' : 'bg-stone-300'"
|
|
|
|
|
@click="areTaskLabelsNumbered(planner) ? clearTaskLabels(planner) : fillTaskLabelsWithNumbers(planner)"
|
|
|
|
|
>
|
|
|
|
|
<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="areTaskLabelsNumbered(planner) ? 'translate-x-8' : 'translate-x-0'"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[22px] font-semibold tracking-[-0.04em] text-stone-900">{{ formatTotalTime(planner) }}</p>
|
|
|
|
|
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-500">FOCUSED TIME</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<article class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.22em] text-ink">NEXT DAY</p>
|
|
|
|
|
<div class="mt-5 space-y-3">
|
|
|
|
|
<p class="text-lg font-semibold tracking-[-0.04em] text-stone-900">
|
|
|
|
|
<span>{{ secondaryDateDisplay.main }}</span>
|
|
|
|
|
<span class="ml-1" :class="secondaryDateDisplay.weekdayTone">{{ secondaryDateDisplay.weekday }}</span>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-600">
|
|
|
|
|
내일의 첫 작업은 "{{ secondaryPlanner.tasks[0]?.title || '새 작업 추가' }}" 로 시작합니다.
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/88 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<div class="flex items-start justify-between gap-3">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.22em] text-ink">D-DAY 사용</p>
|
|
|
|
|
<p class="mt-2 text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-600">
|
|
|
|
|
현재 날짜에 적용된 목표가 있을 때만 본문 D-DAY 표시를 켜고 끌 수 있습니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<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'"
|
|
|
|
|
: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'"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mt-4 space-y-3">
|
|
|
|
|
<div v-if="plannerGoal" class="rounded-2xl border border-stone-200 bg-white px-4 py-3">
|
|
|
|
|
<p class="text-[10px] font-bold tracking-[0.16em] text-stone-500">현재 목표</p>
|
|
|
|
|
<p class="mt-2 text-sm font-semibold tracking-[0.02em] text-stone-900">{{ plannerGoal.title }}</p>
|
|
|
|
|
<p class="mt-1 text-[11px] font-semibold tracking-[0.06em] text-stone-500">
|
|
|
|
|
목표일 {{ plannerGoal.targetDate }} / 적용 {{ plannerGoal.activeFrom }} ~ {{ plannerGoal.activeUntil }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="plannerGoal" class="rounded-2xl border border-stone-200 bg-[#fbf7f0] px-4 py-4">
|
|
|
|
|
<p class="text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-600">
|
|
|
|
|
이 날짜에는 이미 적용된 목표가 있으므로 토글만으로 표시 여부를 빠르게 조절할 수 있습니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-else class="rounded-2xl border border-dashed border-stone-300 bg-white/70 px-4 py-4">
|
|
|
|
|
<p class="text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-500">
|
|
|
|
|
현재 날짜에 적용된 목표가 없습니다. GOALS 화면에서 표시 기간을 지정하면 여기 토글이 자동으로 활성화됩니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="grid gap-4" :class="isWideFocusSidebar ? '' : 'max-w-[360px]'">
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<article>
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.22em] text-ink">STATS</p>
|
|
|
|
|
<div class="mt-5 space-y-4">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[28px] font-semibold tracking-[-0.05em] text-stone-900">{{ completionRate }}%</p>
|
|
|
|
|
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-500">TASK COMPLETION</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<p class="text-[22px] font-semibold tracking-[-0.04em] text-stone-900">{{ formatTotalTimeKorean(planner) }}</p>
|
|
|
|
|
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-500">FOCUSED TIME</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]">
|
|
|
|
|
<article>
|
|
|
|
|
<p class="text-[11px] font-bold tracking-[0.22em] text-ink">NEXT DAY</p>
|
|
|
|
|
<div class="mt-5 space-y-3">
|
|
|
|
|
<p class="text-lg font-semibold tracking-[-0.04em] text-stone-900">
|
|
|
|
|
<span>{{ secondaryDateDisplay.main }}</span>
|
|
|
|
|
<span class="ml-1" :class="secondaryDateDisplay.weekdayTone">{{ secondaryDateDisplay.weekday }}</span>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-600">
|
|
|
|
|
내일의 첫 작업은 "{{ secondaryPlanner.tasks.find((task) => task.title.trim())?.title || '새 작업 추가' }}" 로 시작합니다.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]" :class="isWideFocusSidebar ? '2xl:col-span-2' : ''">
|
|
|
|
|
<p class="mb-4 text-[11px] font-bold tracking-[0.22em] text-ink">READ NEXT</p>
|
|
|
|
|
<div class="grid gap-3" :class="isWideFocusSidebar ? 'sm:grid-cols-3 2xl:grid-cols-3' : 'grid-cols-1'">
|
|
|
|
|
<p
|
|
|
|
|
v-for="item in readNextItems"
|
|
|
|
|
:key="item"
|
|
|
|
|
class="rounded-2xl border border-stone-200 bg-[#fbf7f0] px-4 py-4 text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-700"
|
|
|
|
|
>
|
|
|
|
|
{{ item || ' ' }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
</section>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="rounded-[24px] border border-stone-200 bg-white/82 p-5 shadow-[0_12px_36px_rgba(28,25,23,0.05)]" :class="isWideFocusSidebar ? '2xl:col-span-2' : ''">
|
|
|
|
|
<p class="mb-4 text-[11px] font-bold tracking-[0.22em] text-ink">PREV SNAPSHOT</p>
|
|
|
|
|
<div class="grid gap-3" :class="isWideFocusSidebar ? 'sm:grid-cols-3 2xl:grid-cols-3' : 'grid-cols-1'">
|
|
|
|
|
<p
|
|
|
|
|
v-for="item in prevSnapshotItems"
|
|
|
|
|
:key="item"
|
|
|
|
|
class="rounded-2xl border border-stone-200 bg-white px-4 py-4 text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-700"
|
|
|
|
|
>
|
|
|
|
|
{{ item || ' ' }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
</aside>
|
|
|
|
|
</section>
|
|
|
|
|
@@ -1690,9 +1880,10 @@ onMounted(() => {
|
|
|
|
|
v-else-if="screenMode === 'planner'"
|
|
|
|
|
class="scrollbar-hide print-hidden overflow-x-auto rounded-[28px] border border-white/60 bg-white/45 p-4 shadow-[0_18px_60px_rgba(28,25,23,0.06)] sm:p-6 xl:h-full xl:overflow-y-auto"
|
|
|
|
|
>
|
|
|
|
|
<div class="flex min-w-[1260px] gap-6">
|
|
|
|
|
<div class="print-target">
|
|
|
|
|
<div class="mx-auto flex gap-6" :style="spreadCanvasStyle">
|
|
|
|
|
<div class="print-target overflow-hidden" :style="spreadPageFrameStyle">
|
|
|
|
|
<PlannerPage
|
|
|
|
|
:style="spreadPageStyle"
|
|
|
|
|
:date-main="selectedDateDisplay.main"
|
|
|
|
|
:date-weekday="selectedDateDisplay.weekday"
|
|
|
|
|
:date-weekday-tone="selectedDateDisplay.weekdayTone"
|
|
|
|
|
@@ -1713,8 +1904,9 @@ onMounted(() => {
|
|
|
|
|
@update:timetable="updateTimetable(planner, $event)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="print-hidden">
|
|
|
|
|
<div class="print-hidden overflow-hidden" :style="spreadPageFrameStyle">
|
|
|
|
|
<PlannerPage
|
|
|
|
|
:style="spreadPageStyle"
|
|
|
|
|
:date-main="secondaryDateDisplay.main"
|
|
|
|
|
:date-weekday="secondaryDateDisplay.weekday"
|
|
|
|
|
:date-weekday-tone="secondaryDateDisplay.weekdayTone"
|
|
|
|
|
|