Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button fails to render after users signs out #22

Open
tomklino opened this issue Sep 13, 2020 · 0 comments
Open

Button fails to render after users signs out #22

tomklino opened this issue Sep 13, 2020 · 0 comments

Comments

@tomklino
Copy link

I have a login button integrated within a dialog, this will show up with options to login, the google sign in button is one of them.

I also have the sign-out button, the will only appear if the user is signed in with google.

After using the sign out button - the login dialog closes, and after opening the login dialog again, the google sign-in button no longer appears.

There's no v-if condition on the button element, or any element that contains it.

Important to mention, right after signing out, before the dialog fully closes, the button still appears, and even changes from "signed in" to "sign in", but after the dialog closes, opening it again will not render the button.

Tested in FireFox and Chrome

The dialog code for reference:

<v-dialog
    v-model="loginDialogOpened"
    width="500">
    <v-card width="500">
      <v-card-title>{{ loginString }}</v-card-title>
      <v-card-text v-if="!isLoggedIn() && loginAsAdmin">
        <v-text-field
          v-model="devadminPassword"
          type="password"
          label="password"></v-text-field>
      </v-card-text>
      <v-card-text v-if="!isLoggedIn()">
        <v-btn large color="grey"
          @click="loginAsAdmin = true;"
          >Login As Admin
        </v-btn>
      </v-card-text>
      <v-card-text>
        <GoogleLogin
          :params="googleParams"
          :renderParams="googleRenderParams"
          :onSuccess="googleOnSuccess"
          :onFailure="googleOnFailure"
        >Login</GoogleLogin>
      </v-card-text>
      <v-card-text v-if="isLoggedIn() && withGoogle">
        <GoogleLogin
          :logoutButton="true"
          :params="googleParams"
          :onSuccess="googleLogoutOnSuccess"
          :onFailure="googleLogoutOnFailure"
        >Logout</GoogleLogin>
      </v-card-text>
      <v-card-actions>
        <v-btn large color="green"
          v-if="!isLoggedIn()"
          @click="login"
          >Submit
        </v-btn>
        <v-btn large color="grey"
          v-if="isLoggedIn()"
          @click="logout">
          Logout
        </v-btn>
      </v-card-actions>
    </v-card>
  </v-dialog>

The dialog - before signing in:
image

After signing in:
image

After signing out:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant