|
22 | 22 | let aiFieldConfig = { |
23 | 23 | scope: false, |
24 | 24 | body: false, |
25 | | - footer: false, |
26 | 25 | } |
27 | 26 |
|
28 | 27 | const dispatch = createEventDispatcher() |
|
56 | 55 | <label for="type" class="block text-sm font-medium mb-1">Type</label> |
57 | 56 | <CustomSelect items={commitTypes} selectedValue={commitData.type} on:change={(e) => update('type', e.detail)} placeholder="Select type..." /> |
58 | 57 | </div> |
59 | | - <div class="flex items-center justify-between"> |
| 58 | + <div class="flex items-center justify-between pr-2"> |
60 | 59 | <label for="scope" class="block text-sm font-medium">Scope <span class="text-gray-400">(optional)</span></label> |
61 | 60 | <input type="checkbox" bind:checked={aiFieldConfig.scope} title="Generate AI content for this field" /> |
62 | 61 | </div> |
|
73 | 72 | maxlength="72" |
74 | 73 | /> |
75 | 74 | </div> |
76 | | - <div class="flex items-center justify-between"> |
| 75 | + <div class="flex items-center justify-between pr-2"> |
77 | 76 | <label for="body" class="block text-sm font-medium">Body <span class="text-gray-400">(optional)</span></label> |
78 | 77 | <input type="checkbox" bind:checked={aiFieldConfig.body} title="Generate AI content for this field" /> |
79 | 78 | </div> |
80 | 79 | <textarea id="body" rows="4" class="w-full" value={commitData.body} on:input={(e) => update('body', e.currentTarget.value)} placeholder="Detailed description of changes"></textarea> |
81 | | - <div class="flex items-center justify-between"> |
82 | | - <label for="footer" class="block text-sm font-medium">Footer <span class="text-gray-400">(optional)</span></label> |
83 | | - <input type="checkbox" bind:checked={aiFieldConfig.footer} title="Generate AI content for this field" /> |
| 80 | + <div> |
| 81 | + <label for="footer" class="block text-sm font-medium mb-1">Footer <span class="text-gray-400">(optional)</span></label> |
| 82 | + <textarea id="footer" rows="2" class="w-full" value={commitData.footer} on:input={(e) => update('footer', e.currentTarget.value)} placeholder="e.g., Closes #123, Breaking change info"></textarea> |
84 | 83 | </div> |
85 | | - <textarea id="footer" rows="2" class="w-full" value={commitData.footer} on:input={(e) => update('footer', e.currentTarget.value)} placeholder="e.g., Closes #123, Breaking change info"></textarea> |
86 | 84 | </div> |
87 | 85 |
|
88 | 86 | <style> |
|
118 | 116 | .add-flag-button:hover { |
119 | 117 | background-color: var(--vscode-button-secondaryHoverBackground); |
120 | 118 | } |
| 119 | +
|
| 120 | + input[type='checkbox'] { |
| 121 | + appearance: none; |
| 122 | + -webkit-appearance: none; |
| 123 | + width: 16px; |
| 124 | + height: 16px; |
| 125 | + border: 1px solid var(--vscode-input-border); |
| 126 | + border-radius: 3px; |
| 127 | + background-color: var(--vscode-input-background); |
| 128 | + cursor: pointer; |
| 129 | + position: relative; |
| 130 | + transition: background-color 0.15s ease-in-out; |
| 131 | + } |
| 132 | +
|
| 133 | + input[type='checkbox']:checked { |
| 134 | + background-color: var(--vscode-button-background); |
| 135 | + border-color: var(--vscode-button-background); |
| 136 | + } |
| 137 | +
|
| 138 | + input[type='checkbox']:checked::after { |
| 139 | + content: ''; |
| 140 | + position: absolute; |
| 141 | + top: 2px; |
| 142 | + left: 5px; |
| 143 | + width: 4px; |
| 144 | + height: 8px; |
| 145 | + border: solid var(--vscode-button-foreground); |
| 146 | + border-width: 0 2px 2px 0; |
| 147 | + transform: rotate(45deg); |
| 148 | + } |
| 149 | +
|
| 150 | + input[type='checkbox']:focus { |
| 151 | + outline: 1px solid var(--vscode-focusBorder); |
| 152 | + outline-offset: 1px; |
| 153 | + } |
121 | 154 | </style> |
0 commit comments