Skip to content

Commit 89c0129

Browse files
committed
fix: remove non-working abort button
1 parent e42cd19 commit 89c0129

3 files changed

Lines changed: 15 additions & 19 deletions

File tree

src/ext/action-popup/App.svelte

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,18 @@
347347
disabled = false;
348348
}
349349
350-
async function abortUpdates() {
351-
// sends message to swift side canceling all URLSession tasks
352-
sendNativeMessage({ name: "CANCEL_REQUESTS" });
353-
// timestamp for checking updates happens right before update fetching
354-
// that means when this function runs the timestamp has already been saved
355-
// reloading the window will essentially skip the update check
356-
// since the subsequent popup load will not check for updates
357-
window.location.reload();
358-
}
350+
/**
351+
* Not working due to: https://github.com/quoid/userscripts/issues/276#issuecomment-3507547737
352+
*/
353+
// async function abortUpdates() {
354+
// // sends message to swift side canceling all URLSession tasks
355+
// sendNativeMessage({ name: "CANCEL_REQUESTS" });
356+
// // timestamp for checking updates happens right before update fetching
357+
// // that means when this function runs the timestamp has already been saved
358+
// // reloading the window will essentially skip the update check
359+
// // since the subsequent popup load will not check for updates
360+
// window.location.reload();
361+
// }
359362
360363
/** @type {import("svelte/elements").UIEventHandler<Window>} */
361364
// async function resizeHandler(event) {
@@ -476,7 +479,6 @@
476479
loading={disabled}
477480
closeClick={() => (showUpdates = false)}
478481
showLoaderOnDisabled={true}
479-
abortClick={abortUpdates}
480482
abort={showUpdates}
481483
>
482484
<UpdateView
@@ -568,7 +570,7 @@
568570
</div>
569571
<div class="main {rowColors || ''}" bind:this={main}>
570572
{#if loading}
571-
<Loader abortClick={abortUpdates} {abort} />
573+
<Loader {abort} />
572574
{:else if inactive}
573575
<div class="none">Popup inactive on extension page</div>
574576
{:else if firstGuide}

src/ext/action-popup/Components/View.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
export let closeClick;
1010
export let showLoaderOnDisabled = true;
1111
export let abort = false;
12-
export let abortClick = () => {};
1312
1413
function slide(node, params) {
1514
return {
@@ -28,7 +27,7 @@
2827
</div>
2928
<div class="view__body">
3029
{#if loading && showLoaderOnDisabled}
31-
<Loader backgroundColor="var(--color-bg-primary)" {abortClick} {abort} />
30+
<Loader backgroundColor="var(--color-bg-primary)" {abort} />
3231
{:else}
3332
<slot><div>Slot content is required...</div></slot>
3433
{/if}

src/ext/shared/Components/Loader.svelte

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import iconLoader from "../../shared/img/icon-loader.svg?raw";
44
55
export let abort = false;
6-
export let abortClick = () => {};
76
export let backgroundColor = "var(--color-bg-secondary)";
87
98
/**
@@ -27,11 +26,7 @@
2726
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
2827
{@html iconLoader}
2928
{#if abort}
30-
<div>
31-
Fetching resources, <button class="link" on:click={abortClick}>
32-
cancel request
33-
</button>
34-
</div>
29+
<div>Fetching resources, please wait... (timeout after 30s)</div>
3530
{/if}
3631
</div>
3732

0 commit comments

Comments
 (0)