Add decaf webui

This commit is contained in:
Marco Realacci 2022-11-24 14:46:29 +01:00
parent 6b4c9bb531
commit 69c0388954
742 changed files with 608981 additions and 6 deletions

View file

@ -0,0 +1,56 @@
<script>
export default {
data: function() {
return {
errormsg: null,
loading: false,
some_data: null,
}
},
methods: {
async refresh() {
this.loading = true;
this.errormsg = null;
try {
let response = await this.$axios.get("/");
this.some_data = response.data;
} catch (e) {
this.errormsg = e.toString();
}
this.loading = false;
},
},
mounted() {
this.refresh()
}
}
</script>
<template>
<div>
<div
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">Home page</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group me-2">
<button type="button" class="btn btn-sm btn-outline-secondary" @click="refresh">
Refresh
</button>
<button type="button" class="btn btn-sm btn-outline-secondary" @click="exportList">
Export
</button>
</div>
<div class="btn-group me-2">
<button type="button" class="btn btn-sm btn-outline-primary" @click="newItem">
New
</button>
</div>
</div>
</div>
<ErrorMsg v-if="errormsg" :msg="errormsg"></ErrorMsg>
</div>
</template>
<style>
</style>