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

View File

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

View File

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