render()

in src/nodes/server/hf-hub-login.ts [59:81]


  render() {
    // The UI rendered here will be projected into its preview panel UI.
    if (this.oauthResult === undefined || this.oauthResult === false) {
      return html`<div class="card">
        <img
          src="https://huggingface.co/datasets/huggingface/badges/resolve/main/sign-in-with-huggingface-xl-dark.svg"
          alt="Sign in with Hugging Face"
          style="cursor: pointer;"
          ${this.buttonvisible ? "" : "hidden"}
          @click="${this._login}"
        />
      </div>`;
    } else if (this.oauthResult && typeof this.oauthResult === "object") {
      return html` <div class="card">
        Hello
        <!-- <img src="${this.oauthResult.userInfo
          .avatarUrl}" alt="User Picture" /> -->
        ${this.oauthResult.userInfo.name}, you are logged in
        <button @click="${this._logout}">Logout</button>
      </div>`;
    }
    return html`<div class="card">Loading...</div>`;
  }