]> git.ardis.lu - 4-byte-gen/commitdiff
Simplify UX by removing pausing and status
authorArdis Lu <ardisglu@gmail.com>
Sun, 26 Mar 2023 02:53:01 +0000 (19:53 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sun, 26 Mar 2023 02:53:01 +0000 (19:53 -0700)
index.html

index 9d8a60333c63698b590e53086770c16cbcd0bd6f..db79cd7bc638830f597c1177192c5156d084cf03 100644 (file)
       <div class="actions">
         <button id="parse-functions">Parse functions</button>
         <button id="start-all" disabled>Start all</button>
-        <button id="pause-all" disabled>Pause all</button>
       </div>
     </form>
 
             <th>Optimized Name</th>
             <th>Optimized Selector</th>
             <th>Seed</th>
-            <th>Status</th>
-            <th>Action</th>
           </tr>
         </thead>
         <tbody></tbody>
     const form = document.querySelector('form');
     const parseFunctions = document.querySelector('#parse-functions');
     const startAll = document.querySelector('#start-all');
-    const pauseAll = document.querySelector('#pause-all');
     const outputContainer = document.querySelector('output')
     const outputBody = document.querySelector('tbody');
 
           optimizedName: null,
           optimizedSelector: null,
           seed: 0,
-          status: 'Not started',
-          action: null,
           worker: null
         });
       }
       if (state.size === 0) {
         parseFunctions.disabled = false;
         startAll.disabled = true;
-        pauseAll.disabled = true;
         return;
       }
 
       }
 
       startAll.disabled = false;
-      pauseAll.disabled = false;
       outputContainer.style.display = 'block';
-      status.textContent = 'Press the "START ALL" button to begin finding optimized function names for all functions, or press "START" on individual functions.';
+      status.textContent = 'Press the "START ALL" button to begin finding optimized function names for all functions.';
     }
 
     /* Business logic */
           row.optimizedName = functionName;
           row.optimizedSelector = hash ? hash : null;
           row.seed = counter;
-          row.status = completed ? 'Completed' : 'Searching';
           updateUi(state);
         });
       }
     }
 
-    function handlePauseAll(e) {
-      for (const row of state.values()) {
-        row.worker.terminate();
-        row.status = 'Paused';
-      }
-      updateUi(state);
-    }
-
     /* Wire up the UI to the business logic */
 
     // On button click, call the appropriate handler
       else if (e.submitter === startAll) {
         handleStartAll(e);
       }
-      else if (e.submitter === pauseAll) {
-        handlePauseAll(e);
-      }
     });
   </script>
 
This page took 0.042177 seconds and 4 git commands to generate.