code cleanup

This commit is contained in:
2019-04-20 22:15:25 +02:00
parent f6ab07b346
commit 87d683d4af
6 changed files with 55 additions and 72 deletions

View File

@@ -1,6 +1,6 @@
<template> <template>
<v-app> <v-app dark>
<v-navigation-drawer app v-model="showNav"> <v-navigation-drawer app clipped mini-variant v-model="showNav">
<v-list> <v-list>
<v-list-tile> <v-list-tile>
<v-list-tile-title> <v-list-tile-title>
@@ -24,7 +24,7 @@
</v-list> </v-list>
</v-navigation-drawer> </v-navigation-drawer>
<v-toolbar app> <v-toolbar app clipped-left>
<v-toolbar-side-icon <v-toolbar-side-icon
@click.stop="showNav = !showNav" @click.stop="showNav = !showNav"
></v-toolbar-side-icon> ></v-toolbar-side-icon>

View File

@@ -108,7 +108,8 @@ const mountEndPoint = function(url) {
delete (id) { delete (id) {
return _request.delete(url + id + '/') return _request.delete(url + id + '/')
}, },
options() { return _request.options(url) } options() { return _request.options(url) },
list () { return _request.get( url ) }
} }
} }

View File

@@ -16,6 +16,8 @@
</template> </template>
<script> <script>
import api from '../../api.js'
export default { export default {
data() { data() {
return { return {
@@ -31,15 +33,13 @@ export default {
} }
}, },
created: function() { created: function() {
const vm = this; api.recipes.list()
fetch('http://localhost:8000/api/recips/') .then(data => {
.then((response) => response.json())
.then(function(data) {
for (var idx in data) { for (var idx in data) {
var obj = data[idx]; var obj = data[idx];
vm.content[parseInt(obj.category)].push(obj); this.content[parseInt(obj.category)].push(obj);
} }
}); })
} }
} }
</script> </script>

View File

@@ -1,11 +1,6 @@
<template> <template>
<section> <section>
<v-img <h6 class="title">Home</h6>
:src="require('../assets/logo.svg')"
class="ma-3"
contain
height="200"
></v-img>
</section> </section>
</template> </template>

View File

@@ -1,13 +0,0 @@
<template>
<HelloWorld />
</template>
<script>
import HelloWorld from '../components/HelloWorld'
export default {
components: {
HelloWorld
}
}
</script>

View File

@@ -1 +1 @@
{"status":"done","publicPath":"http://localhost:8080/","chunks":{"main":[{"name":"main.js","publicPath":"http://localhost:8080/main.js","path":"/home/artus/Documents/cookAssistant/frontend/dist/main.js"}]}} {"status":"done","publicPath":"http://localhost:8080/","chunks":{"null":[{"name":"0.js","publicPath":"http://localhost:8080/0.js","path":"/home/artus/Documents/cookAssistant/frontend/dist/0.js"}],"app":[{"name":"app.js","publicPath":"http://localhost:8080/app.js","path":"/home/artus/Documents/cookAssistant/frontend/dist/app.js"},{"name":"app.bb93e89c95f5e29b766f.hot-update.js","publicPath":"http://localhost:8080/app.bb93e89c95f5e29b766f.hot-update.js","path":"/home/artus/Documents/cookAssistant/frontend/dist/app.bb93e89c95f5e29b766f.hot-update.js"}]}}