From: Benjamin Auder Date: Tue, 13 Apr 2021 08:59:07 +0000 (+0200) Subject: More intuitive variants-by-name page X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/css/doc/html/%7B%7B%20targetUrl%20%7D%7D?a=commitdiff_plain;h=f20f96397f8cc89e369974d7cb10d1d12ebfe71b;p=vchess.git More intuitive variants-by-name page --- diff --git a/client/src/views/VariantList.vue b/client/src/views/VariantList.vue index 5f230107..60e553d2 100644 --- a/client/src/views/VariantList.vue +++ b/client/src/views/VariantList.vue @@ -36,7 +36,7 @@ export default { ); const variants = this.st.variants .filter(v => { - return v.name.startsWith(capitalizedPrefix); + return v.display.startsWith(capitalizedPrefix); }) .map(v => { return { @@ -46,7 +46,7 @@ export default { }; }) .sort((a, b) => { - return a.name.localeCompare(b.name); + return a.display.localeCompare(b.display); }); return variants; } diff --git a/server/db/populate.sql b/server/db/populate.sql index c55a1b8b..d4f6b0c5 100644 --- a/server/db/populate.sql +++ b/server/db/populate.sql @@ -63,7 +63,7 @@ insert or ignore into Variants (name, description, groupe, display) values ('Doublemove1', 'Double moves (v1)', 24, 'Doublemove 1'), ('Doublemove2', 'Double moves (v2)', 24, 'Doublemove 2'), ('Dynamo', 'Push and pull', 11, 'Dynamo'), - ('Eightpieces', 'Each piece is unique', 7, '8 pieces'), + ('Eightpieces', 'Each piece is unique', 7, '8-Pieces'), ('Emergo', 'Stacking Checkers variant', 28, 'Emergo'), ('Empire', 'Empire versus Kingdom', 5, 'Empire Chess'), ('Enpassant', 'Capture en passant', 10, 'En-passant'),