From 1c9826a545b4336ede227c132d7ccfdba70c4ec0 Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Fri, 6 Mar 2020 15:23:14 +0100 Subject: [PATCH] Better display on main Hall when no challenges or games found --- client/src/components/ChallengeList.vue | 8 +++++++- client/src/components/GameList.vue | 8 +++++++- client/src/translations/en.js | 2 ++ client/src/translations/es.js | 2 ++ client/src/translations/fr.js | 2 ++ 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue index 5a3db5c5..8c1f2dd5 100644 --- a/client/src/components/ChallengeList.vue +++ b/client/src/components/ChallengeList.vue @@ -1,6 +1,6 @@ <template lang="pug"> div - table + table(v-if="challenges.length > 0") thead tr th {{ st.tr["Variant"] }} @@ -17,6 +17,8 @@ div td {{ withWho(c) }} td {{ c.cadence }} td(:class="getRandomnessClass(c)") + p(v-else) + | {{ st.tr["No challenges found :( Click on 'New game'!"] }} </template> <script> @@ -69,6 +71,10 @@ export default { </script> <style lang="sass" scoped> +p + text-align: center + font-weight: bold + // NOTE: the style applied to <tr> element doesn't work tr.fromyou > td font-style: italic diff --git a/client/src/components/GameList.vue b/client/src/components/GameList.vue index 98eaf33f..aa361fb3 100644 --- a/client/src/components/GameList.vue +++ b/client/src/components/GameList.vue @@ -1,6 +1,6 @@ <template lang="pug"> div - table.game-list + table.game-list(v-if="games.length > 0") thead tr th {{ st.tr["Variant"] }} @@ -21,6 +21,8 @@ div @click="deleteGame(g,$event)" ) | {{ g.score }} + p(v-else) + | {{ st.tr["No games found :( Send a challenge!"] }} </template> <script> @@ -157,6 +159,10 @@ export default { </script> <style lang="sass" scoped> +p + text-align: center + font-weight: bold + // NOTE: the style applied to <tr> element doesn't work tr.my-turn > td background-color: #fcd785 diff --git a/client/src/translations/en.js b/client/src/translations/en.js index 9a938055..e16a6a3a 100644 --- a/client/src/translations/en.js +++ b/client/src/translations/en.js @@ -76,6 +76,8 @@ export const translations = { "New game": "New game", "New problem": "New problem", News: "News", + "No challenges found :( Click on 'New game'!": "No challenges found :( Click on 'New game'!", + "No games found :( Send a challenge!": "No games found :( Send a challenge!", "No more problems": "No more problems", "No subject. Send anyway?": "No subject. Send anyway?", "Notifications by email": "Notifications by email", diff --git a/client/src/translations/es.js b/client/src/translations/es.js index c6c7f083..38d90227 100644 --- a/client/src/translations/es.js +++ b/client/src/translations/es.js @@ -76,6 +76,8 @@ export const translations = { "New game": "Nueva partida", "New problem": "Nuevo problema", News: "Noticias", + "No challenges found :( Click on 'New game'!": "No se encontró ningún desafÃo :( ¡Haz clic en 'Nueva partida'!", + "No games found :( Send a challenge!": "No se encontró partidas :( ¡EnvÃa un desafÃo!", "No more problems": "No mas problemas", "No subject. Send anyway?": "Sin asunto. ¿Enviar sin embargo?", "Notifications by email": "Notificaciones por email", diff --git a/client/src/translations/fr.js b/client/src/translations/fr.js index b8724685..4460097b 100644 --- a/client/src/translations/fr.js +++ b/client/src/translations/fr.js @@ -76,6 +76,8 @@ export const translations = { "New game": "Nouvelle partie", "New problem": "Nouveau problème", News: "Nouvelles", + "No challenges found :( Click on 'New game'!": "Aucun défi trouvé :( Cliquez sur 'Nouvelle partie' !", + "No games found :( Send a challenge!": "Aucune partie trouvée :( Envoyez un défi !", "No more problems": "Plus de problèmes", "No subject. Send anyway?": "Pas de sujet. Envoyer quand-même ??", "Notifications by email": "Notifications par email", -- 2.44.0