More intuitive variants-by-name page
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 13 Apr 2021 08:59:07 +0000 (10:59 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 13 Apr 2021 08:59:07 +0000 (10:59 +0200)
client/src/views/VariantList.vue
server/db/populate.sql

index 5f23010..60e553d 100644 (file)
@@ -36,7 +36,7 @@ export default {
       );
       const variants = this.st.variants
         .filter(v => {
       );
       const variants = this.st.variants
         .filter(v => {
-          return v.name.startsWith(capitalizedPrefix);
+          return v.display.startsWith(capitalizedPrefix);
         })
         .map(v => {
           return {
         })
         .map(v => {
           return {
@@ -46,7 +46,7 @@ export default {
           };
         })
         .sort((a, b) => {
           };
         })
         .sort((a, b) => {
-          return a.name.localeCompare(b.name);
+          return a.display.localeCompare(b.display);
         });
       return variants;
     }
         });
       return variants;
     }
index c55a1b8..d4f6b0c 100644 (file)
@@ -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'),
   ('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'),
   ('Emergo', 'Stacking Checkers variant', 28, 'Emergo'),
   ('Empire', 'Empire versus Kingdom', 5, 'Empire Chess'),
   ('Enpassant', 'Capture en passant', 10, 'En-passant'),