From 172daf46927361f3082868e52964984ab7986b31 Mon Sep 17 00:00:00 2001 From: Braydon Harris Date: Sat, 23 Dec 2023 13:48:30 -0800 Subject: [PATCH] chore: add search info fix: info content fix: id column sticky --- src/App.vue | 33 +++++++++++++++++++++------------ src/components/Table.vue | 11 ++++++++--- src/services/game.service.ts | 1 + 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/App.vue b/src/App.vue index b2c9566..9afa7a2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -205,10 +205,12 @@ async function viewInfo(){ const dbtemp = await gameService.getDBInfo(); - const size = formatBytes(dbtemp.size); - const newdate = new Date(dbtemp.mtime).toISOString().split('T'); - const date = `${newdate[0]} ${newdate[1].split('.')[0]}`; - dbData.value = {size, date}; + if(dbtemp) { + const size = formatBytes(dbtemp.size); + const newdate = new Date(dbtemp.mtime).toISOString().split('T'); + const date = `${newdate[0]} ${newdate[1].split('.')[0]}`; + dbData.value = {size, date}; + }; openInfoDialog.value = true; } @@ -320,19 +322,26 @@ - -

Games before 23rd April 2016 5:00 PM UTC are anonymized and won't appear when searching with player name

-

+ +

Games before 23rd April 2016 5:00 PM UTC are anonymized and won't appear when searching by player name.

+

Please don't scrape this site. You can directly download the database here:
Games Database - (~{{dbData.size}}) (updated on {{dbData.date}})
- note that the notation is in play tak server format. + (~{{dbData.size}}) (updated on {{dbData.date}})
+ Database download link is updated everyday at 5:00 PM UTC
+ You can also use the Playtak API to get the games. Check out the github for help: Play Tak API
+ note: game notation is in play tak server format.

-

- The link above will be updated with latest database every day at 5:00 PM UTC. +

Search Notes:
+

In the game ID field you can search by: +

    +
  • Single ID e.g. 10
  • +
  • Range of ID's e.g. 10-100
  • +
  • Comma delimited e.g. 10,20,30
  • +

- In the player name search fields you can do a partial search with % at the start, end, or both. ie %ame or nam% or %am% + In the player name search fields you can do a partial search with % at the start, end, or both. e.g. %ame or nam% or %am%

diff --git a/src/components/Table.vue b/src/components/Table.vue index b4760b2..7765c85 100644 --- a/src/components/Table.vue +++ b/src/components/Table.vue @@ -16,7 +16,7 @@ }>() const columns: any= [ - { name: "id", label: "ID", field: "id", align: "left" }, + { name: "id", label: "ID", field: "id", align: "left", headerClasses: "id" }, { name: "size", label: "Size", field: "size", align: "left" }, { name: "rules", label: "Rules", field: "rules", align: "left" }, { name: "clock", label: "Clock", field: "", align: "left" }, @@ -42,7 +42,7 @@ LocalStorage.getItem("visibleColumns") || ['id', 'date', 'size', 'rules', 'clock', 'type', 'white', 'black', 'result', 'notation', 'review'] ); - watch(visibleColumns, (value) => LocalStorage.set("visibleColumns", value)); + watch(visibleColumns, (value: any) => LocalStorage.set("visibleColumns", value)); function formatDate(date: number){ let newDate = new Date(date).toISOString().split('T'); @@ -152,7 +152,7 @@