Add inline admin create forms to home page components
Deploy with Docker Compose / deploy (push) Successful in 28s

Lazy-load create forms (Post, Activity, Favorite, Rowing) directly
into their corresponding home components with an admin-only toggle
button, replacing the need to navigate to the admin page.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-04-13 12:13:13 +01:00
co-authored by Claude Sonnet 4.6
parent 66f32cdbd2
commit a911e6ca69
8 changed files with 78 additions and 10 deletions
+4
View File
@@ -4,6 +4,8 @@ import Button from "@/components/input/Button.vue";
import { ref } from "vue";
import { gql } from "@/graphql";
const emit = defineEmits(["done", "cancel"]);
const type = ref("");
const name = ref("");
const link = ref("");
@@ -18,6 +20,7 @@ async function post() {
name.value = "";
link.value = "";
console.log(data.createActivity);
emit("done");
} catch (err) {
console.error(err);
}
@@ -31,5 +34,6 @@ async function post() {
<input type="text" v-model="name" placeholder="Name" @keyup.enter="post" />
<input type="text" v-model="link" placeholder="Link" @keyup.enter="post" />
<Button @click="post">Upload</Button>
<Button @click="emit('cancel')">Cancel</Button>
</div>
</template>