Update some TODOs
[vchess.git] / public / javascripts / components / room.js
index 16fcc90..38eb9f9 100644 (file)
@@ -8,6 +8,8 @@ div(role="dialog" aria-labelledby="newGameTxt")
                p= translations["Waiting for opponent..."]
 */
 
+// TODO: si on est en train de jouer une partie, le notifier aux nouveaux connectés
+
 /*
 Players + challenges : == "room" home of variant (surligner si nouveau défi perso et pas affichage courant)
 joueurs en ligne (dte),
@@ -57,7 +59,7 @@ fin de partie corr: garder maxi nbPlayers lastMove sur serveur, pendant 7 jours
                        if (mode=="human" && !oppId)
                        {
                                const storageVariant = localStorage.getItem("variant");
-                               if (!!storageVariant && storageVariant !== variant
+                               if (!!storageVariant && storageVariant !== variant.name
                                        && localStorage["score"] == "*")
                                {
                                        return alert(translations["Finish your "] +
@@ -82,7 +84,7 @@ fin de partie corr: garder maxi nbPlayers lastMove sur serveur, pendant 7 jours
                                if (!!storageVariant)
                                {
                                        const score = localStorage.getItem(prefix+"score");
-                                       if (storageVariant !== variant && score == "*")
+                                       if (storageVariant !== variant.name && score == "*")
                                        {
                                                if (!confirm(storageVariant +
                                                        translations[": unfinished computer game will be erased"]))
@@ -98,7 +100,7 @@ fin de partie corr: garder maxi nbPlayers lastMove sur serveur, pendant 7 jours
                                if (!!storageVariant)
                                {
                                        const score = localStorage.getItem(prefix+"score");
-                                       if (storageVariant !== variant && score == "*")
+                                       if (storageVariant !== variant.name && score == "*")
                                        {
                                                if (!confirm(storageVariant +
                                                        translations[": current analysis will be erased"]))