v1.2.0 — 心愿清单四象限

- 数据库 v3: priority → quadrant (重要紧急/重要不紧急/紧急不重要/不紧急不重要)
- 2×2 网格布局,每象限独立列表
- 跨象限拖拽:拖到不同象限自动更新分类
- 旧数据自动迁移:高→重要紧急, 中→重要不紧急, 低→不紧急不重要
This commit is contained in:
mac
2026-06-03 14:44:22 +08:00
parent 1d86d7f736
commit bafac0bc12
5 changed files with 189 additions and 143 deletions

View File

@@ -1081,7 +1081,7 @@ body {
.toast.info { background: var(--primary); color: #FFF; }
/* ═══════════════════════════════════════════
Wishes Panel
Wishes — 四象限
═══════════════════════════════════════════ */
#panel-wishes.editing .edit-only { display: inline-flex; }
@@ -1108,135 +1108,116 @@ body {
box-sizing: border-box;
background: var(--card);
}
.wish-form input[type="text"]:focus,
.wish-form input[type="date"]:focus,
.wish-form select:focus {
.wish-form input:focus, .wish-form select:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(74,108,247,0.08);
}
.wish-form-row {
display: flex;
gap: 8px;
}
.wish-form-row select,
.wish-form-row input { flex: 1; }
.wish-form-actions {
display: flex;
gap: 8px;
}
.wish-form-row { display: flex; gap: 8px; }
.wish-form-row select, .wish-form-row input { flex: 1; }
.wish-form-actions { display: flex; gap: 8px; }
.btn-wish-save {
flex: 1;
padding: 8px;
border: none;
background: var(--primary);
color: #FFF;
border-radius: var(--radius-sm);
font-size: 13px;
font-weight: 500;
cursor: pointer;
font-family: inherit;
flex: 1; padding: 8px; border: none; background: var(--primary); color: #FFF;
border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
cursor: pointer; font-family: inherit;
}
.btn-wish-save:hover { background: var(--primary-dark); }
.btn-wish-cancel {
flex: 1;
padding: 8px;
border: 1.5px solid var(--border);
flex: 1; padding: 8px; border: 1.5px solid var(--border); background: var(--card);
color: var(--text-dim); border-radius: var(--radius-sm); font-size: 13px;
cursor: pointer; font-family: inherit;
}
/* 四象限网格 */
.quad-grid {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
gap: 12px;
min-height: 400px;
}
.quad-cell {
background: var(--card);
color: var(--text-dim);
border-radius: var(--radius-sm);
border: 1.5px solid var(--border);
border-radius: var(--radius);
padding: 12px 14px;
display: flex;
flex-direction: column;
min-height: 180px;
transition: border-color 0.2s, box-shadow 0.2s;
}
.quad-cell.drag-over {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(74,108,247,0.10);
background: var(--primary-light);
}
.quad-title {
font-size: 13px;
cursor: pointer;
font-family: inherit;
font-weight: 600;
color: var(--text);
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.wishes-grid {
max-width: 640px;
}
.wishes-list {
.quad-list {
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
}
.wishes-empty {
font-size: 13px;
color: var(--text-muted);
text-align: center;
padding: 32px 0;
min-height: 40px;
}
.wish-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
gap: 8px;
padding: 7px 10px;
border-radius: var(--radius-sm);
background: var(--card);
border: 0.5px solid var(--border);
box-shadow: var(--shadow);
transition: background 0.15s, box-shadow 0.15s;
background: var(--bg);
transition: opacity 0.15s, box-shadow 0.15s;
}
.wish-item:hover { box-shadow: var(--shadow-hover); }
.wish-item.dragging { opacity: 0.4; }
.wish-item:hover { box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.wish-item.dragging { opacity: 0.3; }
.wish-item.drag-over {
background: var(--primary-light);
box-shadow: inset 0 0 0 2px var(--primary);
background: var(--card);
}
.wish-drag-handle {
color: var(--text-muted);
cursor: grab;
flex-shrink: 0;
display: flex;
align-items: center;
color: var(--text-muted); cursor: grab; flex-shrink: 0;
display: flex; align-items: center;
}
.wish-drag-handle:active { cursor: grabbing; }
.wish-check {
width: 16px;
height: 16px;
accent-color: var(--success);
flex-shrink: 0;
cursor: pointer;
width: 15px; height: 15px; accent-color: var(--success);
flex-shrink: 0; cursor: pointer;
}
.wish-name {
flex: 1;
font-size: 14px;
color: var(--text);
min-width: 0;
word-break: break-all;
flex: 1; font-size: 13px; color: var(--text); min-width: 0;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wish-item.done .wish-name {
text-decoration: line-through;
color: var(--text-muted);
}
.wish-pri {
font-size: 11px;
font-weight: 600;
padding: 2px 8px;
border-radius: 10px;
white-space: nowrap;
flex-shrink: 0;
}
.wish-pri.pri-高 { background: var(--danger-light); color: var(--danger); }
.wish-pri.pri-中 { background: var(--warning-light); color: #D97706; }
.wish-pri.pri-低 { background: var(--bg); color: var(--text-muted); }
.wish-item.done .wish-name { text-decoration: line-through; color: var(--text-muted); }
.wish-deadline {
font-size: 12px;
color: var(--text-dim);
white-space: nowrap;
flex-shrink: 0;
font-size: 11px; color: var(--text-dim); white-space: nowrap; flex-shrink: 0;
}
.wish-del {
display: none;
.wish-del { display: none; }
.wish-del .icon-xs { width: 13px; height: 13px; }
.wishes-empty {
font-size: 13px; color: var(--text-muted); text-align: center; padding: 32px 0;
}
@media (max-width: 900px) {
.quad-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
}
.wish-del .icon-xs { width: 14px; height: 14px; }
/* ═══════════════════════════════════════════
SVG icons helpers