diff --git a/public/index.html b/public/index.html index a4c3c99..fb2060f 100644 --- a/public/index.html +++ b/public/index.html @@ -13,6 +13,7 @@ We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
+ diff --git a/src/App.vue b/src/App.vue index 5961437..a0ca4ff 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,8 +1,4 @@ diff --git a/src/views/Home.vue b/src/views/Home.vue index d75446e..c29d65f 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,5 +1,33 @@ @@ -87,6 +111,7 @@ export default { strom: null, stromPocet: 1, kosik: [], + toast: false, }; }, methods: { @@ -96,6 +121,8 @@ export default { polozka: "počet metrů: " + this.posekaniZahrady, cena: this.posekaniZahrady * this.aktivniSluzba.cenaMetr, }) + this.toast = true + this.aktivniSluzba = null }, kosikVysaditStrom: function() { this.kosik.push({ @@ -103,8 +130,20 @@ export default { polozka: "strom: " + this.strom.nazev + ", počet: " + this.stromPocet, cena: this.strom.cena * this.stromPocet, }) + this.toast = true + this.aktivniSluzba = null }, + zavritToast: function() { + this.toast = false + } }, + watch: { + toast: function() { + if (this.toast == true) { + setTimeout(this.zavritToast, 3000) + } + }, + } };