Spaces:
Running
Running
Upload main.js
Browse files
main.js
CHANGED
|
@@ -65,16 +65,8 @@ worker.onmessage = (event) => {
|
|
| 65 |
searchButton.disabled = false; // Ensure button is enabled
|
| 66 |
// Render message with an inline info icon that has an accessible tooltip
|
| 67 |
const sizeMB = formatBytesToMB(payload.size);
|
| 68 |
-
const exactSize = (payload.size / (1024 * 1024)).toFixed(2);
|
| 69 |
-
const tooltip = `Exact download size: ${exactSize} MB. Contains the local model + pre-built index for offline, client-side searches. Estimated download time depends on your connection.`;
|
| 70 |
// Friendly, non-scary message with accessible tooltip
|
| 71 |
-
statusDiv.innerHTML = `Heads‑up: one‑time download <strong>~${Math.round(sizeMB)} MB</strong> to enable fast, private searches in your browser. Runs locally — delete anytime
|
| 72 |
-
` <button class="inline-block ml-2 align-middle text-gray-500" aria-label="More info" title="${tooltip}">` +
|
| 73 |
-
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" style="vertical-align:middle;">
|
| 74 |
-
<circle cx="12" cy="12" r="10"></circle>
|
| 75 |
-
<line x1="12" y1="8" x2="12" y2="12"></line>
|
| 76 |
-
<circle cx="12" cy="16" r="1"></circle>
|
| 77 |
-
</svg></button>`;
|
| 78 |
}
|
| 79 |
} else if (type === 'dataDeleted') {
|
| 80 |
// Show confirmation message briefly and then reload the page so the UI and worker state fully reset
|
|
|
|
| 65 |
searchButton.disabled = false; // Ensure button is enabled
|
| 66 |
// Render message with an inline info icon that has an accessible tooltip
|
| 67 |
const sizeMB = formatBytesToMB(payload.size);
|
|
|
|
|
|
|
| 68 |
// Friendly, non-scary message with accessible tooltip
|
| 69 |
+
statusDiv.innerHTML = `Heads‑up: one‑time download <strong>~${Math.round(sizeMB)} MB</strong> to enable fast, private searches in your browser. Runs locally — delete anytime.`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
}
|
| 71 |
} else if (type === 'dataDeleted') {
|
| 72 |
// Show confirmation message briefly and then reload the page so the UI and worker state fully reset
|