|
953 | 953 | <Icon name="stop-filled" size={16} /> |
954 | 954 | </button> |
955 | 955 | {:else} |
956 | | - <button |
957 | | - class="toolbar-btn" |
958 | | - class:active={!pyodideLoading} |
959 | | - onclick={handleRun} |
960 | | - disabled={pyodideLoading} |
961 | | - use:tooltip={{ text: pyodideReady ? "Run" : "Initialize & Run", shortcut: "Ctrl+Enter" }} |
962 | | - aria-label="Run" |
963 | | - > |
964 | | - {#if pyodideLoading} |
965 | | - <span class="spinner"><Icon name="loader" size={16} /></span> |
966 | | - {:else} |
967 | | - <Icon name="play-filled" size={16} /> |
968 | | - {/if} |
969 | | - </button> |
| 956 | + <div class="run-btn-wrapper" class:loading={pyodideLoading}> |
| 957 | + <button |
| 958 | + class="toolbar-btn run-btn" |
| 959 | + class:active={!pyodideLoading} |
| 960 | + class:loading={pyodideLoading} |
| 961 | + onclick={handleRun} |
| 962 | + disabled={pyodideLoading} |
| 963 | + use:tooltip={{ text: pyodideReady ? "Run" : "Initialize & Run", shortcut: "Ctrl+Enter" }} |
| 964 | + aria-label="Run" |
| 965 | + > |
| 966 | + {#if pyodideLoading} |
| 967 | + <span class="loading-status">{statusText}</span> |
| 968 | + <span class="spinner"><Icon name="loader" size={16} /></span> |
| 969 | + {:else} |
| 970 | + <Icon name="play-filled" size={16} /> |
| 971 | + {/if} |
| 972 | + </button> |
| 973 | + </div> |
970 | 974 | {/if} |
971 | 975 | <button |
972 | 976 | class="toolbar-btn" |
|
1410 | 1414 | to { transform: rotate(360deg); } |
1411 | 1415 | } |
1412 | 1416 |
|
| 1417 | + /* Run button wrapper - maintains fixed width in layout, button expands left */ |
| 1418 | + .run-btn-wrapper { |
| 1419 | + position: relative; |
| 1420 | + width: var(--header-height); |
| 1421 | + height: var(--header-height); |
| 1422 | + } |
| 1423 | +
|
| 1424 | + .run-btn-wrapper .run-btn { |
| 1425 | + position: absolute; |
| 1426 | + right: 0; |
| 1427 | + top: 0; |
| 1428 | + } |
| 1429 | +
|
| 1430 | + /* Run button with loading expansion (expands left) */ |
| 1431 | + .run-btn { |
| 1432 | + transition: width var(--transition-normal), padding var(--transition-normal), gap var(--transition-normal); |
| 1433 | + overflow: hidden; |
| 1434 | + } |
| 1435 | +
|
| 1436 | + .run-btn.loading { |
| 1437 | + width: 180px; |
| 1438 | + padding: 0 var(--space-sm); |
| 1439 | + gap: var(--space-xs); |
| 1440 | + justify-content: flex-end; |
| 1441 | + } |
| 1442 | +
|
| 1443 | + .loading-status { |
| 1444 | + font-size: 11px; |
| 1445 | + color: var(--text-muted); |
| 1446 | + white-space: nowrap; |
| 1447 | + overflow: hidden; |
| 1448 | + text-overflow: ellipsis; |
| 1449 | + flex: 1; |
| 1450 | + text-align: left; |
| 1451 | + } |
| 1452 | +
|
1413 | 1453 | /* Panel toggles */ |
1414 | 1454 | .panel-toggles { |
1415 | 1455 | position: fixed; |
|
0 commit comments