Browse Source

disable login when already login

thomas 3 years ago
parent
commit
acee16d1ce
2 changed files with 6 additions and 3 deletions
  1. 5 2
      src/components/GoogleLogin.vue
  2. 1 1
      src/components/UIClient.vue

+ 5 - 2
src/components/GoogleLogin.vue

@@ -16,11 +16,14 @@ import { getLoginMessageByGoogleIdToken } from '../assets/js/__message-util';
 @Component
 export default class GoogleLogin extends Vue {
   @Prop() public connection;
+  @Prop() public session;
   idToken: string = ''
 
   loginDisabled(){
-    if ( this.idToken == null ) return true;
-    return this.idToken == null || this.connection.socketId == null
+    if ( this.idToken == null ) return true
+    if ( this.connection.socketId == null ) return true
+    if ( this.session.ucpId != null ) return true
+    return false
   }
 
   mounted(){

+ 1 - 1
src/components/UIClient.vue

@@ -15,7 +15,7 @@
     </div>
 
   <div class="cards">
-    <google-login class="card" :connection="connection" @loginAction="loginAction">
+    <google-login class="card" :session="session" :connection="connection" @loginAction="loginAction">
 
     </google-login>
     <div class="card">