Cleanup terminology

This commit is contained in:
Dominic Ferrando
2026-07-12 01:43:55 -04:00
parent 80f8962a3b
commit 8b81156f6c
4 changed files with 46 additions and 37 deletions
@@ -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"