All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 4m58s
Move Vue app from nginx/vue/ to top-level vue/ with its own Dockerfile, update docker-compose configs and nginx proxy to serve from the new container, and add initial Rust WASM crate (stp_wasm). Also fix .gitignore to exclude Rust target/ directories. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
776 B
JavaScript
37 lines
776 B
JavaScript
import { defineStore } from "pinia";
|
|
import { computed, ref, watch } from "vue";
|
|
import { useHomeDataStore } from "@/stores/homeData";
|
|
|
|
const activity_template = {
|
|
type: "activity",
|
|
name: "nameof",
|
|
createdAt: Date.now(),
|
|
};
|
|
|
|
export const useActivityStore = defineStore("activity", () => {
|
|
const activity = ref([activity_template]);
|
|
|
|
const activityCount = computed(() => activity.value.length);
|
|
|
|
const homeData = useHomeDataStore();
|
|
watch(
|
|
() => homeData.activities,
|
|
(newActivities) => {
|
|
if (newActivities.length > 0) {
|
|
activity.value = newActivities;
|
|
}
|
|
},
|
|
{ immediate: true },
|
|
);
|
|
|
|
async function fetchActivity() {
|
|
await homeData.fetchAll();
|
|
}
|
|
|
|
return {
|
|
activity,
|
|
activityCount,
|
|
fetchActivity,
|
|
};
|
|
});
|