fix: revert slot options to 15/20/30/60, fix sidebar indicator
- Removed 45m, restored 60m in CellDuration type and all button groups - Slot indicator now correctly highlights the active slot in the sidebar (was broken because 60m users had no matching button when 45 was listed) v1.81.17
This commit is contained in:
parent
6f45140d26
commit
ca67817b7b
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "my-weekly-todo-list",
|
"name": "my-weekly-todo-list",
|
||||||
"version": "1.81.16",
|
"version": "1.81.17",
|
||||||
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
|
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -196,7 +196,7 @@ export interface SomedayList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Time grid configuration options
|
// Time grid configuration options
|
||||||
export type CellDuration = 15 | 20 | 30 | 45 | 60;
|
export type CellDuration = 15 | 20 | 30 | 60;
|
||||||
const DEFAULT_SOMEDAY_SLOT_COUNT = 5;
|
const DEFAULT_SOMEDAY_SLOT_COUNT = 5;
|
||||||
|
|
||||||
const getSomedaySlotCount = (tasks: Task[]) => {
|
const getSomedaySlotCount = (tasks: Task[]) => {
|
||||||
@ -1458,7 +1458,6 @@ export default function WeeklyView() {
|
|||||||
case 15: return 25;
|
case 15: return 25;
|
||||||
case 20: return 30;
|
case 20: return 30;
|
||||||
case 30: return 35;
|
case 30: return 35;
|
||||||
case 45: return 45;
|
|
||||||
case 60: return 50;
|
case 60: return 50;
|
||||||
default: return 50;
|
default: return 50;
|
||||||
}
|
}
|
||||||
@ -5450,7 +5449,7 @@ export default function WeeklyView() {
|
|||||||
{profile.language === "de" ? "Zeitfenster" : "Slot"}
|
{profile.language === "de" ? "Zeitfenster" : "Slot"}
|
||||||
</span>
|
</span>
|
||||||
<div style={{ display: "flex", gap: "4px" }}>
|
<div style={{ display: "flex", gap: "4px" }}>
|
||||||
{(([15, 20, 30, 45] as CellDuration[])).map((d) => (
|
{(([15, 20, 30, 60] as CellDuration[])).map((d) => (
|
||||||
<button key={d} onClick={() => { setCellDuration(d); saveSetting("cellDuration", d); }}
|
<button key={d} onClick={() => { setCellDuration(d); saveSetting("cellDuration", d); }}
|
||||||
style={{ flex: 1, padding: "5px 0", fontSize: "0.8rem", borderRadius: "6px", border: "none", cursor: "pointer", fontWeight: effectiveCellDuration === d ? 700 : 400, background: effectiveCellDuration === d ? (darkMode ? "#374151" : "#333") : (darkMode ? "#1f2937" : "#e5e7eb"), color: effectiveCellDuration === d ? "#fff" : (darkMode ? "#9ca3af" : "#6b7280") }}>
|
style={{ flex: 1, padding: "5px 0", fontSize: "0.8rem", borderRadius: "6px", border: "none", cursor: "pointer", fontWeight: effectiveCellDuration === d ? 700 : 400, background: effectiveCellDuration === d ? (darkMode ? "#374151" : "#333") : (darkMode ? "#1f2937" : "#e5e7eb"), color: effectiveCellDuration === d ? "#fff" : (darkMode ? "#9ca3af" : "#6b7280") }}>
|
||||||
{d}m
|
{d}m
|
||||||
@ -5745,7 +5744,7 @@ export default function WeeklyView() {
|
|||||||
title="Slot Duration"
|
title="Slot Duration"
|
||||||
>
|
>
|
||||||
<Clock size={16} className="text-gray-500 mr-1" />
|
<Clock size={16} className="text-gray-500 mr-1" />
|
||||||
{(([15, 20, 30, 45] as CellDuration[])).map((duration) => (
|
{(([15, 20, 30, 60] as CellDuration[])).map((duration) => (
|
||||||
<button
|
<button
|
||||||
key={duration}
|
key={duration}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@ -5993,7 +5992,7 @@ export default function WeeklyView() {
|
|||||||
{profile.showTimeGrid && (
|
{profile.showTimeGrid && (
|
||||||
<div style={{ padding: "6px 12px", display: "flex", alignItems: "center", gap: "6px" }}>
|
<div style={{ padding: "6px 12px", display: "flex", alignItems: "center", gap: "6px" }}>
|
||||||
<span style={{ fontSize: "12px", color: "#888", marginRight: "4px" }}>{profile.language === "de" ? "Slot" : "Slot"}:</span>
|
<span style={{ fontSize: "12px", color: "#888", marginRight: "4px" }}>{profile.language === "de" ? "Slot" : "Slot"}:</span>
|
||||||
{(([15, 20, 30, 45] as CellDuration[])).map((duration) => (
|
{(([15, 20, 30, 60] as CellDuration[])).map((duration) => (
|
||||||
<button
|
<button
|
||||||
key={duration}
|
key={duration}
|
||||||
onClick={() => { setCellDuration(duration); saveSetting("cellDuration", duration); }}
|
onClick={() => { setCellDuration(duration); saveSetting("cellDuration", duration); }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user