|
137 | 137 |
|
138 | 138 | function getRunStatus(run) { |
139 | 139 | if (run.ended_at) { |
140 | | - return { text: 'Completed', color: 'bg-green-100 text-green-800' }; |
| 140 | + return { text: 'Completed', style: 'background: var(--ds-status-success-bg); color: var(--ds-status-success-text);' }; |
141 | 141 | } |
142 | | - return { text: 'In Progress', color: 'bg-blue-100 text-blue-800' }; |
| 142 | + return { text: 'In Progress', style: 'background: var(--ds-status-info-bg); color: var(--ds-status-info-text);' }; |
143 | 143 | } |
144 | 144 |
|
145 | 145 | // Keyboard shortcuts |
|
166 | 166 | <div class="flex items-center gap-3"> |
167 | 167 | <button |
168 | 168 | onclick={goBack} |
169 | | - class="p-2 hover:bg-gray-100 rounded cursor-pointer" |
| 169 | + class="p-2 rounded cursor-pointer" |
| 170 | + style="&:hover { background: var(--ds-surface-hovered); }" |
| 171 | + onmouseenter={(e) => e.target.style.background = 'var(--ds-surface-hovered)'} |
| 172 | + onmouseleave={(e) => e.target.style.background = ''} |
170 | 173 | > |
171 | 174 | <ArrowLeft class="w-5 h-5" /> |
172 | 175 | </button> |
|
196 | 199 |
|
197 | 200 | <div class="flex items-center gap-3"> |
198 | 201 | {#if editMode} |
199 | | - <button |
| 202 | + <Button |
| 203 | + variant="primary" |
200 | 204 | onclick={saveEdit} |
201 | | - class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition cursor-pointer" |
202 | 205 | > |
203 | 206 | Save |
204 | | - </button> |
205 | | - <button |
| 207 | + </Button> |
| 208 | + <Button |
| 209 | + variant="default" |
206 | 210 | onclick={toggleEditMode} |
207 | | - class="px-4 py-2 border rounded hover:bg-gray-50 transition cursor-pointer" |
208 | | - style="border-color: var(--ds-border); color: var(--ds-text);" |
209 | 211 | > |
210 | 212 | Cancel |
211 | | - </button> |
| 213 | + </Button> |
212 | 214 | {:else} |
213 | | - <button |
| 215 | + <Button |
| 216 | + variant="default" |
214 | 217 | onclick={toggleEditMode} |
215 | | - class="flex items-center gap-2 px-4 py-2 border rounded hover:bg-gray-50 transition cursor-pointer" |
216 | | - style="border-color: var(--ds-border); color: var(--ds-text);" |
| 218 | + icon={Edit2} |
217 | 219 | > |
218 | | - <Edit2 class="w-4 h-4" /> |
219 | 220 | Edit |
220 | | - </button> |
221 | | - <button |
| 221 | + </Button> |
| 222 | + <Button |
| 223 | + variant="danger" |
222 | 224 | onclick={deleteTemplate} |
223 | | - class="flex items-center gap-2 px-4 py-2 border border-red-300 text-red-600 rounded hover:bg-red-50 transition cursor-pointer" |
| 225 | + icon={Trash2} |
224 | 226 | > |
225 | | - <Trash2 class="w-4 h-4" /> |
226 | 227 | Delete |
227 | | - </button> |
| 228 | + </Button> |
228 | 229 | <Button |
229 | 230 | variant="primary" |
230 | 231 | onclick={executeTemplate} |
|
249 | 250 | <div> |
250 | 251 | <div class="text-sm font-medium mb-1" style="color: var(--ds-text-subtle);">Test Plan</div> |
251 | 252 | {#if testSet} |
252 | | - <a href={`/workspaces/${workspaceId}/tests/sets/${testSet.id}`} class="text-blue-600 hover:text-blue-800 hover:underline"> |
| 253 | + <a href={`/workspaces/${workspaceId}/tests/sets/${testSet.id}`} class="hover:underline" style="color: var(--ds-text-link);"> |
253 | 254 | {testSet.name} |
254 | 255 | </a> |
255 | 256 | {:else} |
|
294 | 295 | <div class="space-y-3"> |
295 | 296 | {#each executions as execution} |
296 | 297 | {@const status = getRunStatus(execution)} |
297 | | - <div class="border rounded p-4 hover:bg-gray-50 transition" style="border-color: var(--ds-border);"> |
| 298 | + <div class="border rounded p-4 transition" style="border-color: var(--ds-border);" onmouseenter={(e) => e.currentTarget.style.background = 'var(--ds-surface-hovered)'} onmouseleave={(e) => e.currentTarget.style.background = ''}> |
298 | 299 | <div class="flex items-center justify-between"> |
299 | 300 | <div class="flex-1"> |
300 | 301 | <div class="font-medium mb-1" style="color: var(--ds-text);"> |
|
308 | 309 | </div> |
309 | 310 | </div> |
310 | 311 | <div class="flex items-center gap-3"> |
311 | | - <span class="px-2 py-1 text-xs font-semibold rounded-full {status.color}"> |
| 312 | + <span class="px-2 py-1 text-xs font-semibold rounded-full" style={status.style}> |
312 | 313 | {status.text} |
313 | 314 | </span> |
314 | 315 | <div class="flex gap-2"> |
315 | 316 | {#if !execution.ended_at} |
316 | 317 | <button |
317 | 318 | onclick={() => continueExecution(execution)} |
318 | | - class="text-green-600 hover:text-green-900 cursor-pointer text-sm font-medium" |
| 319 | + class="cursor-pointer text-sm font-medium" |
| 320 | + style="color: var(--ds-text-success);" |
319 | 321 | > |
320 | 322 | Continue |
321 | 323 | </button> |
322 | 324 | {/if} |
323 | 325 | <button |
324 | 326 | onclick={() => viewRunDetails(execution)} |
325 | | - class="text-blue-600 hover:text-blue-900 cursor-pointer text-sm" |
| 327 | + class="cursor-pointer text-sm" |
| 328 | + style="color: var(--ds-text-link);" |
326 | 329 | > |
327 | 330 | {execution.ended_at ? 'Results' : 'Progress'} |
328 | 331 | </button> |
|
365 | 368 | </div> |
366 | 369 | <div class="flex justify-between"> |
367 | 370 | <span class="text-sm" style="color: var(--ds-text-subtle);">Completed</span> |
368 | | - <span class="text-sm font-medium text-green-600"> |
| 371 | + <span class="text-sm font-medium" style="color: var(--ds-text-success);"> |
369 | 372 | {executions.filter(e => e.ended_at).length} |
370 | 373 | </span> |
371 | 374 | </div> |
372 | 375 | <div class="flex justify-between"> |
373 | 376 | <span class="text-sm" style="color: var(--ds-text-subtle);">In Progress</span> |
374 | | - <span class="text-sm font-medium text-blue-600"> |
| 377 | + <span class="text-sm font-medium" style="color: var(--ds-text-info);"> |
375 | 378 | {executions.filter(e => !e.ended_at).length} |
376 | 379 | </span> |
377 | 380 | </div> |
|
386 | 389 | <div class="space-y-3"> |
387 | 390 | <div> |
388 | 391 | <div class="text-sm font-medium" style="color: var(--ds-text-subtle);">Name</div> |
389 | | - <a href={`/workspaces/${workspaceId}/tests/sets/${testSet.id}`} class="text-sm text-blue-600 hover:text-blue-800 hover:underline"> |
| 392 | + <a href={`/workspaces/${workspaceId}/tests/sets/${testSet.id}`} class="text-sm hover:underline" style="color: var(--ds-text-link);"> |
390 | 393 | {testSet.name} |
391 | 394 | </a> |
392 | 395 | </div> |
|
405 | 408 | </div> |
406 | 409 | {:else} |
407 | 410 | <div class="text-center py-12"> |
408 | | - <div class="text-gray-500">Template not found</div> |
409 | | - <button |
410 | | - onclick={goBack} |
411 | | - class="mt-4 bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 transition cursor-pointer" |
412 | | - > |
413 | | - Back to Templates |
414 | | - </button> |
| 411 | + <div style="color: var(--ds-text-subtle);">Template not found</div> |
| 412 | + <div class="mt-4"> |
| 413 | + <Button |
| 414 | + variant="primary" |
| 415 | + onclick={goBack} |
| 416 | + > |
| 417 | + Back to Templates |
| 418 | + </Button> |
| 419 | + </div> |
415 | 420 | </div> |
416 | 421 | {/if} |
417 | 422 | </div> |
|
0 commit comments