Browse Source

more rework

Nikolay Suslov 4 years ago
parent
commit
a2d8af6a42
3 changed files with 26 additions and 12 deletions
  1. 11 11
      public/helpers.js
  2. 1 1
      public/index.html
  3. 14 0
      public/vwf/view/editor-new.js

+ 11 - 11
public/helpers.js

@@ -372,19 +372,19 @@ class Helpers {
     authUser(alias, pass){
 
         _LCSDB.user().auth(alias, pass
-            //     , function(ack) {
+                , function(ack) {
     
-            //     if (ack.err) {
-            //         new Noty({
-            //             text: ack.err,
-            //             timeout: 2000,
-            //             theme: 'mint',
-            //             layout: 'bottomRight',
-            //             type: 'error'
-            //         }).show();
+                if (ack.err) {
+                    new Noty({
+                        text: ack.err,
+                        timeout: 2000,
+                        theme: 'mint',
+                        layout: 'bottomRight',
+                        type: 'error'
+                    }).show();
     
-            //     }
-             //}
+                }
+             }
              );
 
     }

+ 1 - 1
public/index.html

@@ -20,7 +20,7 @@ Copyright (c) 2014-2018 Nikolai Suslov and the Krestianstvo.org project contribu
 
     <link href="/lib/noty/noty.css" rel="stylesheet">
     <link href="/lib/noty/themes/mint.css" rel="stylesheet">
-    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
+   <!-- <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet"> --> 
     <link rel="stylesheet" href="/lib/mdc/dist/material-components-web.min.css">
     <link rel="stylesheet" type="text/css" href="/vwf/model/aframe/addon/virtualgc/virtual-gamepad-controls.css" />
     <link rel="stylesheet" type="text/css" href="/lib/index.css" />

+ 14 - 0
public/vwf/view/editor-new.js

@@ -60,6 +60,20 @@ define([
             }
             );
 
+            _LCSDB.on('auth', function (ack) {
+                if (ack.sea.pub) {
+                    _app.helpers.checkUserCollision();
+
+                    console.log(_LCSDB.user().is);
+                    let loadSave = document.querySelector('#loadSaveSettings');
+                    if(loadSave){
+                       
+                    }
+                    //self.authGUI();
+                }
+                
+            });
+
             this.avatarCardDef = function (src, desc, onclickfunc) {
 
                 return {