Skip to content

Commit

Permalink
Removing legal text for signed in users
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinrivero committed Nov 20, 2024
1 parent 0fd8344 commit ffb98b5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
8 changes: 8 additions & 0 deletions acrobat/blocks/verb-widget/verb-widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
padding: 19px;
}

.verb-widget.signed-in {
min-height: 560px;
}

.verb-widget.ready {
color: initial;
}
Expand Down Expand Up @@ -72,6 +76,10 @@
justify-content: center;
}

.verb-widget.signed-in .verb-footer {
display: none;
}

.verb-footer a {
text-decoration: underline;
}
Expand Down
22 changes: 12 additions & 10 deletions acrobat/blocks/verb-widget/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,21 @@ export default async function init(element) {
element.append(widget, footer);
}

// Redirect after IMS:Ready
window.addEventListener('IMS:Ready', () => {
if (window.adobeIMS.isSignedInUser()
&& window.adobeIMS.getAccountType() !== 'type1') {
redDir(VERB);
function checkSignedInUser() {
if (window.adobeIMS?.isSignedInUser?.()) {
element.classList.add('signed-in');
if (window.adobeIMS.getAccountType() !== 'type1') {
redDir(VERB);
}
}
});
// Race Condition
if (window.adobeIMS?.isSignedInUser()
&& window.adobeIMS?.getAccountType() !== 'type1') {
redDir(VERB);
}

// Race the condition
checkSignedInUser();

// Redirect after IMS:Ready
window.addEventListener('IMS:Ready', checkSignedInUser);

// Analytics
verbAnalytics('landing:shown', VERB);

Expand Down

0 comments on commit ffb98b5

Please sign in to comment.