Extract Vue frontend into separate container and add stp_wasm crate
Deploy with Docker Compose / deploy (push) Successful in 4m58s
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 <[email protected]>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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,
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user