Browse Source

Massive refactor;

master
Nero Ignis 4 years ago
parent
commit
95d5605622
  1. 2
      .idea/idle-build-up.iml
  2. 12
      changelog.html
  3. 91
      index.html
  4. 259
      js/app.js

2
.idea/idle-build-up.iml

@ -6,5 +6,7 @@ @@ -6,5 +6,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="tailwindcss" level="application" />
<orderEntry type="library" name="jquery-3.2.1.slim" level="application" />
<orderEntry type="library" name="tailwindcss" level="application" />
<orderEntry type="library" name="jquery-3.2.1.slim" level="application" />
</component>
</module>

12
changelog.html

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Changelog</title>
<link rel="stylesheet" href="https://bootswatch.com/4/darkly/bootstrap.min.css">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no" name="viewport">
</head>
<body>
</body>
</html>

91
index.html

@ -5,59 +5,85 @@ @@ -5,59 +5,85 @@
<title>Idle Gathering</title>
<link rel="stylesheet" href="https://bootswatch.com/4/darkly/bootstrap.min.css">
<link rel="stylesheet" href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.4.0/css/iziToast.min.css"/>
<link rel="stylesheet" href="css/app.css" >
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no" name="viewport">
</head>
<body>
<div id="root" class="container mt-2">
<div class="row" v-if="loaded">
<div class="row">
<div class="col-sm-6">
<div class="card">
<a class="card-header" data-toggle="collapse" href="#collapseResources" role="button" aria-expanded="true" aria-controls="collapseResources">
<h3>Resources</h3>
</a>
<div class="card-body" id="collapseResources">
<h1><img class="resource-icon" src="img/gold.png"> {{ this.getAmount() }}</h1>
<br>
<h3 v-if="resources.wood > 0"><img class="resource-icon" src="img/wood.png"> {{ resources.wood }} Wood</h3>
<h3 v-if="resources.planks > 0"><img class="resource-icon" src="img/planks.png"> {{ resources.planks }} Planks</h3>
<h3 v-if="resources.stone > 0"><img class="resource-icon" src="img/stone.png"> {{ resources.stone }} Stone</h3>
<h3 v-if="resources.coal > 0"><img class="resource-icon" src="img/coal.png"> {{ resources.coal }} Coal</h3>
<h3 v-if="resources.iron > 0"><img class="resource-icon" src="img/iron.png"> {{ resources.iron }} Iron</h3>
<h3 v-if="resources.bricks > 0"><img class="resource-icon" src="img/bricks.png"> {{ resources.bricks }} Bricks</h3>
<h3 v-if="resources.corn > 0"><img class="resource-icon" src="img/corn.png"> {{ resources.corn }} Corn</h3>
<div class="row">
<div class="col-md-12">
<div class="float-right">{{ getFormattedNumber(resources.gold) }} <img class="resource-icon" src="img/gold.png"></div>
Coins
</div>
<div class="col-md-12" v-if="resources.wood > 0">
<div class="float-right">{{ getFormattedNumber(resources.wood) }} <img class="resource-icon" src="img/wood.png"></div>
Wood
</div>
<div class="col-md-12" v-if="resources.planks > 0">
<div class="float-right">{{ getFormattedNumber(resources.planks) }} <img class="resource-icon" src="img/planks.png"></div>
Planks
</div>
<div class="col-md-12" v-if="resources.stone > 0">
<div class="float-right">{{ getFormattedNumber(resources.stone) }} <img class="resource-icon" src="img/stone.png"></div>
Stones
</div>
<div class="col-md-12" v-if="resources.coal > 0">
<div class="float-right">{{ getFormattedNumber(resources.coal) }} <img class="resource-icon" src="img/coal.png"></div>
Coal
</div>
<div class="col-md-12" v-if="resources.iron > 0">
<div class="float-right">{{ getFormattedNumber(resources.iron) }} <img class="resource-icon" src="img/iron.png"></div>
Iron
</div>
<div class="col-md-12" v-if="resources.corn > 0">
<div class="float-right">{{ getFormattedNumber(resources.corn) }} <img class="resource-icon" src="img/corn.png"></div>
Corn
</div>
<div class="col-md-12" v-if="resources.bricks > 0">
<div class="float-right">{{ getFormattedNumber(resources.bricks) }} <img class="resource-icon" src="img/bricks.png"></div>
Bricks
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class="card-header" data-toggle="collapse" href="#collapseQuest" role="button" aria-expanded="true" aria-controls="collapseQuest">
<a class="card-header" data-toggle="collapse" href="#collapseQuest" role="button" aria-expanded="true" aria-controls="collapseQuest">
<h3>Quests</h3>
</div>
</a>
<div class="card-body" id="collapseQuest">
<div v-if="currentQuest">
The following items are needed: <br/>
Items needed: <br/>
<span v-if="currentQuest.wood > 0"><img title="wood" class="resource-icon" src="img/wood.png"> {{ currentQuest.wood }}</span>
<span v-if="currentQuest.planks > 0"><img title="wood" class="resource-icon" src="img/planks.png"> {{ currentQuest.planks }}</span>
<span v-if="currentQuest.stone > 0"><img title="stone" class="resource-icon" src="img/stone.png"> {{ currentQuest.stone }}</span>
<span v-if="currentQuest.coal > 0"><img title="coal" class="resource-icon" src="img/coal.png"> {{ currentQuest.coal }}</span>
<span v-if="currentQuest.iron > 0"><img title="iron" class="resource-icon" src="img/iron.png"> {{ currentQuest.iron }}</span>
<span v-if="currentQuest.bricks > 0"><img title="bricks" class="resource-icon" src="img/bricks.png"> {{ currentQuest.bricks }}</span>
<span v-if="currentQuest.corn > 0"><img title="corn" class="resource-icon" src="img/corn.png"> {{ currentQuest.corn }}</span>
<br/>
<br/>
<a href="javascript:" class="btn btn-sm btn-success" @click="redeemReward()">Redeem reward ({{ currentQuest.reward }} <img class="resource-icon" src="img/gold.png">)</a>
</div>
<div v-else>
<a class="btn btn-sm btn-info" @click="generateQuest()">Get Quest (resources needed)</a>
<a class="btn btn-sm btn-info" @click="generateQuestWithRandomItems()">Get Quest (resources needed)</a>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-header" data-toggle="collapse" href="#collapseOwned" role="button" aria-expanded="true" aria-controls="collapseOwned">
<a class="card-header" data-toggle="collapse" href="#collapseOwned" role="button" aria-expanded="true" aria-controls="collapseOwned">
<h3>Owned buildings</h3>
</div>
</a>
<div class="card-body" id="collapseOwned">
<ul class="list-group">
<li class="list-group-item" v-for="building in buildings" v-if="building.isOwned">
@ -68,8 +94,8 @@ @@ -68,8 +94,8 @@
<img class="building-icon" :src="'img/' + building.icon + '.png'" :alt="building.name + '_icon'">
</div>
<strong>{{ building.name }} (Level {{ building.level }})</strong><br>
{{ building.amount }} <img class="resource-icon" :src="'img/' + building.resource + '.png'" :alt="building.resource + '_icon'"> / {{ building.intervalInSeconds }}s<br/>
<span v-if="building.hasRequirements" v-html="getRequirementsForProduction(building)"></span>
{{ building.amount }} <img class="resource-icon" :src="'img/' + building.resource + '.png'" :alt="building.resource + '_icon'"> every {{ building.intervalInSeconds }}s<br/>
<span v-if="building.hasRequirements" v-html="getRequirementsText(building)"></span>
<div class="progress">
<div class="progress-bar progress-bar-success text-light" role="progressbar" :style="'width: ' + building.loader + '%;'" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100">
<span v-if="!building.hasMissingResources">
@ -88,9 +114,9 @@ @@ -88,9 +114,9 @@
<div class="col-md-6">
<div class="card">
<div class="card-header" data-toggle="collapse" href="#collapseAvailable" role="button" aria-expanded="true" aria-controls="collapseAvailable">
<a class="card-header" data-toggle="collapse" href="#collapseAvailable" role="button" aria-expanded="true" aria-controls="collapseAvailable">
<h3>Available buildings</h3>
</div>
</a>
<div class="card-body" id="collapseAvailable">
<ul class="list-group">
<li class="list-group-item" v-for="building in buildings" v-if="!building.isOwned">
@ -101,31 +127,20 @@ @@ -101,31 +127,20 @@
<img class="building-icon" :src="'img/' + building.icon + '.png'">
</div>
<strong>{{ building.name }}</strong><br>
{{ building.amount }} <img class="resource-icon" :src="'img/' + building.resource + '.png'"> / {{ building.intervalInSeconds }}s<br/>
<span v-if="building.hasRequirements" v-html="getRequirementsForProduction(building)"></span>
{{ building.amount }} <img class="resource-icon" :src="'img/' + building.resource + '.png'"> every {{ building.intervalInSeconds }}s<br/>
<span v-if="building.hasRequirements" v-html="getRequirementsText(building)"></span>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-12">
<div class="card">
<div class="card-header" data-toggle="collapse hide" href="#collapseDebug" role="button" aria-expanded="true" aria-controls="collapseDebug">
<h3>Testing & Debugging</h3>
</div>
<div class="card-body" id="collapseDebug">
<a class="btn btn-sm btn-danger" href="javascript:" @click="localStorage.removeItem('buildings')">Reset buildings (to reload newly added ones)</a><br/><br/>
<a class="btn btn-sm btn-danger" href="javascript:" @click="localStorage.clear()">Reset everything (also coins!)</a><br/><br/>
<a class="btn btn-sm btn-danger" href="javascript:" @click="money += 10000">Add 10.000 coins</a><br/><br/>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.4.0/js/iziToast.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://kit.fontawesome.com/b54a4cceff.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="js/app.js?v=0.3"></script>

