diff --git a/luckydiamond/src/assets/css/PagesStyles/games-pages/saper.css b/luckydiamond/src/assets/css/PagesStyles/games-pages/saper.css
index 6008f47..ab173d3 100644
--- a/luckydiamond/src/assets/css/PagesStyles/games-pages/saper.css
+++ b/luckydiamond/src/assets/css/PagesStyles/games-pages/saper.css
@@ -255,6 +255,23 @@ input[type="number"]::-webkit-outer-spin-button {
height: 40px;
}
+.error-block {
+ position: absolute;
+ top: 440px;
+}
+
+.error-block h2 {
+ color: #982f2f;
+ font-weight: 700;
+ font-family: Montserrat Alternates;
+ font-size: 10px;
+}
+
+.animate-start-btn {
+ animation: shake 0.6s cubic-bezier(.36, .07, .19, .97);
+ opacity: 50%;
+}
+
/* Saper Game */
.saper-game {
diff --git a/luckydiamond/src/pages/games-pages/SapergamePage.vue b/luckydiamond/src/pages/games-pages/SapergamePage.vue
index fa7d584..6f45378 100644
--- a/luckydiamond/src/pages/games-pages/SapergamePage.vue
+++ b/luckydiamond/src/pages/games-pages/SapergamePage.vue
@@ -40,7 +40,10 @@
-
+
+
Ошибка при заполнении
+
+
@@ -53,11 +56,6 @@
-
-
-
-
-
@@ -158,17 +156,30 @@ export default {
amountCrystals: 0,
amountSaveCrystals: 0,
balance: 1000,
- amountDeposit: 5,
+ ErrorClick: '',
+ amountDeposit: 0,
+ amountSaveDeposit: 0,
flippedCards: [],
PercentageGameSteps: [],
+ ValidationPlay: {
+ CrystalValidate: false,
+ DiamondValidate: false
+ },
modules: [ Navigation ]
}
},
watch: {
+ amountDeposit(DiamondCount) {
+ if (DiamondCount >= 1) {
+ this.amountSaveDeposit = DiamondCount
+ this.ValidationPlay.DiamondValidate = true
+ }
+ },
async amountCrystals(CrystalsCount) {
this.PercentageGameSteps = []
if (CrystalsCount >= 1 && CrystalsCount <= 24) {
this.amountSaveCrystals = CrystalsCount
+ this.ValidationPlay.CrystalValidate = true
try {
await GetPercentageSteps(this.amountSaveCrystals)
.then((response) => {
@@ -184,7 +195,7 @@ export default {
console.error('Error in Percantage', e)
}
}
- }
+ },
},
async created() {
const AUTHTOKEN = GetCookie('AUTHTOKEN')
@@ -203,6 +214,25 @@ export default {
}
},
methods: {
+ clickPlayButton() {
+ if(!this.validationCheck()) {
+ this.errorPlayButton()
+ }
+ else {
+ console.log('yes')
+ }
+ },
+ validationCheck() {
+ if (this.ValidationPlay.CrystalValidate === true && this.ValidationPlay.DiamondValidate === true) {
+ return true
+ }
+ },
+ errorPlayButton() {
+ this.ErrorClick = true
+ setTimeout(() => {
+ this.ErrorClick = false
+ }, 2000)
+ },
flipCard(index) {
if (this.flippedCards.includes(index)) {
this.flippedCards.splice(this.flippedCards.indexOf(index), 1);