v1.1.0 — 心愿清单
- 新增 wishes 表 (schema v2),含名称/优先级/截止时间/完成状态 - API: GET/POST/PUT/DELETE /api/wishes + PUT /api/wishes/reorder - 侧边栏心愿清单面板:checklist + 新增表单 - 完成勾选 → 删除线;优先级标签(红/黄/灰) - HTML5 原生拖拽排序,松开即保存 - 编辑模式切换:默认隐藏新增/删除按钮
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<title>紫微 · 磁场管理</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
<script>window.__INITIAL_STATS__ = {{ initial_stats | safe }};</script>
|
||||
<script>window.__INITIAL_WISHES__ = {{ initial_wishes | safe }};</script>
|
||||
</head>
|
||||
<body>
|
||||
{% include "icons.html" %}
|
||||
@@ -67,6 +68,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 心愿清单 -->
|
||||
<div class="wishes-panel" id="wishes-panel">
|
||||
<div class="wishes-header">
|
||||
<svg class="icon-sm" style="color:var(--primary)"><use href="#icon-star"/></svg>
|
||||
<span>心愿清单</span>
|
||||
<button class="wishes-add-btn edit-only" id="wishes-add-btn" onclick="showWishForm()">
|
||||
<svg class="icon-sm"><use href="#icon-plus"/></svg>
|
||||
</button>
|
||||
<button class="btn-edit-toggle" onclick="toggleWishesEdit(this)" title="编辑">
|
||||
<svg class="icon-sm"><use href="#icon-pencil"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<!-- 新增表单 -->
|
||||
<div class="wish-form" id="wish-form" style="display:none">
|
||||
<input type="text" id="wish-name" placeholder="心愿名称…" maxlength="50">
|
||||
<div class="wish-form-row">
|
||||
<select id="wish-priority">
|
||||
<option value="高">高优先</option>
|
||||
<option value="中" selected>中优先</option>
|
||||
<option value="低">低优先</option>
|
||||
</select>
|
||||
<input type="date" id="wish-deadline">
|
||||
</div>
|
||||
<div class="wish-form-actions">
|
||||
<button class="btn-wish-save" onclick="addWish()">添加</button>
|
||||
<button class="btn-wish-cancel" onclick="hideWishForm()">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
<div class="wishes-list" id="wishes-list"></div>
|
||||
<div class="wishes-empty" id="wishes-empty">暂无心愿,点击 + 添加</div>
|
||||
</div>
|
||||
|
||||
<!-- 功能入口 -->
|
||||
<nav class="sidebar-nav">
|
||||
<a class="nav-item active" data-panel="daily" onclick="switchPanel('daily')">
|
||||
|
||||
Reference in New Issue
Block a user