259
js/app.js

@ -1,10 +1,15 @@ @@ -1,10 +1,15 @@
const storage = {
resources: 'resources',
buildings: 'buildings',
currentQuest: 'currentQuest'
};
let game = new Vue({
el: '#root',
data: {
money: 0,
loaded: false,
resources: {
wood: 50,
gold: 0,
wood: 0,
stone: 0,
iron: 0,
bricks: 0,
@ -133,75 +138,100 @@ let game = new Vue({ @@ -133,75 +138,100 @@ let game = new Vue({
},
created() {
this.checkBuildings();
this.money = this.getSavedMoney();
this.saveMoney();
this.loadResources();
this.loadResourcesFromStorage();
this.currentQuest = JSON.parse(localStorage.getItem('currentQuest'));
this.loadBuildings();
this.loadBuildingsFromStorage();
this.reloadBuildings();
this.loaded = true;
},
methods: {
checkBuildings() {
let savedBuildings = JSON.parse(localStorage.getItem('buildings'));
if (savedBuildings.length !== this.buildings.length) {
if (!savedBuildings) {
localStorage.setItem('buildings', JSON.stringify(this.buildings));
} else if (savedBuildings.length !== this.buildings.length) {
localStorage.setItem('buildings', JSON.stringify(this.buildings));
alert('Buildings have been resetted due to an important update.')
this.sendInfo('Buildings have been resetted due to an important update.');
}
},
saveMoney() {
localStorage.setItem('money', String(this.money));
return this.getSavedMoney();
saveBuildingsToStorage() {
localStorage.setItem('buildings', JSON.stringify(this.buildings));
},
getSavedMoney() {
this.money = Number(localStorage.getItem('money') ?? 0);
return this.money;
loadBuildingsFromStorage() {
let savedBuildings = JSON.parse(localStorage.getItem('buildings'));
if (savedBuildings) {
savedBuildings.forEach((building) => {
if (building.isOwned) {
building.loader = 10;
}
});
this.buildings = savedBuildings;
}
},
saveResourcesToStorage() {
localStorage.setItem('resources', JSON.stringify(this.resources));
},
loadResourcesFromStorage: function () {
let savedResources = JSON.parse(localStorage.getItem('resources'));
if (savedResources) {
this.resources = savedResources;
}
},
add(amount = 0, resource = 'gold') {
switch (resource) {
case 'wood':
this.sendResourceMessage(amount, 'wood');
this.resources.wood += amount;
break;
case 'planks':
this.sendResourceMessage(amount, 'planks');
this.resources.planks += amount;
break;
case 'stone':
this.sendResourceMessage(amount, 'stone');
this.resources.stone += amount;
break;
case 'iron':
this.resources.iron = Number(this.resources.iron + amount);
break;
case 'bricks':
this.sendResourceMessage(amount, 'bricks');
this.resources.bricks += amount;
break;
case 'corn':
this.resources.corn += amount;
break;
case 'coal':
this.sendResourceMessage(amount, 'coal');
this.resources.coal += amount;
break;
case 'planks':
this.resources.planks += amount;
case 'iron':
this.sendResourceMessage(amount, 'iron');
this.resources.iron = Number(this.resources.iron + amount);
break;
case 'corn':
this.sendResourceMessage(amount, 'corn');
this.resources.corn += amount;
break;
case 'gold':
this.money += amount;
this.sendResourceMessage(amount, 'gold');
this.resources.gold += amount;
break;
}
this.saveResources();
return this.saveMoney();
this.saveResourcesToStorage();
},
sub(amount = 0, resource = false) {
this.money -= amount;
return this.saveMoney();
this.resources.gold -= amount;
return this.saveResourcesToStorage();
},
getAmount() {
return this.money.toFixed(0);
getFormattedNumber(value) {
return value.toLocaleString('de-DE');
},
reloadBuildings() {
@ -252,28 +282,28 @@ let game = new Vue({ @@ -252,28 +282,28 @@ let game = new Vue({
},
buyBuilding(building) {
if (this.money >= building.price) {
if (this.resources.gold >= building.price) {
this.sub(building.price);
building.isOwned = true;
this.upgradeBuilding(building, true);
this.saveBuildings();
this.saveBuildingsToStorage();
} else {
alert('Not enough money');
this.sendWarning('Not enough gold');
}
},
buyUpgrade(building) {
if (building.level === 'MAX') {
alert('Already at MAX-Level');
this.sendWarning('Already at MAX-Level');
return false;
}
if (this.money >= building.price) {
if (this.resources.gold >= building.price) {
this.sub(building.price);
this.upgradeBuilding(building);
} else {
alert('Not enough money');
this.sendWarning('Not enough gold');
}
},
@ -295,7 +325,7 @@ let game = new Vue({ @@ -295,7 +325,7 @@ let game = new Vue({
}
this.reloadSingleBuilding(building);
this.saveBuildings();
this.saveBuildingsToStorage();
},
reloadSingleBuilding(building) {
@ -306,31 +336,7 @@ let game = new Vue({ @@ -306,31 +336,7 @@ let game = new Vue({
this.initiateIntervals(building);
},
saveBuildings() {
localStorage.setItem('buildings', JSON.stringify(this.buildings));
},
loadBuildings: function () {
let savedBuildings = JSON.parse(localStorage.getItem('buildings'));
if (savedBuildings) {
this.buildings = savedBuildings;
}
},
saveResources() {
localStorage.setItem('resources', JSON.stringify(this.resources));
},
loadResources: function () {
let savedResources = JSON.parse(localStorage.getItem('resources'));
if (savedResources) {
this.resources = savedResources;
}
},
generateQuest() {
generateQuestWithRandomItems() {
let possibleAmountsForQuest = [
0, 0, 0, 5, 10, 15, 20, 25, 30, 35
];
@ -347,37 +353,37 @@ let game = new Vue({ @@ -347,37 +353,37 @@ let game = new Vue({
if (this.resources.wood > 0) {
randomWood = this.getRandomElement(possibleAmountsForQuest);
randomWood = this.getRandomElementForQuestResource(possibleAmountsForQuest);
rewardSum += (randomWood * 5);
}
if (this.resources.stone > 0) {
randomStone = this.getRandomElement(possibleAmountsForQuest);
randomStone = this.getRandomElementForQuestResource(possibleAmountsForQuest);
rewardSum += (randomStone * 7);
}
if (this.resources.iron > 0) {
randomIron = this.getRandomElement(possibleAmountsForQuest);
randomIron = this.getRandomElementForQuestResource(possibleAmountsForQuest);
rewardSum += (randomIron * 200);
}
if (this.resources.bricks > 0) {
randomBricks = this.getRandomElement(possibleAmountsForQuest);
randomBricks = this.getRandomElementForQuestResource(possibleAmountsForQuest);
rewardSum += (randomBricks * 25);
}
if (this.resources.corn > 0) {
randomCorn = this.getRandomElement(possibleAmountsForQuest);
randomCorn = this.getRandomElementForQuestResource(possibleAmountsForQuest);
rewardSum += (randomCorn * 30);
}
if (this.resources.coal > 0) {
randomCoal = this.getRandomElement(possibleAmountsForQuest);
randomCoal = this.getRandomElementForQuestResource(possibleAmountsForQuest);
rewardSum += (randomCoal * 10);
}
if (this.resources.planks > 0) {
randomPlanks = this.getRandomElement(possibleAmountsForQuest);
randomPlanks = this.getRandomElementForQuestResource(possibleAmountsForQuest);
rewardSum += (randomPlanks * 5);
}
@ -401,43 +407,28 @@ let game = new Vue({ @@ -401,43 +407,28 @@ let game = new Vue({
return this.currentQuest;
},
getRandomElement(possibleValues) {
getRandomElementForQuestResource(possibleValues) {
return possibleValues[Math.floor(Math.random() * possibleValues.length)];
},
isQuestRedeemable() {
console.log(this.resources.wood + ' wood available');
console.log(this.currentQuest.wood + ' wood needed in quest');
console.log(this.resources.wood >= this.currentQuest.wood);
console.log(this.resources.stone + ' stone available');
console.log(this.currentQuest.stone + ' wood needed in quest');
console.log(this.resources.stone >= this.currentQuest.stone);
console.log(this.resources.iron + ' iron available');
console.log(this.currentQuest.iron + ' wood needed in quest');
console.log(this.resources.iron >= this.currentQuest.iron);
console.log(this.resources.bricks + ' bricks available');
console.log(this.currentQuest.bricks + ' wood needed in quest');
console.log(this.resources.bricks >= this.currentQuest.bricks);
console.log(this.resources.corn + ' corn available');
console.log(this.currentQuest.corn + ' wood needed in quest');
console.log(this.resources.corn >= this.currentQuest.corn);
console.log(this.resources.coal + ' coal available');
console.log(this.currentQuest.coal + ' wood needed in quest');
console.log(this.resources.coal >= this.currentQuest.coal);
return (
this.resources.wood >= this.currentQuest.wood &&
this.resources.stone >= this.currentQuest.stone &&
this.resources.iron >= this.currentQuest.iron &&
this.resources.bricks >= this.currentQuest.bricks &&
this.resources.corn >= this.currentQuest.corn &&
this.resources.coal >= this.currentQuest.coal
);
let enoughWood = this.resources.wood >= this.currentQuest.wood;
let enoughStone = this.resources.stone >= this.currentQuest.stone;
let enoughIron = this.resources.iron >= this.currentQuest.iron;
let enoughBricks = this.resources.bricks >= this.currentQuest.bricks;
let enoughCorn = this.resources.corn >= this.currentQuest.corn;
let enoughCoal = this.resources.coal >= this.currentQuest.coal;
if (enoughWood && enoughStone && enoughIron && enoughBricks && enoughCorn && enoughCoal) {
return true;
} else {
return false;
}
},
redeemReward() {
if (this.isQuestRedeemable()) {
this.money += this.currentQuest.reward;
this.resources.gold += this.currentQuest.reward;
this.resources.wood -= this.currentQuest.wood;
this.resources.stone -= this.currentQuest.stone;
this.resources.iron -= this.currentQuest.iron;
@ -445,9 +436,10 @@ let game = new Vue({ @@ -445,9 +436,10 @@ let game = new Vue({
this.resources.corn -= this.currentQuest.corn;
this.resources.coal -= this.currentQuest.coal;
this.generateQuest();
this.sendRewardMessage(this.currentQuest.reward);
this.generateQuestWithRandomItems();
} else {
alert('Not enough resources to redeem reward.');
this.sendWarning('Not enough resources to redeem reward.');
return false;
}
},
@ -461,6 +453,7 @@ let game = new Vue({ @@ -461,6 +453,7 @@ let game = new Vue({
this.resources.coal -= building.requires.coal;
},
// Templating
getResourceIconForBuilding(building) {
return this.getResourceIcon(building.resource);
},
@ -469,7 +462,7 @@ let game = new Vue({ @@ -469,7 +462,7 @@ let game = new Vue({
return '<img class="resource-icon" src="img/' + resource + '.png" title="' + resource + '" alt="' + resource + '">';
},
getRequirementsForProduction(building) {
getRequirementsText(building) {
let requirementList = '<br/>Uses';
if (building.requires.wood) {
@ -480,15 +473,67 @@ let game = new Vue({ @@ -480,15 +473,67 @@ let game = new Vue({
requirementList += ' ' + building.requires.stone + ' ' + this.getResourceIcon('stone');
}
if (building.requires.iron) {
requirementList += ' ' + building.requires.iron + ' ' + this.getResourceIcon('iron');
}
if (building.requires.bricks) {
requirementList += ' ' + building.requires.bricks + ' ' + this.getResourceIcon('bricks');
}
if (building.requires.coal) {
requirementList += ' ' + building.requires.coal + ' ' + this.getResourceIcon('coal');
}
if (building.requires.iron) {
requirementList += ' ' + building.requires.iron + ' ' + this.getResourceIcon('iron');
if (building.requires.corn) {
requirementList += ' ' + building.requires.corn + ' ' + this.getResourceIcon('corn');
}
return requirementList + ' / ' + building.amount + ' ' + this.getResourceIconForBuilding(building);
return requirementList + ' for ' + building.amount + ' ' + this.getResourceIconForBuilding(building);
},
// Alerts
sendRewardMessage(reward) {
iziToast.show({
image: 'img/gold.png',
color: 'green',
message: 'You got a reward of ' + reward + ' gold!',
position: 'bottomCenter',
timeout: 1500,
});
},
sendResourceMessage(amount, resource) {
iziToast.show({
image: 'img/' + resource + '.png',
position: 'bottomCenter',
message: 'Produced ' + amount + ' ' + resource + '!',
timeout: 1000,
});
},
sendNotification(message) {
iziToast.show({
color: 'green',
message: message,
position: 'bottomCenter',
});
},
sendWarning(message) {
iziToast.show({
color: 'red',
message: message,
position: 'bottomCenter',
});
},
sendInfo(message) {
iziToast.show({
color: 'blue',
message: message,
position: 'bottomCenter',
});
}
},
}
});

Loading…
Cancel
Save