ux improvement
This commit is contained in:
		
							parent
							
								
									1464373b0c
								
							
						
					
					
						commit
						0100b7da99
					
				
							
								
								
									
										30
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								index.html
									
									
									
									
									
								
							@ -733,9 +733,9 @@
 | 
				
			|||||||
                            <input type="text" id="numFATs1216" placeholder="0x2">
 | 
					                            <input type="text" id="numFATs1216" placeholder="0x2">
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="input-group">
 | 
					                        <div class="input-group">
 | 
				
			||||||
                            <label for="fatSizeBytes1216">Größe einer FAT <span
 | 
					                            <label for="fatSizeSectors1216">Größe einer FAT <span
 | 
				
			||||||
                                    class="unit-indicator fix-highlight">(Bytes)</span>:</label>
 | 
					                                    class="unit-indicator fix-highlight">(Sektoren)</span>:</label>
 | 
				
			||||||
                            <input type="text" id="fatSizeBytes1216" placeholder="0x4000">
 | 
					                            <input type="text" id="fatSizeSectors1216" placeholder="0x4000">
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="input-group">
 | 
					                        <div class="input-group">
 | 
				
			||||||
                            <label for="maxRootEntries1216">Max. Wurzelverzeichnis-Einträge <span
 | 
					                            <label for="maxRootEntries1216">Max. Wurzelverzeichnis-Einträge <span
 | 
				
			||||||
@ -773,7 +773,7 @@
 | 
				
			|||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="result-item">
 | 
					                        <div class="result-item">
 | 
				
			||||||
                            <span class="result-label" data-formula="numFATs × fatSizeBytes">Größe FAT-Bereich:</span>
 | 
					                            <span class="result-label" data-formula="numFATs × fatSizeSectors * sectorSize">Größe FAT-Bereich:</span>
 | 
				
			||||||
                            <div class="result-value-container">
 | 
					                            <div class="result-value-container">
 | 
				
			||||||
                                <span class="result-value" id="fatSize1216" data-result-formula="">-</span>
 | 
					                                <span class="result-value" id="fatSize1216" data-result-formula="">-</span>
 | 
				
			||||||
                                <button class="copy-btn" onclick="copyToClipboard('fatSize1216')"
 | 
					                                <button class="copy-btn" onclick="copyToClipboard('fatSize1216')"
 | 
				
			||||||
@ -992,9 +992,9 @@
 | 
				
			|||||||
                            <input type="text" id="numFATs32" placeholder="0x2">
 | 
					                            <input type="text" id="numFATs32" placeholder="0x2">
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="input-group">
 | 
					                        <div class="input-group">
 | 
				
			||||||
                            <label for="fatSizeBytes32">Größe einer FAT <span
 | 
					                            <label for="fatSizeSectors32">Größe einer FAT <span
 | 
				
			||||||
                                    class="unit-indicator fix-highlight">(Bytes)</span>:</label>
 | 
					                                    class="unit-indicator fix-highlight">(Bytes)</span>:</label>
 | 
				
			||||||
                            <input type="text" id="fatSizeBytes32" placeholder="0x20000">
 | 
					                            <input type="text" id="fatSizeSectors32" placeholder="0x20000">
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="input-group">
 | 
					                        <div class="input-group">
 | 
				
			||||||
                            <label for="rootDirCluster32">Root Directory Cluster <span
 | 
					                            <label for="rootDirCluster32">Root Directory Cluster <span
 | 
				
			||||||
@ -1032,7 +1032,7 @@
 | 
				
			|||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="result-item">
 | 
					                        <div class="result-item">
 | 
				
			||||||
                            <span class="result-label" data-formula="numFATs × fatSizeBytes">Größe FAT-Bereich:</span>
 | 
					                            <span class="result-label" data-formula="numFATs × fatSizeSectors * sectorSize">Größe FAT-Bereich:</span>
 | 
				
			||||||
                            <div class="result-value-container">
 | 
					                            <div class="result-value-container">
 | 
				
			||||||
                                <span class="result-value" id="fatSize32" data-result-formula="">-</span>
 | 
					                                <span class="result-value" id="fatSize32" data-result-formula="">-</span>
 | 
				
			||||||
                                <button class="copy-btn" onclick="copyToClipboard('fatSize32')"
 | 
					                                <button class="copy-btn" onclick="copyToClipboard('fatSize32')"
 | 
				
			||||||
