diff --git a/src/App.vue b/src/App.vue
index b24d03c..f0dadb9 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -27,6 +27,7 @@ import MdSteppers from "vue-material/dist/components/MdSteppers";
import MdTable from "vue-material/dist/components/MdTable";
import MdContent from "vue-material/dist/components/MdContent";
import MdRipple from "vue-material/dist/components/MdRipple";
+import MdSwitch from "vue-material/dist/components/MdSwitch";
Vue.use(MdTabs);
Vue.use(MdIcon);
@@ -43,6 +44,7 @@ Vue.use(MdSteppers);
Vue.use(MdTable);
Vue.use(MdContent);
Vue.use(MdRipple);
+Vue.use(MdSwitch);
import TabsMenu from "@/components/TabsMenu.vue";
import LoaderPage from "@/components/Others/Loader/LoaderPage.vue";
diff --git a/src/api/GlobalApi.js b/src/api/GlobalApi.js
index 7221caa..cbd2175 100644
--- a/src/api/GlobalApi.js
+++ b/src/api/GlobalApi.js
@@ -119,17 +119,18 @@ export default class GlobalApi {
async load() {
this.loading = true;
document.title = `Загрузка - Факты 13`;
- await Promise.all(
- [this.fillThis('statistic'),
+ let need2load = [
+ this.fillThis('statistic'),
this.fillThis('uniq'),
this.fillThis('donate'),
this.fillServers(),
- this.admin.load(this.load_stages),
- this.player.load(this.load_stages),
this.vip.getVipPrices(this.load_stages),
this.vip.getVipStatistic(this.load_stages),
+ this.admin.load(this.load_stages),
+ this.player.load(this.load_stages),
this.fillOther()]
- ).then(() => {
+ this.load_stages.count_stages = need2load.length;
+ await Promise.all(need2load).then(() => {
console.log("[Loader] success end");
this.loading = false;
document.title = `Факты 13`;
diff --git a/src/api/Stages.js b/src/api/Stages.js
index c4bf6e1..f8a9eee 100644
--- a/src/api/Stages.js
+++ b/src/api/Stages.js
@@ -1,5 +1,6 @@
export default class Stages {
stages = [];
+ count_stages = 0;
add(s) {
this.stages.push(s)
@@ -18,11 +19,12 @@ export default class Stages {
case 'vip prices': return 'курс рубля к лаймовой краске...';
case 'vip statistic': return 'переводим деньги на СВО...';
case 'profile': return 'виталик ищет тебя...';
+ case 'donate': return 'отправляем деньги на СВО...';
default: return s;
}
}
percent() {
- return 100 - this.stages.length * 100 / 5;
+ return this.stages.length * 100 / this.count_stages;
}
}
\ No newline at end of file
diff --git a/src/components/ActionDialogs/AdminDialog.vue b/src/components/ActionDialogs/AdminDialog.vue
new file mode 100644
index 0000000..153cfbe
--- /dev/null
+++ b/src/components/ActionDialogs/AdminDialog.vue
@@ -0,0 +1,130 @@
+
+ Ответ: {{response}} Ответ: {{response}} Ответ: {{response}} {{$API.load_stages.human(stage)}}Загрузка
+ {{100 - (this.$API.load_stages.stages.length * 100 / this.$API.load_stages.count_stages).toFixed(0)}}%