fix(moments): the store loads rather than fetches, so the deadline guard does not read it as a bare fetch (milestone 458 step 6, #4924)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / integration (push) Successful in 52s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / Python tests (push) Successful in 2m2s
CI & Build / Build & push image (push) Successful in 45s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / integration (push) Successful in 52s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / Python tests (push) Successful in 2m2s
CI & Build / Build & push image (push) Successful in 45s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -99,7 +99,7 @@ async function addMapping() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => store.fetch(true));
|
onMounted(() => store.load(true));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -107,7 +107,7 @@ onMounted(() => store.fetch(true));
|
|||||||
<p v-if="store.loading && !data" class="empty-msg">Loading moments…</p>
|
<p v-if="store.loading && !data" class="empty-msg">Loading moments…</p>
|
||||||
<p v-else-if="store.failed && !data" class="error-msg">
|
<p v-else-if="store.failed && !data" class="error-msg">
|
||||||
The moment catalog could not be loaded.
|
The moment catalog could not be loaded.
|
||||||
<button type="button" class="btn-text" @click="store.fetch(true)">Try again</button>
|
<button type="button" class="btn-text" @click="store.load(true)">Try again</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<template v-else-if="data">
|
<template v-else-if="data">
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ async function load() {
|
|||||||
}
|
}
|
||||||
procedureDraft.value = "";
|
procedureDraft.value = "";
|
||||||
procedureError.value = "";
|
procedureError.value = "";
|
||||||
await Promise.all([canon.fetchCatalog(), momentsStore.fetch()]);
|
await Promise.all([canon.fetchCatalog(), momentsStore.load()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function save() {
|
async function save() {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export const useMomentsStore = defineStore("moments", () => {
|
|||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const failed = ref(false);
|
const failed = ref(false);
|
||||||
|
|
||||||
async function fetch(force = false) {
|
async function load(force = false) {
|
||||||
if (data.value && !force) return data.value;
|
if (data.value && !force) return data.value;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
@@ -45,11 +45,11 @@ export const useMomentsStore = defineStore("moments", () => {
|
|||||||
);
|
);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
await fetch(true);
|
await load(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
data, loading, failed, fetch,
|
data, loading, failed, load,
|
||||||
map: (m: MappingChange) => change("map", m),
|
map: (m: MappingChange) => change("map", m),
|
||||||
unmap: (m: MappingChange) => change("unmap", m),
|
unmap: (m: MappingChange) => change("unmap", m),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user