feat:将todo的需要改为勾选框
- 为后续的todo完成打勾做准备
This commit is contained in:
@ -61,10 +61,30 @@ export function getPlanCardStyles(): string {
|
|||||||
.plan-step:last-child {
|
.plan-step:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
.step-num {
|
.step-checkbox {
|
||||||
color: var(--vscode-textLink-foreground);
|
display: inline-flex;
|
||||||
font-weight: 500;
|
align-items: center;
|
||||||
margin-right: 6px;
|
justify-content: center;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 8px;
|
||||||
|
border: 2px solid var(--vscode-textLink-foreground);
|
||||||
|
border-radius: 4px;
|
||||||
|
background: transparent;
|
||||||
|
flex-shrink: 0;
|
||||||
|
opacity: 0.6;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
.step-checkbox.completed {
|
||||||
|
background: var(--vscode-textLink-foreground);
|
||||||
|
border-color: var(--vscode-textLink-foreground);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.step-checkbox.completed::after {
|
||||||
|
content: '✓';
|
||||||
|
color: var(--vscode-editor-background);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.plan-actions {
|
.plan-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -151,7 +171,7 @@ export function getPlanCardScript(): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const stepsHtml = (segment.planSteps || []).map((step, i) =>
|
const stepsHtml = (segment.planSteps || []).map((step, i) =>
|
||||||
\`<div class="plan-step"><span class="step-num">\${i + 1}.</span> \${step}</div>\`
|
\`<div class="plan-step"><span class="step-checkbox"></span> \${step}</div>\`
|
||||||
).join('');
|
).join('');
|
||||||
|
|
||||||
// 选项按钮
|
// 选项按钮
|
||||||
@ -231,7 +251,7 @@ export function getPlanCardScript(): string {
|
|||||||
function renderPlanCardStatic(segment, segmentDiv) {
|
function renderPlanCardStatic(segment, segmentDiv) {
|
||||||
segmentDiv.className += ' segment-plan';
|
segmentDiv.className += ' segment-plan';
|
||||||
const stepsHtml = (segment.planSteps || []).map((step, i) =>
|
const stepsHtml = (segment.planSteps || []).map((step, i) =>
|
||||||
\`<div class="plan-step"><span class="step-num">\${i + 1}.</span> \${step}</div>\`
|
\`<div class="plan-step"><span class="step-checkbox"></span> \${step}</div>\`
|
||||||
).join('');
|
).join('');
|
||||||
|
|
||||||
segmentDiv.innerHTML = \`
|
segmentDiv.innerHTML = \`
|
||||||
|
|||||||
Reference in New Issue
Block a user