diff --git a/Release/database/XNSim.db b/Release/database/XNSim.db index 1e28a18..437e484 100644 Binary files a/Release/database/XNSim.db and b/Release/database/XNSim.db differ diff --git a/XNSimHtml/assets/icons/png/cancel_b.png b/XNSimHtml/assets/icons/png/cancel_b.png deleted file mode 100644 index 5d19dbe..0000000 Binary files a/XNSimHtml/assets/icons/png/cancel_b.png and /dev/null differ diff --git a/XNSimHtml/assets/icons/png/cancel_b.svg b/XNSimHtml/assets/icons/png/cancel_b.svg new file mode 100644 index 0000000..85a5786 --- /dev/null +++ b/XNSimHtml/assets/icons/png/cancel_b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/XNSimHtml/assets/icons/png/complete_b.png b/XNSimHtml/assets/icons/png/complete_b.png deleted file mode 100644 index 70bc05c..0000000 Binary files a/XNSimHtml/assets/icons/png/complete_b.png and /dev/null differ diff --git a/XNSimHtml/assets/icons/png/complete_b.svg b/XNSimHtml/assets/icons/png/complete_b.svg new file mode 100644 index 0000000..06ece07 --- /dev/null +++ b/XNSimHtml/assets/icons/png/complete_b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/XNSimHtml/components/todo-component.js b/XNSimHtml/components/todo-component.js index 906cf0a..a37c0c8 100644 --- a/XNSimHtml/components/todo-component.js +++ b/XNSimHtml/components/todo-component.js @@ -849,6 +849,267 @@ class TodoComponent extends HTMLElement { .show-completed-container:hover { background: #e9ecef; } + .show-all-button { + width: 100%; + padding: 8px 16px; + background-color: #007bff; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 14px; + transition: background-color 0.2s; + } + .show-all-button:hover { + background-color: #0056b3; + } + .show-all-button:active { + background-color: #004085; + } + .project-node { + margin-bottom: 10px; + } + .project-header { + padding: 8px; + background: #e9ecef; + border-radius: 4px; + cursor: pointer; + } + .project-header-content { + display: flex; + align-items: center; + gap: 8px; + } + .project-header:hover { + background: #dee2e6; + } + .expand-icon { + font-size: 12px; + transition: transform 0.2s; + color: #495057; + } + .expand-icon.expanded { + transform: rotate(90deg); + } + .subprojects-container { + margin-left: 20px; + margin-top: 5px; + } + .subproject-node { + padding: 6px 8px; + cursor: pointer; + border-radius: 4px; + display: flex; + justify-content: space-between; + align-items: center; + } + .subproject-node:hover { + background: #e9ecef; + } + .todo-count { + font-size: 0.9em; + color: #6c757d; + } + .todo-item { + background: #fff; + border: 1px solid #e9ecef; + border-radius: 8px; + padding: 15px; + margin-bottom: 15px; + box-shadow: 0 2px 4px rgba(0,0,0,0.05); + } + .todo-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 12px; + padding-bottom: 8px; + border-bottom: 1px solid #e9ecef; + } + .todo-header h3 { + margin: 0; + color: #212529; + font-size: 1.1em; + } + .todo-content { + color: #495057; + } + .todo-info { + margin-bottom: 8px; + font-size: 0.9em; + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 8px; + } + .todo-info .label { + color: #6c757d; + } + .todo-info .value { + color: #212529; + } + .todo-description { + margin-top: 12px; + padding-top: 12px; + border-top: 1px solid #e9ecef; + color: #495057; + font-size: 0.95em; + } + .description-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; + } + .description-actions { + display: flex; + gap: 4px; + } + .description-content { + white-space: pre-wrap; + line-height: 1.5; + max-height: 100px; + overflow: hidden; + transition: max-height 0.3s ease-out; + position: relative; + text-indent: 0; /* 移除缩进 */ + } + .description-content.expanded { + max-height: 2000px; + } + .description-content:not(.expanded) { + max-height: 1.5em; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-indent: 0; /* 移除缩进 */ + } + .description-content::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 40px; + background: linear-gradient(transparent, white); + pointer-events: none; + opacity: 1; + transition: opacity 0.3s ease-out; + } + .description-content.expanded::after { + opacity: 0; + } + .toggle-button { + background: none; + border: none; + cursor: pointer; + padding: 4px; + border-radius: 4px; + transition: all 0.2s; + display: flex; + align-items: center; + justify-content: center; + } + .toggle-button:hover { + background-color: rgba(121, 134, 231, 0.1); + } + .toggle-icon { + transition: transform 0.3s ease; + width: 16px; + height: 16px; + display: inline-block; + } + .toggle-button.expanded .toggle-icon { + transform: rotate(180deg); + } + .status { + display: inline-block; + padding: 4px 8px; + border-radius: 4px; + font-size: 0.9em; + } + .status.completed { + background: #d4edda; + color: #155724; + } + .status.pending { + background: #fff3cd; + color: #856404; + } + .error-message { + color: #721c24; + padding: 10px; + background: #f8d7da; + border-radius: 4px; + margin: 10px; + } + .selected { + background: #cfe2ff !important; + } + .executor-link { + color: #007bff; + text-decoration: none; + cursor: pointer; + } + .executor-link:hover { + text-decoration: underline; + } + .schedule-link { + color: #007bff; + text-decoration: none; + cursor: pointer; + } + .schedule-link:hover { + text-decoration: underline; + } + .add-todo-button { + margin-bottom: 15px; + padding: 8px 16px; + background-color: #7986E7; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 14px; + transition: background-color 0.2s; + width: 100%; + } + .add-todo-button:hover { + background-color: #6875D6; + } + .add-todo-button:active { + background-color: #5A67D8; + } + .todo-actions { + display: flex; + align-items: center; + gap: 8px; + } + .edit-button, .delete-button, .complete-button { + background: none; + border: none; + cursor: pointer; + padding: 4px; + border-radius: 4px; + transition: all 0.2s; + display: flex; + align-items: center; + justify-content: center; + } + .action-icon { + width: 16px; + height: 16px; + object-fit: contain; + } + .edit-button:hover { + background-color: rgba(121, 134, 231, 0.1); + } + .delete-button:hover { + background-color: rgba(220, 53, 69, 0.1); + } + .complete-button:hover { + background-color: rgba(40, 167, 69, 0.1); + } `; const modal = document.createElement('div'); @@ -1387,15 +1648,17 @@ class TodoComponent extends HTMLElement { todoElement.innerHTML = `
+
+ +

${todo.project} - ${todo.subproject} - ${todo.title}

- -