/* ==================== 预设页区域 ==================== */ .preset-panel { display: flex; flex-direction: column; padding: 12px; background-color: #f9f9f9; border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); height: 100%; overflow-y: auto; } .preset-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #eaeaea; flex-shrink: 0; } .preset-select-container { display: flex; align-items: center; flex: 1; margin-right: 8px; } .preset-label { margin-right: 8px; font-size: 14px; font-weight: 600; color: #333; cursor: help; } .preset-select { flex: 1; padding: 6px 10px; border: 1px solid #e0e0e0; border-radius: 4px; background-color: white; font-size: 14px; color: #333; transition: border-color 0.2s; } .preset-select:focus { outline: none; border-color: #4a6cf7; } .preset-actions { display: flex; gap: 4px; flex-shrink: 0; } .preset-action-btn { background: none; border: none; font-size: 16px; cursor: pointer; padding: 6px; border-radius: 4px; transition: background-color 0.2s; color: #555; } .preset-action-btn:hover { background-color: #e8e8e8; color: #333; } .preset-save-dialog, .preset-edit-dialog, .preset-import-dialog { display: flex; flex-direction: column; padding: 12px; background-color: white; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); margin-bottom: 16px; z-index: 100; position: relative; } .preset-save-dialog input, .preset-edit-dialog input { padding: 8px; margin-bottom: 10px; border: 1px solid #e0e0e0; border-radius: 4px; font-size: 14px; transition: border-color 0.2s; } .preset-save-dialog input:focus, .preset-edit-dialog input:focus { outline: none; border-color: #4a6cf7; } .preset-import-dialog textarea { padding: 8px; margin-bottom: 10px; border: 1px solid #e0e0e0; border-radius: 4px; resize: vertical; font-family: monospace; font-size: 13px; min-height: 100px; transition: border-color 0.2s; } .preset-import-dialog textarea:focus { outline: none; border-color: #4a6cf7; } .dialog-buttons { display: flex; justify-content: flex-end; } .dialog-buttons button { margin-left: 8px; padding: 6px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background-color 0.2s; } .dialog-buttons button:first-child { background-color: #4a6cf7; color: white; } .dialog-buttons button:first-child:hover { background-color: #3a5ce5; } .dialog-buttons button:last-child { background-color: #f0f0f0; color: #333; } .dialog-buttons button:last-child:hover { background-color: #e0e0e0; } .preset-parameters-container { border: 1px solid #eaeaea; border-radius: 6px; overflow: hidden; margin-bottom: 16px; flex-shrink: 0; } .parameters-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background-color: #f5f5f5; cursor: pointer; font-size: 14px; font-weight: 600; color: #333; transition: background-color 0.2s; } .parameters-header:hover { background-color: #eaeaea; } .expand-icon { transition: transform 0.3s ease; font-size: 12px; } .expand-icon.expanded { transform: rotate(180deg); } .preset-parameters { display: flex; flex-direction: column; gap: 10px; padding: 12px; animation: fadeIn 0.3s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .parameter-row { display: flex; align-items: center; gap: 8px; } .parameter-label { width: 120px; font-size: 13px; font-weight: 500; color: #555; cursor: help; flex-shrink: 0; } .parameter-slider { flex: 1; height: 4px; border-radius: 2px; background: #e0e0e0; outline: none; -webkit-appearance: none; } .parameter-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #4a6cf7; cursor: pointer; } .parameter-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #4a6cf7; cursor: pointer; border: none; } .parameter-number { width: 60px; padding: 4px 6px; border: 1px solid #e0e0e0; border-radius: 4px; text-align: center; font-size: 13px; transition: border-color 0.2s; flex-shrink: 0; } .parameter-number:focus { outline: none; border-color: #4a6cf7; } .parameter-input { flex: 1; padding: 6px 8px; border: 1px solid #e0e0e0; border-radius: 4px; font-size: 13px; transition: border-color 0.2s; } .parameter-input:focus { outline: none; border-color: #4a6cf7; } .parameter-toggles { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; } .toggle-row { display: flex; justify-content: space-between; align-items: center; } .toggle-label { font-size: 13px; font-weight: 500; color: #555; cursor: help; } .toggle-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: #4a6cf7; } .tooltip { position: fixed; padding: 6px 10px; background-color: #333; color: white; border-radius: 4px; font-size: 12px; max-width: 250px; z-index: 1000; pointer-events: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); line-height: 1.4; } /* 预设组件列表样式 */ .preset-components-section { margin-top: 20px; border-top: 1px solid #e0e0e0; padding-top: 20px; flex: 1; overflow-y: auto; min-height: 0; } .components-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .add-component-btn { background-color: #4a90e2; color: white; border: none; border-radius: 4px; padding: 5px 10px; cursor: pointer; font-size: 14px; } .components-list { width: 100%; min-height: 100px; } .prompt-component-item { background-color: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 4px; margin-bottom: 8px; /* 减小间距 */ padding: 6px 8px; /* 减小内边距 */ transition: background-color 0.2s; width: 100%; box-sizing: border-box; } .prompt-component-item.dragging { background-color: #e9e9e9; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); opacity: 0.5; } .prompt-component-item.disabled { opacity: 0.6; } .prompt-component-item.marker { border-left: 3px solid #4a90e2; } .component-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; /* 减小底部边距 */ } .component-controls { display: flex; align-items: center; gap: 6px; /* 减小间距 */ flex: 1; overflow: hidden; } .drag-handle { cursor: grab; color: #999; font-size: 14px; /* 减小字体 */ padding: 0 2px; /* 减小内边距 */ flex-shrink: 0; } .drag-handle:active { cursor: grabbing; } .toggle-btn { width: 18px; /* 减小尺寸 */ height: 18px; border-radius: 50%; border: 1px solid #ccc; background-color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 10px; /* 减小字体 */ color: #4a90e2; flex-shrink: 0; } .toggle-btn.enabled { background-color: #4a90e2; color: white; border-color: #4a90e2; } .component-name { font-weight: 500; font-size: 13px; /* 减小字体 */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .component-marker-badge { background-color: #4a90e2; color: white; font-size: 10px; /* 减小字体 */ padding: 1px 4px; /* 减小内边距 */ border-radius: 8px; margin-left: 6px; flex-shrink: 0; } .component-actions { display: flex; gap: 4px; /* 减小间距 */ flex-shrink: 0; } .view-btn, .edit-btn, .delete-btn { background: none; border: none; cursor: pointer; font-size: 11px; /* 减小字体 */ padding: 2px 4px; /* 减小内边距 */ border-radius: 3px; white-space: nowrap; } .view-btn { color: #5c6bc0; } .view-btn:hover { background-color: rgba(92, 107, 192, 0.1); } .edit-btn { color: #4a90e2; } .edit-btn:hover { background-color: rgba(74, 144, 226, 0.1); } .delete-btn { color: #e74c3c; } .delete-btn:hover { background-color: rgba(231, 76, 60, 0.1); } .component-footer { display: flex; justify-content: flex-end; margin-top: 2px; /* 减小顶部边距 */ font-size: 11px; /* 减小字体 */ color: #777; } /* 组件编辑/查看对话框 */ .component-edit-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80%; max-width: 800px; max-height: 80vh; background-color: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); z-index: 1000; display: flex; flex-direction: column; } .dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid #e0e0e0; } .dialog-header h3 { margin: 0; font-size: 18px; font-weight: 600; color: #333; } .close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #999; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background-color 0.2s; } .close-btn:hover { background-color: #f0f0f0; color: #333; } .dialog-content { flex: 1; overflow-y: auto; padding: 16px; } .component-textarea { width: 100%; border: 1px solid #ddd; border-radius: 4px; padding: 12px; font-family: monospace; font-size: 14px; line-height: 1.5; resize: none; box-sizing: border-box; min-height: 400px; } .component-textarea:read-only { background-color: #f9f9f9; color: #333; } .dialog-footer { padding: 12px 16px; border-top: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; } .token-count { font-size: 12px; color: #777; } .dialog-buttons { display: flex; gap: 8px; } .dialog-buttons button { padding: 6px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background-color 0.2s; } .dialog-buttons button:first-child { background-color: #4a6cf7; color: white; } .dialog-buttons button:first-child:hover { background-color: #3a5ce5; } .dialog-buttons button:last-child { background-color: #f0f0f0; color: #333; } .dialog-buttons button:last-child:hover { background-color: #e0e0e0; } /* 拖拽相关样式 */ .drag-indicator { height: 4px; background-color: transparent; border-radius: 2px; margin: 4px 0; transition: all 0.2s ease; opacity: 0; } .drag-indicator.visible { background-color: #4a90e2; height: 4px; opacity: 1; box-shadow: 0 0 5px rgba(74, 144, 226, 0.5); }