diff --git a/src/api/GlobalApi.js b/src/api/GlobalApi.js
index a39d384..2acc32d 100644
--- a/src/api/GlobalApi.js
+++ b/src/api/GlobalApi.js
@@ -37,7 +37,7 @@ export default class GlobalApi {
builddate = VERSION * 1000;
- current_window = location.hash.length > 1?location.hash.slice(1):'mainView';
+ current_window = location.hash.length > 1?location.hash.slice(1)==="backendView"?"profileView":location.hash.slice(1):'mainView';
load_stages = new Stages();
diff --git a/src/components/ActionDialogs/AdminDialog.vue b/src/components/ActionDialogs/AdminDialog.vue
index df88246..9c2feb7 100644
--- a/src/components/ActionDialogs/AdminDialog.vue
+++ b/src/components/ActionDialogs/AdminDialog.vue
@@ -1,5 +1,5 @@
-
+
@@ -25,7 +25,7 @@
Ответ: {{response}}
- Забанить
+ Забанить
Навсегда
Закрыть
@@ -37,7 +37,7 @@
Ответ: {{response}}
- Разбанить
+ Разбанить
Закрыть
@@ -57,7 +57,7 @@
Ответ: {{response}}
- Кикнуть
+ Кикнуть
Закрыть
@@ -72,8 +72,13 @@ export default {
name: "AdminDialog",
props: {
steam64: String,
+ any: {
+ type: String,
+ default: null
+ }
},
data: () => ({
+ s64: null,
active: false,
payload: {
ban_length:0,
@@ -84,11 +89,19 @@ export default {
current_mode: 0
}),
methods: {
- showMe(b, m) {this.response="";this.active = b;this.current_mode =m},
- toBan() {
+ showMe(b, m) {
+ if (b===true) {
+ this.s64 = this.steam64;
+ this.foundOfAny();
+ }
+ this.response="";
+ this.active = b;
+ this.current_mode =m;
+ },
+ toBan(steam64) {
this.sending = true;
this.response = "Отправляем...";
- axios.post(`/api/admin/ban?steam64=${this.steam64}&ban_length=${this.payload.ban_length}&ban_reason=${this.payload.ban_reason}` + Random.getRndWebAppend())
+ axios.post(`/api/admin/ban?steam64=${steam64}&ban_length=${this.payload.ban_length}&ban_reason=${this.payload.ban_reason}` + Random.getRndWebAppend())
.then((response) => {
switch (response.status) {
case 201: {this.response=`Успешно забанен, ид #${response.data}`;break;}
@@ -99,10 +112,10 @@ export default {
}).catch(()=>{})
.finally(()=>{this.sending = false;})
},
- toUnBan(){
+ toUnBan(steam64){
this.sending = true;
this.response = "Отправляем...";
- axios.post(`/api/admin/unban?steam64=${this.steam64}` + Random.getRndWebAppend())
+ axios.delete(`/api/admin/ban?steam64=${steam64}` + Random.getRndWebAppend())
.then((response) => {
switch (response.status) {
case 200: {this.response=`Игрок разбанен!`;break;}
@@ -113,10 +126,10 @@ export default {
}).catch(()=>{})
.finally(()=>{this.sending = false;})
},
- toKick(){
+ toKick(steam64){
this.sending = true;
this.response = "Отправляем...";
- axios.post(`/api/admin/kick?steam64=${this.steam64}&reason=${this.payload.ban_reason}` + Random.getRndWebAppend())
+ axios.post(`/api/admin/kick?steam64=${steam64}&reason=${this.payload.ban_reason}` + Random.getRndWebAppend())
.then((response) => {
switch (response.status) {
case 200: {this.response=`Игрок был кикнут!`;break;}
@@ -125,6 +138,15 @@ export default {
}
}).catch(()=>{})
.finally(()=>{this.sending = false;})
+ },
+ foundOfAny() {
+ if (this.s64 !== null) return null;
+ axios.post("/api/profile/steam/web" + Random.getRndWebNew(), {"any":this.any})
+ .then(response => {
+ if (response.status === 200 && response.data && 'steam64' in response.data) {
+ this.s64 = response.data['steam64'];
+ }
+ }).catch(()=>{})
}
},
}
diff --git a/src/components/ActionDialogs/BanListDialog.vue b/src/components/ActionDialogs/BanListDialog.vue
index fe63567..d7a9328 100644
--- a/src/components/ActionDialogs/BanListDialog.vue
+++ b/src/components/ActionDialogs/BanListDialog.vue
@@ -29,7 +29,7 @@
@@ -70,6 +70,7 @@ export default {
this.banlist.mdData = []
},
update(page, limit) {
+ if (this.loading === true) return;
const offset = Math.abs((page-1) * limit);
this.loading = true;
axios.get(`api/web/banlist?limit=${Math.abs(limit)}&offset=${offset}` + Random.getRndWebAppend()).then(
diff --git a/src/components/ActionDialogs/BanViewDialog.vue b/src/components/ActionDialogs/BanViewDialog.vue
index db579e4..a8d5c8d 100644
--- a/src/components/ActionDialogs/BanViewDialog.vue
+++ b/src/components/ActionDialogs/BanViewDialog.vue
@@ -22,9 +22,11 @@
Написать
+ Разбанить
Закрыть
+
@@ -33,10 +35,11 @@
import AdminInfoDialog from "@/components/ActionDialogs/AdminInfoDialog.vue";
import axios from "axios";
import Random from "@/api/Random";
+import AdminDialog from "@/components/ActionDialogs/AdminDialog.vue";
export default {
name: "BanViewDialog",
- components: {AdminInfoDialog},
+ components: {AdminDialog, AdminInfoDialog},
data: () => ({
show: false,
ban: null,
diff --git a/src/components/TabsMenuElements/BackendStatus/Components/FindPlayer.vue b/src/components/ActionDialogs/FindPlayer.vue
similarity index 100%
rename from src/components/TabsMenuElements/BackendStatus/Components/FindPlayer.vue
rename to src/components/ActionDialogs/FindPlayer.vue
diff --git a/src/components/ActionDialogs/GametimeDialog.vue b/src/components/ActionDialogs/GametimeDialog.vue
index 03f8178..deaf371 100644
--- a/src/components/ActionDialogs/GametimeDialog.vue
+++ b/src/components/ActionDialogs/GametimeDialog.vue
@@ -28,7 +28,7 @@
@@ -67,6 +67,7 @@ export default {
this.gametime.mdData = []
},
update(page, limit) {
+ if (this.loading === true) return;
console.log(page, limit, this.rowsPerPage);
const offset = Math.abs((page-1) * limit);
this.loading = true;
diff --git a/src/components/Others/Loader/ProfileViewer.vue b/src/components/Others/Loader/ProfileViewer.vue
index 1b688e9..d1ef042 100644
--- a/src/components/Others/Loader/ProfileViewer.vue
+++ b/src/components/Others/Loader/ProfileViewer.vue
@@ -1,19 +1,27 @@
-
-
-
-
Загрузка
-
-
-
кикнуть
-
забанить
-
разбанить
-
-
Закрыть
+
+
+
+
+
+
+
кикнуть
+
забанить
+
разбанить
+
+
Закрыть
+
-
-
-
+
+
+
+
+
+