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

Show User Info #68

Merged
merged 2 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,16 @@ async function getSubscriberToken(reference, password) {

app.get('/', async (req, res) => {
let token
let user
if (req.session && req.session.token) {
token = req.session.token
user = req.session.user
}

res.render('index', {
host,
token: token,
user: user,
fabricApiUrl: fabricApiUrl,
destination: process.env.DEFAULT_DESTINATION,
firebaseConfig: FIREBASE_CONFIG,
Expand Down
19 changes: 19 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@
<div class="row py-3">
<!-- Connect options -->
<div class="col-12 col-md-4">
<% if (user) { %>
<div class="card">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to have an id to hook into for the playwright selector. We can use this card for the await on login to ensure that login was successful

<div class="card-header">User Info</div>
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item">email: <%= user.email %></li>
<li class="list-group-item">First Name: <%= user.first_name %></li>
<li class="list-group-item">Last Name: <%= user.last_name %></li>
<li class="list-group-item">Display Name: <%= user.display_name %></li>
<li class="list-group-item">Job Title: <%= user.job_title %></li>
<li class="list-group-item">Time Zone: <%= user.time_zone %></li>
<li class="list-group-item">Ccountry: <%= user.country %></li>
<li class="list-group-item">Region: <%= user.region %></li>
<li class="list-group-item">Company Name: <%= user.company_name %></li>
</ul>
</div>
</div>
<% } %>

<div id="callConsole" class="card">
<div class="card-body">
<h5>Connect</h5>
Expand Down