From: Benjamin Auder Date: Wed, 4 Mar 2020 11:13:01 +0000 (+0100) Subject: Allow hyphen in username on server side + add icons for navigation X-Git-Url: https://git.auder.net/variants/current/doc/css/img/pieces/index.css?a=commitdiff_plain;h=b9a5fe01da415dfbea740651c04e6e10dace2c21;p=vchess.git Allow hyphen in username on server side + add icons for navigation --- diff --git a/TODO b/TODO index 1c5f4a6b..9fec5b71 100644 --- a/TODO +++ b/TODO @@ -10,6 +10,11 @@ And remove current "notify through newmove" on server in sockets.js Analyse mode when launched from a position: should keep orientation --> $route query param, "side=w or b" +Subcursor (intra move) for multi-move variants for better navigation (in BaseGame) + +Allow symmetric mode in all variants (vertical symmetry for racing kings) +flag in challenge, "Symmetric: true / false", option of GenRandInitFen() + # Misc: Saw once a "double challenge" bug, one anonymous and a second one logged Both were asked a challenge probably, and both challenges added as different ones. @@ -20,4 +25,13 @@ https://www.chessvariants.com/rules/8-piece-chess Eightpieces : non-symmetric Sym8pieces : symmetric (960) +Generator vatiant, called "Matrix" ? +Peces on first rank never move but generate new pieces. Pawn don't generate. +A generator captured and replaced by a similar piece does not generate. +King does not generate. No castling. En passant possible? +Goal is still checkmate. + +Take(a)n(d)make : if capture a piece, take its power for the last of the turn and make a move like it. +If a pawn taken: direction of the capturer. + + Maxima, Interweave, Roccoco, Dynamo, Synchrone, Cannibal (force captures) diff --git a/client/public/images/icons/SOURCE b/client/public/images/icons/SOURCE new file mode 100644 index 00000000..ee8510e7 --- /dev/null +++ b/client/public/images/icons/SOURCE @@ -0,0 +1,8 @@ +https://www.onlinewebfonts.com/icon/519460 +https://www.onlinewebfonts.com/icon/322704 +https://www.flaticon.com/free-icon/play_254434?term=play&page=1&position=1 +https://www.flaticon.com/free-icon/fast-forward_660276?term=fast%20forward&page=1&position=7 + +# Unused for now: +https://www.flaticon.com/free-icon/resize_512182?term=resize&page=1&position=49 +https://www.flaticon.com/free-icon/undo_725004?term=undo&page=1&position=4 diff --git a/client/public/images/icons/fast-forward.svg b/client/public/images/icons/fast-forward.svg new file mode 100644 index 00000000..411b157c --- /dev/null +++ b/client/public/images/icons/fast-forward.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/public/images/icons/fast-forward_rev.svg b/client/public/images/icons/fast-forward_rev.svg new file mode 100644 index 00000000..6d4728d1 --- /dev/null +++ b/client/public/images/icons/fast-forward_rev.svg @@ -0,0 +1,100 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/client/public/images/icons/flip.svg b/client/public/images/icons/flip.svg new file mode 100644 index 00000000..be39895c --- /dev/null +++ b/client/public/images/icons/flip.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file diff --git a/client/public/images/icons/play.svg b/client/public/images/icons/play.svg new file mode 100644 index 00000000..d34a3680 --- /dev/null +++ b/client/public/images/icons/play.svg @@ -0,0 +1,10 @@ + + + + + + + diff --git a/client/public/images/icons/play_rev.svg b/client/public/images/icons/play_rev.svg new file mode 100644 index 00000000..8d562e90 --- /dev/null +++ b/client/public/images/icons/play_rev.svg @@ -0,0 +1,52 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/client/public/images/icons/resize.svg b/client/public/images/icons/resize.svg new file mode 100644 index 00000000..a6edd50a --- /dev/null +++ b/client/public/images/icons/resize.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/client/public/images/settings.svg b/client/public/images/icons/settings.svg similarity index 100% rename from client/public/images/settings.svg rename to client/public/images/icons/settings.svg diff --git a/client/public/images/icons/undo.svg b/client/public/images/icons/undo.svg new file mode 100644 index 00000000..3ab78b89 --- /dev/null +++ b/client/public/images/icons/undo.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/client/src/App.vue b/client/src/App.vue index b98618bf..18425c0d 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -28,7 +28,7 @@ | {{ st.user.id > 0 ? (st.user.name || "@nonymous") : "Login" }} #divSettings.clickable(onClick="window.doClick('modalSettings')") span {{ st.tr["Settings"] }} - img(src="/images/settings.svg") + img(src="/images/icons/settings.svg") router-view .row .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index ed75c003..2a1a4474 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -23,11 +23,16 @@ div#baseGame ) #turnIndicator(v-if="showTurn") {{ turn }} #controls - button(@click="gotoBegin()") << - button(@click="undo()") < - button(v-if="canFlip" @click="flip()") ⇅ - button(@click="play()") > - button(@click="gotoEnd()") >> + button(@click="gotoBegin()") + img.inline(src="/images/icons/fast-forward_rev.svg") + button(@click="undo()") + img.inline(src="/images/icons/play_rev.svg") + button(v-if="canFlip" @click="flip()") + img.inline(src="/images/icons/flip.svg") + button(@click="play()") + img.inline(src="/images/icons/play.svg") + button(@click="gotoEnd()") + img.inline(src="/images/icons/fast-forward.svg") #belowControls #downloadDiv(v-if="allowDownloadPGN") a#download(href="#") @@ -504,10 +509,17 @@ export default { #controls margin: 0 auto text-align: center + display: flex button display: inline-block width: 20% margin: 0 + img.inline + height: 24px + padding-top: 5px + @media screen and (max-width: 767px) + img.inline + height: 18px #turnIndicator text-align: center diff --git a/server/models/User.js b/server/models/User.js index 5117c175..3b888502 100644 --- a/server/models/User.js +++ b/server/models/User.js @@ -20,7 +20,7 @@ const UserModel = checkNameEmail: function(o) { return ( - (!o.name || o.name.match(/^[\w]+$/)) && + (!o.name || o.name.match(/^[\w-]+$/)) && (!o.email || o.email.match(/^[\w.+-]+@[\w.+-]+$/)) ); },