Add unambiguous section in the PGN + some fixes + code formatting and fix typos
[vchess.git] / client / src / App.vue
index caf91a9..ed8d152 100644 (file)
@@ -24,8 +24,7 @@
               router-link(to="/problems")
                 | {{ st.tr["Problems"] }}
             #rightMenu
-              .clickable(onClick="window.doClick('modalUser')")
-                | {{ st.user.id > 0 ? (st.user.name || "@nonymous") : "Login" }}
+              .clickable(onClick="window.doClick('modalUser')") {{ userName }}
               #divSettings.clickable(onClick="window.doClick('modalSettings')")
                 span {{ st.tr["Settings"] }}
                 img(src="/images/icons/settings.svg")
@@ -72,6 +71,15 @@ export default {
       }
     );
   },
+  computed: {
+    userName: function() {
+      return (
+        this.st.user.id > 0
+          ? (this.st.user.name || "@nonymous")
+          : "Login"
+      );
+    }
+  },
   methods: {
     hideDrawer: function(e) {
       e.preventDefault(); //TODO: why is this needed?