index.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <!doctype html>
  2. <head>
  3. <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  4. <meta content="utf-8" http-equiv="encoding">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="mobile-web-app-capable" content="yes">
  7. <meta name="theme-color" content="#dddddd">
  8. <link rel="icon" sizes="128x128" href="icon.png">
  9. <style>
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. }
  14. #splash {
  15. background-color: rgb(50, 75, 55);
  16. color: rgb(207, 207, 207);
  17. padding: 10%;
  18. margin: 0%;
  19. font-size: 4em;
  20. font-weight: bolder;
  21. padding-bottom: 200%;
  22. height: 100%;
  23. font-family: Arial, Helvetica, sans-serif;
  24. }
  25. </style>
  26. </head>
  27. <body>
  28. <div id="splash">
  29. loading
  30. </div>
  31. <div id="app" style="display: none">
  32. <nav>
  33. <div class="logo">{{title}}</div>
  34. <div id="nav-icon">M</div>
  35. <input id="nav-toggle" type="checkbox">
  36. <div id="nav-items">
  37. <button v-if="account" @click="search_visible = !search_visible">Sucheinstellungen</button>
  38. <button v-if="account" @click="window.location.hash = ''; window.location.reload()">Logout</button>
  39. </div>
  40. </nav>
  41. <div class="content">
  42. <div class="panel" v-if="search_visible">
  43. <div align="right">
  44. <button @click="search_visible = !search_visible">X</button>
  45. </div>
  46. <h1>Neue Suche</h1>
  47. Suchen sind das Herzstueck dieser Anwendung. Suchen laufen immer, auch wenn Du nicht online bist. Erstelle eine Suche die moeglichst nur das liefert was Dich interessiert. Das Ausschliessen von Sofortkauf-Artikeln, ein Mindestpreis sowie nur Artikel die eine WBK erfordern kann sinnvoll sein. Vergiss nicht am Ende alle zu speichern!
  48. <br>
  49. <br>
  50. <form>
  51. <div class="form-group">
  52. <label>Suchbegriff(e), durch Leerzeichen getrennt</label>
  53. <input autocapitalize="none" v-model="query.search">
  54. </div>
  55. <div class="form-group">
  56. <label>Maximalpreis</label>
  57. <input type="number" v-model="query.maxprice">
  58. </div>
  59. <div class="form-group">
  60. <label>Mindestpreis</label>
  61. <input type="number" v-model="query.minprice">
  62. </div>
  63. <div class="form-group">
  64. <input type="checkbox" v-model="query.restricted">
  65. <label>WBK noetig?</label>
  66. </div>
  67. <label>Auktionstyp</label>
  68. <div class="form-group">
  69. <select v-model="query.type">
  70. <option v-bind:value="1">Nur Auktionen</option>
  71. <option v-bind:value="2">Nur Sofortkauf</option>
  72. <option v-bind:value="3">Alles</option>
  73. </select>
  74. </div>
  75. <div class="form-group">
  76. <label>Such-URL (Kann man alternativ von eGun-Suche kopieren)</label>
  77. <input autocapitalize="none" v-model="query_url">
  78. </div>
  79. </form>
  80. <div>
  81. <a v-if="query_url" v-bind:href="query_url" target="_">Suche testen</a>
  82. </div>
  83. <div align="right">
  84. <button @click="add_query()">Suche hinzufuegen</button>
  85. </div>
  86. Bestehende Suchen:
  87. <div v-for="(query, url) in queries" style="font-size: 0.8em">
  88. <button @click="delete_query(url)">X</button> <i>
  89. "{{display_query(url)}}"
  90. </i>
  91. </div>
  92. <div align="right">
  93. <button @click="save_account()">Alle Suchen permanent speichern</button>
  94. </div>
  95. </div>
  96. <template>
  97. <div class="panel" v-if="!account">
  98. {{account}}
  99. Hi! Du hast noch keinen Account oder es ist keiner geladen. Macht aber nichts, gib einfach Deinen ein oder
  100. denke Dir einen aus.
  101. <input autocapitalize="none" v-model="new_account" v-on:keyup.enter="window.location.hash = new_account;">
  102. <button @click="window.location.hash = new_account">OK</button>
  103. <div>
  104. Tip: der Accountname sollte einem Passwort aehnlich sein wenn Du nicht willst dass jemand anderes Deine
  105. Suchen sieht.
  106. </div>
  107. </div>
  108. </template>
  109. <div class="panel" v-for="auction in ordered_auctions()" v-if="auction.price != null && !auction.is_price_final && !search_visible">
  110. <div class="grid-auto">
  111. <div>
  112. <img :src="auction.thumb" style="vertical-align:middle;">
  113. </div>
  114. <div><a :href="auction.url" target="_">{{auction.desc}}</a></div>
  115. <div>
  116. <div class="badge">{{auction.price}} EUR</div>
  117. </div>
  118. <div>{{ts_to_remaining(auction.timestamp)}}</div>
  119. <a v-bind:href="auction.gcal">Kalendereintrag</a>
  120. </div>
  121. </div>
  122. <div v-if="account" class="panel">
  123. <h3>
  124. Deine Suchen:
  125. </h3>
  126. <div v-for="(query, url) in queries">
  127. Suche <i>"{{display_query(url)}}"</i>: {{Math.round(query.avg_price)}} EUR im Schnitt
  128. </div>
  129. <button @click="search_visible = !search_visible">Sucheinstellungen</button>
  130. </div>
  131. <div class="panel" v-for="auction in ordered_auctions()" v-if="auction.price != null && auction.is_price_final && !search_visible">
  132. <div>
  133. <img :src="auction.thumb" style="vertical-align:middle;">
  134. <div>{{auction.price}} EUR</div>
  135. </div>
  136. <div><a :href="auction.url" target="_">{{auction.desc}}</a></div>
  137. </div>
  138. </div>
  139. </div>
  140. </body>
  141. <!-- <link rel="stylesheet" href="https://rawgit.com/woelper/lilac/master/lilac.css"> -->
  142. <link rel="stylesheet" href="https://rawgit.com/woelper/lilac/master/lilac.min.css">
  143. <!-- Moment.js library -->
  144. <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  145. <!-- moment-duration-format plugin -->
  146. <script
  147. src="https://cdnjs.cloudflare.com/ajax/libs/moment-duration-format/1.3.0/moment-duration-format.min.js"></script>
  148. <script defer src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.min.js"></script>
  149. <script defer src="app.js"></script>
  150. <style>
  151. :root {
  152. --main-color: #2e442f;
  153. }
  154. .nav-items {
  155. margin-left: auto;
  156. margin-right: 0;
  157. }
  158. </style>