From f52d728ffd139d06b4baa64c2a735158d7d5261b Mon Sep 17 00:00:00 2001 From: gsd Date: Tue, 10 Oct 2023 23:12:07 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80=D1=8B=20?= =?UTF-8?q?=D0=B8=20=D1=84=D0=BE=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 ++ src/assets/server.svg | 34 ++++++++++++++++ src/components/PublicMethods.js | 21 ++++++++++ src/components/TabsMenu.vue | 8 +++- .../TabsMenuElements/BackendStatus.vue | 17 ++++++++ .../TabsMenuElements/MainView/MainView.vue | 4 +- .../RulesView/Components/RuleCard.vue | 12 +++--- .../TabsMenuElements/RulesView/RulesView.vue | 4 +- .../TabsMenuElements/ServersView.vue | 11 ----- .../ServersView/ServerCard.vue | 33 +++++++++++++++ .../ServersView/ServersView.vue | 40 +++++++++++++++++++ 11 files changed, 163 insertions(+), 25 deletions(-) create mode 100644 src/assets/server.svg create mode 100644 src/components/TabsMenuElements/BackendStatus.vue delete mode 100644 src/components/TabsMenuElements/ServersView.vue create mode 100644 src/components/TabsMenuElements/ServersView/ServerCard.vue create mode 100644 src/components/TabsMenuElements/ServersView/ServersView.vue diff --git a/src/App.vue b/src/App.vue index bc11176..581b43b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -118,6 +118,10 @@ a { } .md-tabs { + /*background-color: #131213;*/ +} + +.md-tabs-navigation { background-color: #131213; } diff --git a/src/assets/server.svg b/src/assets/server.svg new file mode 100644 index 0000000..0068291 --- /dev/null +++ b/src/assets/server.svg @@ -0,0 +1,34 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/components/PublicMethods.js b/src/components/PublicMethods.js index bbf9cb2..97322a4 100644 --- a/src/components/PublicMethods.js +++ b/src/components/PublicMethods.js @@ -36,6 +36,27 @@ export default { console.log(`[PublicMethods] cannot request api/stats/statistic, err: ${err}`); }) }, + getServers(){ + console.log("[PublicMethods] request api/stats/servers"); + return axios.get("/api/stats?filter=servers") + .then(response => response.data['servers']) + .then(response => { + let srvs = { + 'w':[], + "e":[], + 'n':[] + }; + for (let srv in response) { + if (response[srv]['status'] == false) srvs.n.push(response[srv]); + else if (response[srv]['player_count'] > 0) srvs.w.push(response[srv]); + else srvs.e.push(response[srv]); + } + return srvs; + }) + .catch(err => { + console.log(`[PublicMethods] cannot request api/stats/statistic, err: ${err}`); + }); + }, getUniq(){ console.log("[PublicMethods] request api/stats/uniq"); return axios.get("/api/stats?filter=uniq") diff --git a/src/components/TabsMenu.vue b/src/components/TabsMenu.vue index f35a00f..da45925 100644 --- a/src/components/TabsMenu.vue +++ b/src/components/TabsMenu.vue @@ -1,5 +1,6 @@ \ No newline at end of file diff --git a/src/components/TabsMenuElements/MainView/MainView.vue b/src/components/TabsMenuElements/MainView/MainView.vue index f51ce64..5650c8b 100644 --- a/src/components/TabsMenuElements/MainView/MainView.vue +++ b/src/components/TabsMenuElements/MainView/MainView.vue @@ -1,19 +1,17 @@