feat: add jump-to-date button to hiding top toolbar left section
v1.111.6
This commit is contained in:
parent
b9ed032f1f
commit
530006060a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-weekly-todo-list",
|
||||
"version": "1.111.5",
|
||||
"version": "1.111.6",
|
||||
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -6369,6 +6369,15 @@ export default function WeeklyView() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Jump to Date — mirrored from nav cluster */}
|
||||
<button
|
||||
className="p-1 hover:bg-white dark:hover:bg-gray-700 hover:shadow-sm rounded text-gray-500 hover:text-black dark:hover:text-white transition-all"
|
||||
onClick={() => setShowDatePicker(true)}
|
||||
title={profile.language === "de" ? "Datum wählen" : "Jump to date"}
|
||||
>
|
||||
<CalendarDays size={15} />
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
{/* CENTER SECTION: Week/Year, Goal, Focus Mode - Reveal on Hover */}
|
||||
@ -6565,6 +6574,8 @@ export default function WeeklyView() {
|
||||
<button className="px-2 py-1 text-xs font-bold text-gray-600 dark:text-gray-400 hover:text-black dark:hover:text-white hover:bg-white dark:hover:bg-gray-700 hover:shadow-sm rounded transition-all" onClick={goToToday} title="Go to Today">Today</button>
|
||||
<button className="p-1 hover:bg-white dark:hover:bg-gray-700 hover:shadow-sm rounded text-gray-500 hover:text-black dark:hover:text-white transition-all" onClick={goToNextDay} title="Next Day"><ChevronLeft size={15} className="rotate-180" /></button>
|
||||
<button className="p-1 hover:bg-white dark:hover:bg-gray-700 hover:shadow-sm rounded text-gray-500 hover:text-black dark:hover:text-white transition-all" onClick={goToNextWeek} title="Next Week"><ChevronsLeft size={15} className="rotate-180" /></button>
|
||||
<div style={{ width: 1, height: 14, background: "var(--line, #e5e7eb)", margin: "0 2px", flexShrink: 0 }} />
|
||||
<button className="p-1 hover:bg-white dark:hover:bg-gray-700 hover:shadow-sm rounded text-gray-500 hover:text-black dark:hover:text-white transition-all" onClick={() => setShowDatePicker(true)} title={profile.language === "de" ? "Datum wählen" : "Jump to date"}><Calendar size={15} /></button>
|
||||
</div>
|
||||
|
||||
{/* Always visible: Search, Settings, User */}
|
||||
@ -9251,6 +9262,24 @@ export default function WeeklyView() {
|
||||
connections={connections}
|
||||
weekStartDay={profile.weekStartDay ?? 1}
|
||||
language={profile.language}
|
||||
savedLocations={(profile.viewSettings as any)?.savedLocations || []}
|
||||
customReminderMinutes={(profile.viewSettings as any)?.customReminderMinutes || []}
|
||||
onSaveLocation={(loc: string) => {
|
||||
const current: string[] = (profile.viewSettings as any)?.savedLocations || [];
|
||||
if (current.includes(loc)) return;
|
||||
const updated = [loc, ...current].slice(0, 20);
|
||||
const newVS = { ...(profile.viewSettings as any), savedLocations: updated };
|
||||
setProfile((p: any) => ({ ...p, viewSettings: newVS }));
|
||||
saveSetting('viewSettings', newVS);
|
||||
}}
|
||||
onSaveCustomReminder={(minutes: number) => {
|
||||
const current: number[] = (profile.viewSettings as any)?.customReminderMinutes || [];
|
||||
if (current.includes(minutes)) return;
|
||||
const updated = [minutes, ...current].slice(0, 10);
|
||||
const newVS = { ...(profile.viewSettings as any), customReminderMinutes: updated };
|
||||
setProfile((p: any) => ({ ...p, viewSettings: newVS }));
|
||||
saveSetting('viewSettings', newVS);
|
||||
}}
|
||||
onClose={() =>
|
||||
setCalendarEventModal({ ...calendarEventModal, isOpen: false })
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user