]> gitweb.ps.run Git - lolstats/commitdiff
changes
authorPatrick Schönberger <patrick.schoenberger@posteo.de>
Mon, 10 Dec 2018 19:08:47 +0000 (20:08 +0100)
committerPatrick Schönberger <patrick.schoenberger@posteo.de>
Mon, 10 Dec 2018 19:08:47 +0000 (20:08 +0100)
html/index.html
html/script.js
html/style.css

index 834652900eb877ca00deaeafb376296352442680..2e6b29256360847ef63c9f8308294d4eb071cc45 100644 (file)
 
       </div>
       <div id="matchhistory" style="display: none">
-        <button v-on:click="historyToStats">Statistics</button>
-        Champion:
-        <select>
-          <option>All</option>
-          <option v-for="c in champions">{{ c.name }}</option>
-        </select>
-
+        <div id="historyfilters">
+          <button id="statsbutton" v-on:click="historyToStats">Statistics</button>
+          <label for="champselect">Champion</label>
+          <select id="champselect">
+            <option>All</option>
+            <option v-for="c in champions">{{ c.name }}</option>
+          </select>
+          <button id="refreshbutton" v-on:click="refreshhistory">Refresh</button>
+        </div>
+        <div id="matchlist">
+          <table>
+            <tr>
+              <th v-for="c in matchprops">{{ c.text }}</th>
+            </tr>
+            <tr v-for="m in matches">
+              <td v-for="c in matchprops">{{ m[c.name] }}</td>
+            </tr>
+          </table>
+        </div>
       </div>
       <div id="stats" style="display: none">
-        <button v-on:click="statsToHistory">Match history</button>
+        <button id="historybutton" v-on:click="statsToHistory">Match history</button>
       </div>
 
     </div>
index d97fcc4c10ba0dd8a3443880fa8bd6319e2b779d..51c43c0281648d80e9fccdb50334bd2c33a93036 100644 (file)
@@ -4,7 +4,12 @@ function getRegions() {
   return [ "euw", "na", "kr", "br" ];
 }
 function getChampions() {
-  return [ {name: "Aatrox"}, {name: "Annie"}, {name: "Braum"} ];
+  return [ {name: "Aatrox"}, {name: "Annie"}, {name: "Braum"}, {name: "Not"} ];
+}
+function getMatchProps() {
+  return []
+}
+function getMatches() {
 }
 function getInfo() {
   app.summoner = $("#nameinput").val();
@@ -35,6 +40,8 @@ var app = new Vue({
     view: "start",
     regions: getRegions(),
     champions: getChampions(),
+    matchprops: getMatchProps(),
+    matches: getMatches(),
   },
   methods: {
     submit: function() {
index 3c3cd0a075d5124e6780d40ba57aa79484c07783..af80d07189d734c391939d8bf664911d636234ec 100644 (file)
@@ -101,8 +101,18 @@ input, select, button {
   left: 110px;
   top: 5px;
 }
-#gobutton {
-  position: relative;
+#gobutton, #statsbutton, #historybutton {
+  position: absolute;
+  top: 5px;
+  right: 5px;
+  z-index: 1;
+}
+#refreshbutton {
+  position: absolute;
+  right: 5px;
+  bottom: 5px;
+}
+button {
   vertical-align: baseline;
   margin: 5px;
   width: 110px;
@@ -111,10 +121,6 @@ input, select, button {
   color: white;
   border-radius: 5px;
   outline: none;
-  position: absolute;
-  top: 5px;
-  right: 5px;
-  z-index: 1;
 }
 #gobutton:hover {
   background-color: rgba(180, 30, 30);