Dodanie powiadomenia

This commit is contained in:
pawlaczyk 2019-01-05 21:56:38 +01:00
parent 73b8e5fc3d
commit 8b19247175
3 changed files with 16 additions and 10 deletions

View File

@ -1,8 +1,10 @@
<template>
<nav>
<v-snackbar v-model="snackbar" :timeout="4000" top color="success">
<span>Awesome! You added a new project</span>
<v-btn flat color="white" @click="snackbar = false">Close</v-btn>
<v-snackbar v-model="snackbar" :timeout="4000" top color="primary success-text">
<span>Dodano nową kartę do bazy!</span>
<v-btn flat color="white" @click="snackbar = false">
<v-icon>clear</v-icon>
</v-btn>
</v-snackbar>
<v-toolbar flat app>
@ -49,7 +51,7 @@
<p class="white--text mt-3 subheading">Edżentelmeni</p>
</v-flex>
<v-flex class="mb-3">
<Popup @projectAdded="snackbar = true"/>
<Popup @cardAdded="snackbar = true"/>
</v-flex>
</v-layout>

View File

@ -9,6 +9,7 @@
</v-card-title>
<v-card-text>
<v-form class="px-3" ref="form">
<v-select
:items="['pytanie', 'odpowiedź']"
label="Typ karty*"
@ -20,10 +21,11 @@
<v-textarea label="Treść*" v-model="cardText" prepend-icon="edit" :rules="inputRules"></v-textarea>
<v-spacer></v-spacer>
<v-btn flat class="success mx-0 mt-3" @click="submit" :loading="loading">Add Project</v-btn>
</v-form>
<v-btn class="green darken-4 white--text mt-4" @click="submit" :loading="loading" prepend-icon="edit" >
<v-icon >done</v-icon>
</v-btn>
</v-form>
</v-card-text>
</v-card>
</v-dialog>
</template>
@ -47,8 +49,10 @@ export default {
methods:{
submit(){
if (this.$refs.form.validate()){ //valinnaj JS
this.loading = true;
// this.loading = true;
console.log("Dodanie do bazy")
this.$emit('cardAdded')
}
}

View File

@ -8,7 +8,7 @@ Vue.use(Vuetify, {
primary: '#212121',
success: '#EEEEEE',
info: '#ffaa2c',
error: '#f83e70',
error: '#D50000',
myTheme: '#483D8B'
}
})