From 405a3f811218387f95b8510541fd6e37c0cf172a Mon Sep 17 00:00:00 2001 From: gsd Date: Thu, 12 Oct 2023 23:49:06 +0300 Subject: [PATCH] player info 1 --- src/App.vue | 8 ++ src/api/AdminApi.js | 23 ++++++ .../Components/CustomSvg/DownloadSvg.vue | 10 +++ .../Components/CustomSvg/SteamSvg.vue | 53 +++++++++++++ .../Components/CustomSvg/TerminalSvg.vue | 11 +++ .../Components/PlayerExtendedInfo.vue | 76 +++++++++++++++++++ .../Components/PlayerTableInfo.vue | 12 ++- .../ServersView/Components/ServerCard.vue | 2 +- .../ServersView/Components/ServerFullInfo.vue | 31 +++++--- 9 files changed, 215 insertions(+), 11 deletions(-) create mode 100644 src/api/AdminApi.js create mode 100644 src/components/TabsMenuElements/ServersView/Components/CustomSvg/DownloadSvg.vue create mode 100644 src/components/TabsMenuElements/ServersView/Components/CustomSvg/SteamSvg.vue create mode 100644 src/components/TabsMenuElements/ServersView/Components/CustomSvg/TerminalSvg.vue create mode 100644 src/components/TabsMenuElements/ServersView/Components/PlayerExtendedInfo.vue diff --git a/src/App.vue b/src/App.vue index 56e2695..3c66215 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,12 +14,14 @@ import MdIcon from "vue-material/dist/components/MdIcon"; import MdCard from "vue-material/dist/components/MdCard"; import MdDialog from "vue-material/dist/components/MdDialog"; import MdDrawer from "vue-material/dist/components/MdDrawer"; +import MdButton from "vue-material/dist/components/MdButton"; Vue.use(MdTabs); Vue.use(MdIcon); Vue.use(MdCard); Vue.use(MdDialog); Vue.use(MdDrawer); +Vue.use(MdButton); import TabsMenu from "@/components/TabsMenu.vue"; export default { @@ -102,6 +104,12 @@ a { background: #fd8846; } +.rounded-and-colored-circle { + border-radius: 30px; + border: 2px solid black; + background: #fd8846; +} + .rounded-and-colored-without-bottom { border-radius: 10px; border-top: 2px solid black; diff --git a/src/api/AdminApi.js b/src/api/AdminApi.js new file mode 100644 index 0000000..316c416 --- /dev/null +++ b/src/api/AdminApi.js @@ -0,0 +1,23 @@ +import axios from "axios"; + +export default { + name: 'AdminApi', + data: () => ({ + allowBan: false + }), + checkAllowBan() { + return axios.options("/api/admin/ban") + .then(response => { + return response.status === 200; + }) + .catch((err) => { + return err.response.status === 200 + }); + }, + async serverPrefetch() { + this.checkAllowBan().then((r) => { + console.log("[AdminApi] allow ban: " + r); + this.allowBan = true; + }) + } +} \ No newline at end of file diff --git a/src/components/TabsMenuElements/ServersView/Components/CustomSvg/DownloadSvg.vue b/src/components/TabsMenuElements/ServersView/Components/CustomSvg/DownloadSvg.vue new file mode 100644 index 0000000..36cf8a2 --- /dev/null +++ b/src/components/TabsMenuElements/ServersView/Components/CustomSvg/DownloadSvg.vue @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/src/components/TabsMenuElements/ServersView/Components/CustomSvg/SteamSvg.vue b/src/components/TabsMenuElements/ServersView/Components/CustomSvg/SteamSvg.vue new file mode 100644 index 0000000..7c47a08 --- /dev/null +++ b/src/components/TabsMenuElements/ServersView/Components/CustomSvg/SteamSvg.vue @@ -0,0 +1,53 @@ + + + \ No newline at end of file diff --git a/src/components/TabsMenuElements/ServersView/Components/CustomSvg/TerminalSvg.vue b/src/components/TabsMenuElements/ServersView/Components/CustomSvg/TerminalSvg.vue new file mode 100644 index 0000000..9548cbb --- /dev/null +++ b/src/components/TabsMenuElements/ServersView/Components/CustomSvg/TerminalSvg.vue @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/src/components/TabsMenuElements/ServersView/Components/PlayerExtendedInfo.vue b/src/components/TabsMenuElements/ServersView/Components/PlayerExtendedInfo.vue new file mode 100644 index 0000000..7ad298c --- /dev/null +++ b/src/components/TabsMenuElements/ServersView/Components/PlayerExtendedInfo.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file diff --git a/src/components/TabsMenuElements/ServersView/Components/PlayerTableInfo.vue b/src/components/TabsMenuElements/ServersView/Components/PlayerTableInfo.vue index 62c6a68..7ae185f 100644 --- a/src/components/TabsMenuElements/ServersView/Components/PlayerTableInfo.vue +++ b/src/components/TabsMenuElements/ServersView/Components/PlayerTableInfo.vue @@ -1,16 +1,26 @@ diff --git a/src/components/TabsMenuElements/ServersView/Components/ServerCard.vue b/src/components/TabsMenuElements/ServersView/Components/ServerCard.vue index f150344..79df7f2 100644 --- a/src/components/TabsMenuElements/ServersView/Components/ServerCard.vue +++ b/src/components/TabsMenuElements/ServersView/Components/ServerCard.vue @@ -40,7 +40,7 @@ export default { methods: { openServerFullInfo() { console.log("Open server full info"); - if (this.serverData['status'] === true) this.$refs.ssd.openDialog(); + if (this.serverData['status'] === true) this.$refs.ssd.openFIF(); else alert("сервер мертв, нелезь на него"); }, imgIfStatus() { diff --git a/src/components/TabsMenuElements/ServersView/Components/ServerFullInfo.vue b/src/components/TabsMenuElements/ServersView/Components/ServerFullInfo.vue index 7f92eb2..703f04e 100644 --- a/src/components/TabsMenuElements/ServersView/Components/ServerFullInfo.vue +++ b/src/components/TabsMenuElements/ServersView/Components/ServerFullInfo.vue @@ -1,10 +1,14 @@