qwen-code/packages/web-shell/client/components/dialogs/ScheduledTasksDialog.module.css

602 lines
11 KiB
CSS

.root {
display: flex;
flex-direction: column;
gap: 16px;
min-width: 0;
}
.intro {
font-size: 13px;
line-height: 1.5;
color: var(--muted-foreground);
}
.toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
}
.count {
font-size: 13px;
font-weight: 600;
color: var(--foreground);
}
.toolbarActions {
display: flex;
align-items: center;
gap: 8px;
}
.primaryButton,
.secondaryButton {
appearance: none;
border-radius: 8px;
padding: 6px 14px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
border: 1px solid var(--border);
transition:
background 0.15s ease,
opacity 0.15s ease;
}
.primaryButton {
background: var(--primary);
color: var(--background);
border-color: var(--primary);
}
.secondaryButton {
background: transparent;
color: var(--foreground);
}
.primaryButton:disabled,
.secondaryButton:disabled {
opacity: 0.55;
cursor: default;
}
.secondaryButton:hover:not(:disabled) {
background: var(--muted);
}
/* ── Create form ─────────────────────────────────────────────── */
/* Create form now lives inside a DialogShell modal, which supplies the panel
chrome (border/background/padding); this class only handles field layout. */
.formFields {
display: flex;
flex-direction: column;
gap: 14px;
}
.field {
display: flex;
flex-direction: column;
gap: 6px;
min-width: 0;
}
.fieldGrow {
flex: 1 1 220px;
}
.fieldLabel {
font-size: 12px;
font-weight: 600;
color: var(--muted-foreground);
}
.required {
color: var(--error-color);
margin-left: 2px;
}
.input,
.textarea,
.select {
width: 100%;
box-sizing: border-box;
border: 1px solid var(--border);
border-radius: 8px;
padding: 8px 10px;
font-size: 13px;
background: var(--background);
color: var(--foreground);
font-family: inherit;
}
.textarea {
resize: vertical;
min-height: 72px;
line-height: 1.5;
}
.promptEditorWrap {
min-width: 0;
}
.promptEditor {
position: relative;
min-width: 0;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--background);
}
.promptEditor:focus-within {
outline: 2px solid var(--primary);
outline-offset: -1px;
}
.promptEditorInput {
min-width: 220px;
flex: 1 1 220px;
}
.promptEditorInput :global(.cm-editor) {
min-height: 120px;
}
.promptEditorInput :global(.cm-scroller) {
min-height: 120px;
}
.promptEditorInput :global(.cm-content) {
padding: 0;
}
.promptEditorContent {
display: flex;
flex: 1 1 auto;
flex-wrap: wrap;
align-content: flex-start;
align-items: flex-start;
gap: 8px;
min-height: 160px;
padding: 12px;
cursor: text;
}
.promptTag {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 30px;
max-width: 100%;
padding: 0 10px;
border: 1px solid var(--border);
border-radius: 8px;
background: color-mix(in srgb, var(--muted) 78%, white 22%);
color: var(--foreground);
}
.promptTagIcon {
display: inline-block;
width: 14px;
height: 14px;
flex: 0 0 auto;
background: currentColor;
mask: var(--composer-tag-icon-url) center / contain no-repeat;
-webkit-mask: var(--composer-tag-icon-url) center / contain no-repeat;
}
.promptTagLabel {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
}
.promptTagRemove {
border: 0;
background: transparent;
color: var(--muted-foreground);
font-size: 18px;
line-height: 1;
cursor: pointer;
}
.promptEditorToolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
padding: 0 12px 12px;
}
.promptEditorAction {
display: inline-flex;
align-items: center;
gap: 6px;
height: 32px;
padding: 0 12px;
border-radius: 999px;
border: 1px solid var(--border);
background: var(--muted);
color: var(--muted-foreground);
cursor: pointer;
transition:
background 0.15s ease,
color 0.15s ease,
border-color 0.15s ease;
}
.promptEditorAction:hover,
.promptEditorAction:focus-visible,
.promptEditorActionActive {
background: color-mix(in srgb, var(--muted) 72%, white 28%);
color: var(--foreground);
border-color: color-mix(in srgb, var(--border) 78%, var(--foreground) 22%);
outline: none;
}
.promptEditorActionIcon {
display: inline-block;
width: 14px;
height: 14px;
flex: 0 0 auto;
background: currentColor;
mask: var(--composer-tag-icon-url) center / contain no-repeat;
-webkit-mask: var(--composer-tag-icon-url) center / contain no-repeat;
}
.promptEditorActionLabel {
font-size: 12px;
font-weight: 500;
}
.promptPicker {
position: absolute;
left: 0;
bottom: 48px;
z-index: 3020;
width: min(360px, calc(100vw - 80px));
border: 1px solid var(--border);
border-radius: 12px;
background: var(--background);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
overflow: hidden;
}
.promptPickerCols {
display: grid;
grid-template-columns: 112px minmax(0, 1fr);
height: min(220px, calc(100vh - 260px));
}
.promptPickerCol {
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
overflow-y: auto;
}
.promptPickerCol:first-child {
border-right: 1px solid var(--border);
}
.promptPickerItem {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 2px;
padding: 10px 12px;
background: transparent;
border: 0;
text-align: left;
color: var(--foreground);
cursor: pointer;
}
.promptPickerItem:hover {
background: var(--muted);
}
.promptPickerLabel {
font-size: 14px;
font-weight: 600;
}
.promptPickerDesc {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
font-size: 12px;
line-height: 1.35;
color: var(--muted-foreground);
}
.input:focus,
.textarea:focus,
.select:focus {
outline: 2px solid var(--primary);
outline-offset: -1px;
}
.scheduleRow {
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: flex-end;
}
.scheduleRow .field {
flex: 0 0 auto;
min-width: 140px;
}
.preview {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
font-size: 13px;
}
.previewLabel {
font-weight: 600;
color: var(--foreground);
}
.previewCron {
font-family: var(--font-mono, monospace);
font-size: 12px;
color: var(--muted-foreground);
background: var(--background);
border: 1px solid var(--border);
border-radius: 6px;
padding: 2px 6px;
}
.previewInvalid {
color: var(--warning-color);
font-size: 13px;
}
.formError,
.loadError {
color: var(--error-color);
font-size: 13px;
line-height: 1.5;
}
.formActions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
/* ── List ────────────────────────────────────────────────────── */
.empty {
padding: 32px 16px;
text-align: center;
color: var(--muted-foreground);
font-size: 13px;
}
.list {
/* One task per row (full width) — narrow grid columns clipped the prompt
* and made descriptions hard to read. */
display: flex;
flex-direction: column;
gap: 12px;
}
.card {
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--background);
min-width: 0;
}
.cardDisabled {
opacity: 0.6;
}
.cardHeader {
display: flex;
align-items: center;
gap: 10px;
}
.cardTitle {
flex: 1 1 auto;
min-width: 0;
font-size: 14px;
font-weight: 600;
color: var(--foreground);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.cardMenu {
display: flex;
align-items: center;
gap: 4px;
flex: 0 0 auto;
}
.iconAction {
appearance: none;
background: transparent;
border: none;
color: var(--muted-foreground);
cursor: pointer;
border-radius: 6px;
width: 26px;
height: 26px;
font-size: 12px;
display: inline-flex;
align-items: center;
justify-content: center;
}
.iconAction:hover:not(:disabled) {
background: var(--muted);
color: var(--foreground);
}
.iconAction:disabled {
opacity: 0.5;
cursor: default;
}
/* Toggle switch */
.toggle {
appearance: none;
flex: 0 0 auto;
position: relative;
width: 36px;
height: 20px;
border-radius: 999px;
border: none;
background: var(--border);
cursor: pointer;
padding: 0;
transition: background 0.15s ease;
}
.toggle:disabled {
cursor: default;
opacity: 0.6;
}
.toggleOn {
background: var(--primary);
}
.toggleKnob {
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #fff;
transition: transform 0.15s ease;
}
.toggleOn .toggleKnob {
transform: translateX(16px);
}
.cardPrompt {
font-size: 12px;
line-height: 1.5;
color: var(--muted-foreground);
display: -webkit-box;
/* Full-width rows give room for more of the prompt before eliding. */
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
white-space: pre-wrap;
word-break: break-word;
}
.cardFooter {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
flex-wrap: wrap;
margin-top: auto;
}
.schedulePill {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12px;
font-weight: 500;
color: var(--foreground);
background: var(--muted);
border-radius: 999px;
padding: 3px 10px;
}
.clockIcon {
font-size: 12px;
color: var(--muted-foreground);
}
.recurringTag {
font-size: 11px;
color: var(--muted-foreground);
}
.countdown {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 11px;
font-weight: 500;
color: var(--primary);
/* Fixed-width digits so the ticking countdown doesn't shift its neighbors. */
font-variant-numeric: tabular-nums;
}
.hourglassIcon {
font-size: 10px;
opacity: 0.85;
}
.lastFired {
font-size: 11px;
color: var(--muted-foreground);
margin-left: auto;
}
/* ── Run history ─────────────────────────────────────────────── */
.runsToggle {
appearance: none;
background: transparent;
border: none;
padding: 0;
font-size: 11px;
font-family: inherit;
color: var(--muted-foreground);
cursor: pointer;
text-decoration: underline;
text-underline-offset: 2px;
}
.runsToggle:hover {
color: var(--foreground);
}
.runsList {
list-style: none;
margin: 0;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--muted);
display: flex;
flex-direction: column;
gap: 4px;
max-height: 160px;
overflow-y: auto;
}
.runsItem {
font-size: 11px;
line-height: 1.4;
color: var(--muted-foreground);
font-variant-numeric: tabular-nums;
}