From ce74041165a8caa61430452c494b9bd1d528859e Mon Sep 17 00:00:00 2001 From: William Holland Date: Mon, 22 Apr 2024 22:53:13 -0700 Subject: [PATCH 1/6] add player search --- src/assets/styles/style.scss | 10 ++- src/i18n/locales/en-US.json | 5 ++ src/router/index.ts | 7 +- src/views/Players.vue | 141 +++++++++++++++++++++++++++-------- 4 files changed, 129 insertions(+), 34 deletions(-) diff --git a/src/assets/styles/style.scss b/src/assets/styles/style.scss index a274e21c..fbc9081e 100644 --- a/src/assets/styles/style.scss +++ b/src/assets/styles/style.scss @@ -42,6 +42,15 @@ body { color: black; } + .search-bar { + display: flex; + .biketag__button { + padding-inline: 15px; + min-height: auto; + background-size: contain; + } + } + @keyframes spin { from { transform: rotate(0deg); @@ -182,7 +191,6 @@ body { font-weight: $tag-player-font-weight; font-size: $tag-player-font-size; line-height: $tag-player-line-height; - text-transform: uppercase; } .tag-date { diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index 980d2ef8..dff2f36c 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -70,6 +70,11 @@ "send_hello_email": "Send an email to ask about how you can start one!", "game_not_exists": "Uh, oh. Does this game not exist.. yet?" }, + "players": { + "not_found": "no one by that name 'round here.", + "search": "Search", + "exit_search": "Back to All Players" + }, "login":{ "player": "BikeTag Player Login", "description": "The BikeTag Game doesn't require you to log in to play the game, but creating a login does give you the opportunity to secure your player name and prevent others from using it.", diff --git a/src/router/index.ts b/src/router/index.ts index f85fc2f9..3fb8d2cc 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -35,10 +35,15 @@ const routes: Array = [ component: BikeTags, }, { - path: '/players/:currentPage?', + path: '/players', name: 'Players', component: Players, }, + { + path: '/players/search', + name: 'Player Search', + component: Players, + }, { path: '/player/:name/:currentPage?', name: 'Player', diff --git a/src/views/Players.vue b/src/views/Players.vue index 86471327..ac284c9f 100644 --- a/src/views/Players.vue +++ b/src/views/Players.vue @@ -1,29 +1,34 @@ @@ -101,7 +96,6 @@ const store = useBikeTagStore() onMounted(() => { validateQuery() setTimeout(() => { - console.log('not loading no more') reachedLoadingTimeout.value = true }, 1000) }) diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index c2fe6ab2..53760067 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -60,6 +60,9 @@ }, "games": { "games_title": "Featuring games from all over the world!" + }, + "searchable": { + "search": "Search" } }, "pages": { @@ -73,17 +76,21 @@ "players": { "not_found": "no one by that name 'round here.", "empty": "Players will show up here when they join!", - "search": "Search", "exit_search": "Back to All Players", "loading": "Loading Players" }, "biketags": { "not_found": "no tags matching that search.", "empty": "Completed BikeTag Posts will show up here once round #1 has been found!", - "search": "Search", "exit_search": "Back to All Tags", "loading": "Loading Bike Tags" }, + "player": { + "not_found": "no tags for this player matching that search.", + "empty": "This player has no tags.", + "exit_search": "Back to All of This Player's Tags", + "loading": "Loading Tags" + }, "login":{ "player": "BikeTag Player Login", "description": "The BikeTag Game doesn't require you to log in to play the game, but creating a login does give you the opportunity to secure your player name and prevent others from using it.", diff --git a/src/router/index.ts b/src/router/index.ts index 9e0e4bd6..237ced26 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -50,10 +50,15 @@ const routes: Array = [ component: Players, }, { - path: '/player/:name/:currentPage?', + path: '/player/:name', name: 'Player', component: Player, }, + { + path: '/player/:name/search', + name: 'Player Tag Search', + component: Player, + }, { path: '/play', name: 'Play', diff --git a/src/views/Player.vue b/src/views/Player.vue index d009aad3..28663d28 100644 --- a/src/views/Player.vue +++ b/src/views/Player.vue @@ -1,8 +1,5 @@