Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions gui/views/skeleton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script setup>
import { ref, inject } from "vue";
let name = ref("skeleton");
let description = ref("skeleton description");
let sampleVariable = ref("");
const $api = inject("$api");
function testApi(){
// Sample API request
$api.get("/api/v2/health").then((response) => {
console.log('Woohoo, this page can talk to the API!');
}).catch((error) => {
console.error(error);
});
}
function sampleFunction(){
sampleVariable.value = "You clicked the button!";
}
</script>

<template lang="pug">
h2 {{ name }}
p {{ description }}
button.button.fancy-button.is-fullwidth(type="button" @click="testApi()") Test API
button.button.fancy-button.is-fullwidth(type="button" @click="sampleFunction()") Click Me
p {{ sampleVariable }}
</template>
13 changes: 13 additions & 0 deletions stores/sampleSkeletonStore.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineStore } from "pinia";

export const useSampleSkeletonStore = defineStore({
id: "skeleton",
state: () => ({
sampleStoreVariable: "Original Store Variable"
}),
actions: {
changeStoreVariable(){
this.sampleStoreVariable = "Store variable changed!";
},
},
});
48 changes: 0 additions & 48 deletions templates/skeleton.html

This file was deleted.