mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-04 08:40:28 +00:00
change verbage
This commit is contained in:
parent
a1d2a57709
commit
06d3fd9ed2
3 changed files with 5 additions and 6 deletions
|
@ -85,6 +85,6 @@
|
|||
importRef.value.value = "";
|
||||
}
|
||||
|
||||
eventBus.emit(EventTypes.ClearStores);
|
||||
eventBus.emit(EventTypes.InvalidStores);
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -2,7 +2,7 @@ export enum EventTypes {
|
|||
// ClearStores event is used to inform the stores that _all_ the data they are using
|
||||
// is now out of date and they should refresh - This is used when the user makes large
|
||||
// changes to the data such as bulk actions or importing a CSV file
|
||||
ClearStores,
|
||||
InvalidStores,
|
||||
}
|
||||
|
||||
export type EventFn = () => void;
|
||||
|
@ -15,7 +15,7 @@ export interface IEventBus {
|
|||
|
||||
class EventBus implements IEventBus {
|
||||
private listeners: Record<EventTypes, Record<string, EventFn>> = {
|
||||
[EventTypes.ClearStores]: {},
|
||||
[EventTypes.InvalidStores]: {},
|
||||
};
|
||||
|
||||
on(event: EventTypes, fn: EventFn, key: string): void {
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
|
||||
const eventBus = useEventBus();
|
||||
eventBus.on(
|
||||
EventTypes.ClearStores,
|
||||
EventTypes.InvalidStores,
|
||||
() => {
|
||||
labelStore.refresh();
|
||||
locationStore.refreshChildren();
|
||||
|
@ -226,7 +226,7 @@
|
|||
onUnmounted(() => {
|
||||
rmLabelStoreObserver();
|
||||
rmLocationStoreObserver();
|
||||
eventBus.off(EventTypes.ClearStores, "stores");
|
||||
eventBus.off(EventTypes.InvalidStores, "stores");
|
||||
});
|
||||
|
||||
const authStore = useAuthStore();
|
||||
|
@ -238,7 +238,6 @@
|
|||
return;
|
||||
}
|
||||
|
||||
eventBus.emit(EventTypes.ClearStores);
|
||||
navigateTo("/");
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue