Skip to content

Commit

Permalink
Continue with another device copy changes (#1758)
Browse files Browse the repository at this point in the history
Copy changes for the happy path when pressing the
"continue with another device" button on the landing page.

Includes a change to always prompt the anchor pickor with
additional text.

The error message has not been changed, since it is used in
multiple places and would first need to be split.
  • Loading branch information
Frederik Rothenberger authored Jul 28, 2023
1 parent 2bd8ff1 commit ee27c9f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
13 changes: 6 additions & 7 deletions src/frontend/src/components/authenticateBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,12 @@ const page = (slot: TemplateResult) => {
// Register this device as a new device with the anchor
const asNewDevice = async (connection: Connection, userNumber?: bigint) => {
// Prompt the user for an anchor (only used if we don't know the anchor already)
const askUserNumber = async () => {
const askUserNumber = async (userNumber?: bigint) => {
const result = await promptUserNumber({
title: "Add a Trusted Device",
message: "What’s your Internet Identity?",
title: "Continue with another device",
message:
"Is this your first time connecting to Internet Identity on this device? In the next steps, you will add this device as an Internet Identity passkey. Do you wish to continue?",
userNumber,
});
if (result === "canceled") {
// TODO L2-309: do this without reload
Expand All @@ -346,8 +348,5 @@ const asNewDevice = async (connection: Connection, userNumber?: bigint) => {
return result;
};

return registerTentativeDevice(
userNumber ?? (await askUserNumber()),
connection
);
return registerTentativeDevice(await askUserNumber(userNumber), connection);
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@ const deviceRegistrationDisabledInfoTemplate = ({
}) => {
const pageContentSlot = html` <article>
<hgroup>
<h1 class="t-title t-title--main">Continue with another device</h1>
<h1 class="t-title t-title--main">Add this device as a passkey</h1>
<p class="t-lead">
If this is your first time connecting to Internet Identity on this
device, follow these steps to continue:
</p>
</hgroup>
<ol class="c-list c-list--numbered l-stack">
<li>
Connect to
<strong class="t-strong">${LEGACY_II_URL_NO_PROTOCOL}</strong> on your
other device using Internet Identity
<strong class="t-strong">${userNumber}</strong>
Connect to ${LEGACY_II_URL_NO_PROTOCOL} on a recognized device using
Internet Identity ${userNumber}
</li>
<li>
Once you are connected, select “<strong class="t-string"
>Add a new passkey</strong
>
</li>
</ol>
<p class="t-paragraph t-strong">Then, press Retry below.</p>
<p class="t-paragraph">
Then, press <strong class="t-strong">Refresh</strong> below.
</p>
<div class="l-stack">
<button
id="deviceRegModeDisabledRetry"
class="c-button"
@click=${() => retry()}
>
Retry
Refresh
</button>
<button
id="deviceRegModeDisabledCancel"
Expand Down

0 comments on commit ee27c9f

Please sign in to comment.