Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e296e59e6 | ||
|
|
3f1becd374 | ||
|
|
b5d7720e52 | ||
|
|
caec0196bb | ||
|
|
d1404765d2 |
@@ -427,7 +427,20 @@ def api_calendar_sync_all():
|
|||||||
summary = (evt.get('summary') or '').strip()
|
summary = (evt.get('summary') or '').strip()
|
||||||
if not summary:
|
if not summary:
|
||||||
continue
|
continue
|
||||||
text = f"【{evt['time']}】{summary}" if evt.get('time') else summary
|
date_str = evt.get('date', '')
|
||||||
|
if date_str:
|
||||||
|
try:
|
||||||
|
parts = date_str.split('-')
|
||||||
|
date_label = f"{int(parts[1])}月{int(parts[2])}日"
|
||||||
|
except:
|
||||||
|
date_label = date_str
|
||||||
|
else:
|
||||||
|
date_label = ''
|
||||||
|
time_str = evt.get('time', '')
|
||||||
|
prefix = f"【{date_label} {time_str}】" if date_label and time_str else \
|
||||||
|
(f"【{date_label}】" if date_label else \
|
||||||
|
(f"【{time_str}】" if time_str else ''))
|
||||||
|
text = f"{prefix}{summary}" if prefix else summary
|
||||||
loc = evt.get('location', '')
|
loc = evt.get('location', '')
|
||||||
if loc:
|
if loc:
|
||||||
text += f" @{loc}"
|
text += f" @{loc}"
|
||||||
|
|||||||
+4
-2
@@ -458,10 +458,12 @@
|
|||||||
html += '<div class="sync-day">';
|
html += '<div class="sync-day">';
|
||||||
html += '<div class="sync-day-header"><span>' + day.date + '</span></div>';
|
html += '<div class="sync-day-header"><span>' + day.date + '</span></div>';
|
||||||
day.events.forEach(function(e) {
|
day.events.forEach(function(e) {
|
||||||
var timeStr = e.time ? ' (' + e.time + ')' : '';
|
var timeStr = e.time ? e.time : '';
|
||||||
|
var dateStr = e.date || '';
|
||||||
html += '<div class="sync-event">' +
|
html += '<div class="sync-event">' +
|
||||||
'<span class="sync-event-icon">📌</span>' +
|
'<span class="sync-event-icon">📌</span>' +
|
||||||
'<span class="sync-event-text">' + esc(e.summary) + '<span class="sync-event-time">' + esc(timeStr) + '</span></span>' +
|
'<span class="sync-event-text">' + esc(e.summary) + '</span>' +
|
||||||
|
'<span class="sync-event-meta">' + esc(dateStr) + (timeStr ? ' ' + esc(timeStr) : '') + '</span>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
});
|
});
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|||||||
+10
-19
@@ -833,7 +833,6 @@ body {
|
|||||||
|
|
||||||
/* 编辑模式下才显示的元素 */
|
/* 编辑模式下才显示的元素 */
|
||||||
.edit-only { display: flex; }
|
.edit-only { display: flex; }
|
||||||
.btn-edit-toggle:not(#study-edit-toggle) { display: none; }
|
|
||||||
|
|
||||||
/* 默认隐藏删除按钮 */
|
/* 默认隐藏删除按钮 */
|
||||||
.btn-del { display: none; }
|
.btn-del { display: none; }
|
||||||
@@ -1029,7 +1028,7 @@ body {
|
|||||||
gap: 5px;
|
gap: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 9px;
|
padding: 9px;
|
||||||
margin-top: auto;
|
margin-top: 12px;
|
||||||
border: 1.5px dashed var(--primary);
|
border: 1.5px dashed var(--primary);
|
||||||
background: var(--primary-light);
|
background: var(--primary-light);
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
@@ -1461,7 +1460,7 @@ body {
|
|||||||
.sync-event + .sync-event { border-top: 1px solid var(--bg); }
|
.sync-event + .sync-event { border-top: 1px solid var(--bg); }
|
||||||
.sync-event-icon { flex-shrink: 0; }
|
.sync-event-icon { flex-shrink: 0; }
|
||||||
.sync-event-text { flex: 1; }
|
.sync-event-text { flex: 1; }
|
||||||
.sync-event-time { font-size: 11px; color: var(--text-muted); margin-left: 6px; }
|
.sync-event-meta { font-size: 11px; color: var(--text-muted); }
|
||||||
.sync-modal-footer {
|
.sync-modal-footer {
|
||||||
padding: 12px 20px;
|
padding: 12px 20px;
|
||||||
border-top: 1px solid var(--border);
|
border-top: 1px solid var(--border);
|
||||||
@@ -1783,28 +1782,20 @@ body {
|
|||||||
.quad-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
|
.quad-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 勤学打卡卡片 - 3×3网格 */
|
/* 勤学打卡卡片 - 单行样式 */
|
||||||
#study-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
|
#study-cards { display: flex; flex-direction: column; gap: 8px; }
|
||||||
.study-card { position:relative; display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 12px 14px; border:1px solid var(--border); border-radius:var(--radius); background:var(--card); transition:all 0.2s; text-align:center; }
|
.study-card { position:relative; display:flex; align-items:center; gap:12px; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--card); transition:all 0.15s; }
|
||||||
.study-card:hover { border-color:var(--primary); box-shadow:var(--shadow); }
|
.study-card:hover { border-color:var(--primary); box-shadow:var(--shadow); }
|
||||||
.study-card.checked { border-color:var(--success); background:var(--success-light); }
|
.study-card.checked { border-color:var(--success); background:var(--success-light); }
|
||||||
.study-card-info { display:flex; flex-direction:column; align-items:center; gap:6px; flex:1; }
|
.study-card-info { display:flex; align-items:center; gap:8px; flex:1; }
|
||||||
.study-card-name { font-size:13px; color:var(--text); font-weight:500; line-height:1.4; min-height:36px; display:flex; align-items:center; }
|
.study-card-name { font-size:13px; color:var(--text); font-weight:500; }
|
||||||
.study-card-count { font-size:24px; color:var(--text-muted); font-weight:600; background:var(--bg); border-radius:50%; width:40px; height:40px; display:flex; align-items:center; justify-content:center; }
|
.study-card-count { font-size:12px; color:var(--text-muted); font-weight:600; background:var(--bg); border-radius:50%; width:24px; height:24px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
|
||||||
.study-card.checked .study-card-count { background:var(--success); color:#FFF; }
|
.study-card.checked .study-card-count { background:var(--success); color:#FFF; }
|
||||||
.study-card-btn { padding:5px 14px; border:1px solid var(--primary); border-radius:var(--radius-sm); background:transparent; color:var(--primary); font-size:12px; font-weight:500; cursor:pointer; transition:all 0.15s; font-family:inherit; }
|
.study-card-btn { padding:5px 12px; border:1px solid var(--primary); border-radius:var(--radius-sm); background:transparent; color:var(--primary); font-size:12px; font-weight:500; cursor:pointer; transition:all 0.15s; font-family:inherit; white-space:nowrap; }
|
||||||
.study-card-btn:hover { background:var(--primary); color:#FFF; }
|
.study-card-btn:hover { background:var(--primary); color:#FFF; }
|
||||||
.study-card-btn.done { background:var(--success-light); color:var(--success); border-color:var(--success); cursor:default; }
|
.study-card-btn.done { background:var(--success-light); color:var(--success); border-color:var(--success); cursor:default; }
|
||||||
.study-card-del { display:none; }
|
.study-card-del { display:none; }
|
||||||
#panel-daily.editing-study .study-card-del { display:flex; align-items:center; justify-content:center; position:absolute; top:6px; right:6px; border:none; background:var(--danger-light); color:var(--danger); cursor:pointer; font-size:14px; width:22px; height:22px; border-radius:50%; line-height:1; }
|
#panel-daily.editing-study .study-card-del { display:flex; align-items:center; justify-content:center; position:absolute; top:50%; transform:translateY(-50%); right:54px; border:none; background:var(--danger-light); color:var(--danger); cursor:pointer; font-size:14px; width:22px; height:22px; border-radius:50%; line-height:1; }
|
||||||
#panel-daily.editing-study .study-card-del:hover { background:var(--danger); color:#FFF; }
|
#panel-daily.editing-study .study-card-del:hover { background:var(--danger); color:#FFF; }
|
||||||
.study-card.checked { border-color:var(--success); background:var(--success-light); }
|
|
||||||
.study-card-info { display:flex; flex-direction:column; align-items:center; gap:4px; }
|
|
||||||
.study-card-name { font-size:12px; color:var(--text); font-weight:500; line-height:1.3; }
|
|
||||||
.study-card-count { font-size:18px; color:var(--text-muted); font-weight:700; background:var(--bg); border-radius:50%; width:32px; height:32px; display:flex; align-items:center; justify-content:center; }
|
|
||||||
.study-card.checked .study-card-count { background:var(--success); color:#FFF; }
|
|
||||||
.study-card-btn { padding:5px 12px; border:1px solid var(--primary); border-radius:var(--radius-sm); background:transparent; color:var(--primary); font-size:12px; font-weight:500; cursor:pointer; transition:all 0.15s; font-family:inherit; }
|
|
||||||
.study-card-btn:hover { background:var(--primary); color:#FFF; }
|
|
||||||
.study-card-btn.done { background:var(--success-light); color:var(--success); border-color:var(--success); cursor:default; }
|
|
||||||
.edit-only-study { display: none; }
|
.edit-only-study { display: none; }
|
||||||
#panel-daily.editing-study .edit-only-study { display: flex; }
|
#panel-daily.editing-study .edit-only-study { display: flex; }
|
||||||
|
|||||||
Reference in New Issue
Block a user