From 100bd638a6ec9a2c156efc88902c929a66c5627f Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 25 Mar 2023 19:53:01 -0700 Subject: [PATCH] Simplify UX by removing pausing and status --- index.html | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/index.html b/index.html index 9d8a603..db79cd7 100644 --- a/index.html +++ b/index.html @@ -240,7 +240,6 @@
-
@@ -253,8 +252,6 @@ Optimized Name Optimized Selector Seed - Status - Action @@ -275,7 +272,6 @@ 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'); @@ -318,8 +314,6 @@ optimizedName: null, optimizedSelector: null, seed: 0, - status: 'Not started', - action: null, worker: null }); } @@ -341,7 +335,6 @@ if (state.size === 0) { parseFunctions.disabled = false; startAll.disabled = true; - pauseAll.disabled = true; return; } @@ -366,9 +359,8 @@ } 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 */ @@ -409,20 +401,11 @@ 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 @@ -435,9 +418,6 @@ else if (e.submitter === startAll) { handleStartAll(e); } - else if (e.submitter === pauseAll) { - handlePauseAll(e); - } }); -- 2.47.3