Cleanup terminology
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
import { onMount } from "svelte";
|
||||
import { api } from "$lib/api.js";
|
||||
|
||||
type SyncStatus = "queued" | "active" | "failed" | "fulfilled" | "none";
|
||||
type SyncStatus = "pending" | "processing" | "failed" | "fulfilled";
|
||||
|
||||
const { data } = $props();
|
||||
|
||||
const synchronizer = $state({
|
||||
status: "none" as SyncStatus,
|
||||
status: "none" as SyncStatus | "none",
|
||||
syncingPProductIds: [] as number[],
|
||||
get isInProgress() {
|
||||
return this.status === "active" || this.status === "queued";
|
||||
return this.status === "processing" || this.status === "pending";
|
||||
},
|
||||
poll: async function () {
|
||||
const res = await api.commerce.products.sync.get();
|
||||
@@ -118,7 +118,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<button
|
||||
disabled={synchronizer.status === "active"}
|
||||
disabled={synchronizer.status === "processing"}
|
||||
onclick={() =>
|
||||
synchronizer.sync(pProduct.id)}
|
||||
class="btn"
|
||||
|
||||
Reference in New Issue
Block a user