|
7 | 7 | let sequenceNumber = 101; |
8 | 8 | let driveNumber = 2; |
9 | 9 | let prefix = "1"; |
| 10 | + let exportMode: "cues-and-timecode" | "cues-only" = "cues-and-timecode"; |
10 | 11 | let isDragOver = false; |
11 | 12 | let isProcessing = false; |
12 | 13 | let processingStatus = ""; |
|
126 | 127 | const xmlContent = generateMacroXML({ repeatedSequences, uniqueSequences, filename }); |
127 | 128 | downloadContentWithName(xmlContent, `${filename}_macro.xml`); |
128 | 129 |
|
129 | | - const timecodeContent = generateTimecodeXML({ repeatedSequences, uniqueSequences, filename }); |
130 | | - downloadContentWithName(timecodeContent, `${filename}_timecode.xml`); |
| 130 | + if (exportMode === "cues-and-timecode") { |
| 131 | + const timecodeContent = generateTimecodeXML({ repeatedSequences, uniqueSequences, filename }); |
| 132 | + downloadContentWithName(timecodeContent, `${filename}_timecode.xml`); |
| 133 | + } |
131 | 134 |
|
132 | 135 | processingStatus = "✅ Files generated successfully!"; |
133 | 136 | setTimeout(() => { |
|
237 | 240 | }, |
238 | 241 | ]; |
239 | 242 | }), |
240 | | - /// Timecode Import |
241 | | - { |
242 | | - "@_Command": `Drive ${driveNumber}`, |
243 | | - "@_Wait": "0.10", |
244 | | - }, |
245 | | - { |
246 | | - "@_Command": `import Timecode "${filename}_timecode"`, |
247 | | - "@_Wait": "0.10", |
248 | | - }, |
| 243 | + /// Timecode Import (only if exportMode is cues-and-timecode) |
| 244 | + ...(exportMode === "cues-and-timecode" |
| 245 | + ? [ |
| 246 | + { |
| 247 | + "@_Command": `Drive ${driveNumber}`, |
| 248 | + "@_Wait": "0.10", |
| 249 | + }, |
| 250 | + { |
| 251 | + "@_Command": `import Timecode "${filename}_timecode"`, |
| 252 | + "@_Wait": "0.10", |
| 253 | + }, |
| 254 | + ] |
| 255 | + : []), |
249 | 256 | ], |
250 | 257 | }, |
251 | 258 | }, |
|
450 | 457 | <input id="prefix" type="text" bind:value={prefix} class="input" /> |
451 | 458 | </div> |
452 | 459 |
|
453 | | - <div class="input-group"> |
| 460 | + <div class="input-group" class:disabled={exportMode === "cues-only"}> |
454 | 461 | <label for="drive-number" class="label"> |
455 | 462 | <span class="label-text">Drive Number</span> |
456 | 463 | <span class="label-hint">Drive to use for import (1-8)</span> |
457 | 464 | </label> |
458 | | - <input id="drive-number" type="number" min="1" max="8" step="1" bind:value={driveNumber} class="input" /> |
| 465 | + <input id="drive-number" type="number" min="1" max="8" step="1" bind:value={driveNumber} class="input" disabled={exportMode === "cues-only"} /> |
| 466 | + </div> |
| 467 | + </div> |
| 468 | + |
| 469 | + <div class="export-mode-section"> |
| 470 | + <div class="label"> |
| 471 | + <span class="label-text">Export Mode</span> |
| 472 | + </div> |
| 473 | + <div class="radio-group"> |
| 474 | + <label class="radio-label"> |
| 475 | + <input type="radio" bind:group={exportMode} value="cues-and-timecode" class="radio-input" /> |
| 476 | + <span class="radio-text">Cues & Timecode</span> |
| 477 | + </label> |
| 478 | + <label class="radio-label"> |
| 479 | + <input type="radio" bind:group={exportMode} value="cues-only" class="radio-input" /> |
| 480 | + <span class="radio-text">Cues Only</span> |
| 481 | + </label> |
459 | 482 | </div> |
460 | 483 | </div> |
461 | 484 | </div> |
|
773 | 796 | flex-shrink: 0; |
774 | 797 | } |
775 | 798 |
|
| 799 | + .export-mode-section { |
| 800 | + margin-top: 1.5rem; |
| 801 | + } |
| 802 | +
|
| 803 | + .radio-group { |
| 804 | + display: grid; |
| 805 | + grid-template-columns: repeat(2, 1fr); |
| 806 | + gap: 1rem; |
| 807 | + margin-top: 0.75rem; |
| 808 | + } |
| 809 | +
|
| 810 | + .radio-label { |
| 811 | + display: flex; |
| 812 | + align-items: center; |
| 813 | + gap: 0.5rem; |
| 814 | + padding: 0.75rem 1rem; |
| 815 | + border: 2px solid var(--border-light); |
| 816 | + border-radius: 8px; |
| 817 | + cursor: pointer; |
| 818 | + transition: all 0.2s ease; |
| 819 | + background: var(--upload-bg); |
| 820 | + } |
| 821 | +
|
| 822 | + .radio-label:hover { |
| 823 | + border-color: var(--accent-blue); |
| 824 | + background: var(--upload-hover); |
| 825 | + } |
| 826 | +
|
| 827 | + .radio-input { |
| 828 | + width: 18px; |
| 829 | + height: 18px; |
| 830 | + cursor: pointer; |
| 831 | + accent-color: var(--accent-blue); |
| 832 | + } |
| 833 | +
|
| 834 | + .radio-text { |
| 835 | + color: var(--text-primary); |
| 836 | + font-size: 0.95rem; |
| 837 | + font-weight: 500; |
| 838 | + } |
| 839 | +
|
| 840 | + .radio-label:has(.radio-input:checked) { |
| 841 | + border-color: var(--accent-blue); |
| 842 | + background: var(--upload-hover); |
| 843 | + box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); |
| 844 | + } |
| 845 | +
|
776 | 846 | .settings-grid { |
777 | 847 | display: grid; |
778 | 848 | grid-template-columns: repeat(3, minmax(0, 1fr)); |
|
784 | 854 | flex-direction: column; |
785 | 855 | } |
786 | 856 |
|
| 857 | + .input-group.disabled { |
| 858 | + opacity: 0.5; |
| 859 | + pointer-events: none; |
| 860 | + } |
| 861 | +
|
787 | 862 | .label { |
788 | 863 | margin-bottom: 0.5rem; |
789 | 864 | display: block; |
|
908 | 983 | padding: 1.5rem; |
909 | 984 | } |
910 | 985 |
|
| 986 | + .radio-group { |
| 987 | + grid-template-columns: 1fr; |
| 988 | + } |
| 989 | +
|
911 | 990 | .settings-grid { |
912 | 991 | grid-template-columns: 1fr; |
913 | 992 | gap: 1.5rem; |
|
0 commit comments