@ -1416,20 +1416,20 @@
 | 
				
			|||||||
        // Filesystem calculation implementations
 | 
					        // Filesystem calculation implementations
 | 
				
			||||||
        const filesystems = {
 | 
					        const filesystems = {
 | 
				
			||||||
            fat1216: {
 | 
					            fat1216: {
 | 
				
			||||||
                requiredFields: ['reservedSectors1216', 'numFATs1216', 'fatSizeBytes1216', 'maxRootEntries1216', 'partitionSizeInSectors1216', 'clusterSizeSectors1216'],
 | 
					                requiredFields: ['reservedSectors1216', 'numFATs1216', 'fatSizeSectors1216', 'maxRootEntries1216', 'partitionSizeInSectors1216', 'clusterSizeSectors1216'],
 | 
				
			||||||
                calculate: function () {
 | 
					                calculate: function () {
 | 
				
			||||||
                    const baseOffset = parseHex(document.getElementById('baseOffset1216').value);
 | 
					                    const baseOffset = parseHex(document.getElementById('baseOffset1216').value);
 | 
				
			||||||
                    const sectorSize = parseHex(document.getElementById('sectorSize1216').value);
 | 
					                    const sectorSize = parseHex(document.getElementById('sectorSize1216').value);
 | 
				
			||||||
                    const reservedSectors = parseHex(document.getElementById('reservedSectors1216').value);
 | 
					                    const reservedSectors = parseHex(document.getElementById('reservedSectors1216').value);
 | 
				
			||||||
                    const numFATs = parseHex(document.getElementById('numFATs1216').value);
 | 
					                    const numFATs = parseHex(document.getElementById('numFATs1216').value);
 | 
				
			||||||
                    const fatSizeBytes = parseHex(document.getElementById('fatSizeBytes1216').value);
 | 
					                    const fatSizeSectors = parseHex(document.getElementById('fatSizeSectors1216').value);
 | 
				
			||||||
                    const maxRootEntries = parseHex(document.getElementById('maxRootEntries1216').value);
 | 
					                    const maxRootEntries = parseHex(document.getElementById('maxRootEntries1216').value);
 | 
				
			||||||
                    const partitionSizeInSectors = parseHex(document.getElementById('partitionSizeInSectors1216').value);
 | 
					                    const partitionSizeInSectors = parseHex(document.getElementById('partitionSizeInSectors1216').value);
 | 
				
			||||||
                    const clusterSizeSectors = parseHex(document.getElementById('clusterSizeSectors1216').value);
 | 
					                    const clusterSizeSectors = parseHex(document.getElementById('clusterSizeSectors1216').value);
 | 
				
			||||||
                    const clusterNumber = parseHex(document.getElementById('clusterNumber1216').value);
 | 
					                    const clusterNumber = parseHex(document.getElementById('clusterNumber1216').value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    const fatStart = reservedSectors * sectorSize + baseOffset;
 | 
					                    const fatStart = reservedSectors * sectorSize + baseOffset;
 | 
				
			||||||
                    const fatSize = numFATs * fatSizeBytes;
 | 
					                    const fatSize = numFATs * fatSizeSectors * sectorSize;
 | 
				
			||||||
                    const fatEnd = fatStart + fatSize;
 | 
					                    const fatEnd = fatStart + fatSize;
 | 
				
			||||||
                    const rootDirStart = fatEnd;
 | 
					                    const rootDirStart = fatEnd;
 | 
				
			||||||
                    const rootDirSize = maxRootEntries * 0x20;
 | 
					                    const rootDirSize = maxRootEntries * 0x20;
 | 
				
			||||||
@ -1442,7 +1442,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    const calculations = {
 | 
					                    const calculations = {
 | 
				
			||||||
                        fatStart: `0x${reservedSectors.toString(16)} × 0x${sectorSize.toString(16)} + 0x${baseOffset.toString(16)} = 0x${fatStart.toString(16)}`,
 | 
					                        fatStart: `0x${reservedSectors.toString(16)} × 0x${sectorSize.toString(16)} + 0x${baseOffset.toString(16)} = 0x${fatStart.toString(16)}`,
 | 
				
			||||||
                        fatSize: `0x${numFATs.toString(16)} × 0x${fatSizeBytes.toString(16)} = 0x${fatSize.toString(16)}`,
 | 
					                        fatSize: `0x${numFATs.toString(16)} × 0x${fatSizeSectors.toString(16)} * 0x${sectorSize.toString(16)}= 0x${fatSize.toString(16)}`,
 | 
				
			||||||
                        fatEnd: `0x${fatStart.toString(16)} + 0x${fatSize.toString(16)} = 0x${fatEnd.toString(16)}`,
 | 
					                        fatEnd: `0x${fatStart.toString(16)} + 0x${fatSize.toString(16)} = 0x${fatEnd.toString(16)}`,
 | 
				
			||||||
                        rootDirStart: `0x${fatEnd.toString(16)}`,
 | 
					                        rootDirStart: `0x${fatEnd.toString(16)}`,
 | 
				
			||||||
                        rootDirSize: `0x${maxRootEntries.toString(16)} × 0x20 = 0x${rootDirSize.toString(16)}`,
 | 
					                        rootDirSize: `0x${maxRootEntries.toString(16)} × 0x20 = 0x${rootDirSize.toString(16)}`,
 | 
				
			||||||
@ -1460,20 +1460,20 @@
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            fat32: {
 | 
					            fat32: {
 | 
				
			||||||
                requiredFields: ['reservedSectors32', 'numFATs32', 'fatSizeBytes32', 'rootDirCluster32', 'partitionSizeInSectors32', 'clusterSizeSectors32'],
 | 
					                requiredFields: ['reservedSectors32', 'numFATs32', 'fatSizeSectors32', 'rootDirCluster32', 'partitionSizeInSectors32', 'clusterSizeSectors32'],
 | 
				
			||||||
                calculate: function () {
 | 
					                calculate: function () {
 | 
				
			||||||
                    const baseOffset = parseHex(document.getElementById('baseOffset32').value);
 | 
					                    const baseOffset = parseHex(document.getElementById('baseOffset32').value);
 | 
				
			||||||
                    const sectorSize = parseHex(document.getElementById('sectorSize32').value);
 | 
					                    const sectorSize = parseHex(document.getElementById('sectorSize32').value);
 | 
				
			||||||
                    const reservedSectors = parseHex(document.getElementById('reservedSectors32').value);
 | 
					                    const reservedSectors = parseHex(document.getElementById('reservedSectors32').value);
 | 
				
			||||||
                    const numFATs = parseHex(document.getElementById('numFATs32').value);
 | 
					                    const numFATs = parseHex(document.getElementById('numFATs32').value);
 | 
				
			||||||
                    const fatSizeBytes = parseHex(document.getElementById('fatSizeBytes32').value);
 | 
					                    const fatSizeSectors = parseHex(document.getElementById('fatSizeSectors32').value);
 | 
				
			||||||
                    const rootDirCluster = parseHex(document.getElementById('rootDirCluster32').value);
 | 
					                    const rootDirCluster = parseHex(document.getElementById('rootDirCluster32').value);
 | 
				
			||||||
                    const partitionSizeInSectors = parseHex(document.getElementById('partitionSizeInSectors32').value);
 | 
					                    const partitionSizeInSectors = parseHex(document.getElementById('partitionSizeInSectors32').value);
 | 
				
			||||||
                    const clusterSizeSectors = parseHex(document.getElementById('clusterSizeSectors32').value);
 | 
					                    const clusterSizeSectors = parseHex(document.getElementById('clusterSizeSectors32').value);
 | 
				
			||||||
                    const clusterNumber = parseHex(document.getElementById('clusterNumber32').value);
 | 
					                    const clusterNumber = parseHex(document.getElementById('clusterNumber32').value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    const fatStart = reservedSectors * sectorSize + baseOffset;
 | 
					                    const fatStart = reservedSectors * sectorSize + baseOffset;
 | 
				
			||||||
                    const fatSize = numFATs * fatSizeBytes;
 | 
					                    const fatSize = numFATs * fatSizeSectors * sectorSize;
 | 
				
			||||||
                    const fatEnd = fatStart + fatSize;
 | 
					                    const fatEnd = fatStart + fatSize;
 | 
				
			||||||
                    const dataStart = fatEnd;
 | 
					                    const dataStart = fatEnd;
 | 
				
			||||||
                    const partitionSizeBytes = partitionSizeInSectors * sectorSize;
 | 
					                    const partitionSizeBytes = partitionSizeInSectors * sectorSize;
 | 
				
			||||||
@ -1485,7 +1485,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    const calculations = {
 | 
					                    const calculations = {
 | 
				
			||||||
                        fatStart: `0x${reservedSectors.toString(16)} × 0x${sectorSize.toString(16)} + 0x${baseOffset.toString(16)} = 0x${fatStart.toString(16)}`,
 | 
					                        fatStart: `0x${reservedSectors.toString(16)} × 0x${sectorSize.toString(16)} + 0x${baseOffset.toString(16)} = 0x${fatStart.toString(16)}`,
 | 
				
			||||||
                        fatSize: `0x${numFATs.toString(16)} × 0x${fatSizeBytes.toString(16)} = 0x${fatSize.toString(16)}`,
 | 
					                        fatSize: `0x${numFATs.toString(16)} × 0x${fatSizeSectors.toString(16)} * 0x${sectorSize.toString(16)}= 0x${fatSize.toString(16)}`,
 | 
				
			||||||
                        fatEnd: `0x${fatStart.toString(16)} + 0x${fatSize.toString(16)} = 0x${fatEnd.toString(16)}`,
 | 
					                        fatEnd: `0x${fatStart.toString(16)} + 0x${fatSize.toString(16)} = 0x${fatEnd.toString(16)}`,
 | 
				
			||||||
                        dataStart: `0x${fatEnd.toString(16)}`,
 | 
					                        dataStart: `0x${fatEnd.toString(16)}`,
 | 
				
			||||||
                        dataSize: `(0x${partitionSizeInSectors.toString(16)} × 0x${sectorSize.toString(16)}) - (0x${dataStart.toString(16)} - 0x${baseOffset.toString(16)}) = 0x${dataSize.toString(16)}`,
 | 
					                        dataSize: `(0x${partitionSizeInSectors.toString(16)} × 0x${sectorSize.toString(16)}) - (0x${dataStart.toString(16)} - 0x${baseOffset.toString(16)}) = 0x${dataSize.toString(16)}`,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user