-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bot-release-readme-update
- Loading branch information
Showing
41 changed files
with
2,010 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# List of approved files that can be changed by a bot via an automated PR | ||
# This is to increase security and prevent accidentally updating files that shouldn't be changed by a bot | ||
src/frontend/src/flows/dappsExplorer/dapps.json |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"en": { | ||
"title_possibly_wrong_rp_id": "Please try again", | ||
"message_possibly_wrong_rp_id_1": "The wrong domain was set for the passkey and the browser couldn't find it.", | ||
"message_possibly_wrong_rp_id_2": "Try again and another domain will be used." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { DynamicKey } from "$src/i18n"; | ||
import { html } from "lit-html"; | ||
|
||
export const infoToastTemplate = ({ | ||
title, | ||
messages, | ||
}: { | ||
title: string | DynamicKey; | ||
messages: string[] | DynamicKey[]; | ||
}) => html` | ||
<h3 class="t-title c-card__title">${title}</h3> | ||
${messages.map( | ||
(message) => | ||
html`<p data-role="info-message" class="t-paragraph">${message}</p>` | ||
)} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"en": { | ||
"title": "Add Current Device", | ||
"paragraph": "Please add the current device to your identity to improve the user experience with Internet Identity.", | ||
"skip": "Skip", | ||
"add": "Add", | ||
"label_icon": "Recommended Action" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { infoScreenTemplate } from "$src/components/infoScreen"; | ||
import { I18n } from "$src/i18n"; | ||
import { renderPage } from "$src/utils/lit-html"; | ||
import { TemplateResult } from "lit-html"; | ||
import copyJson from "./addCurrentDevice.json"; | ||
|
||
const addCurrentDeviceTemplate = ({ | ||
add, | ||
skip, | ||
i18n, | ||
}: { | ||
add: () => void; | ||
skip: () => void; | ||
i18n: I18n; | ||
}): TemplateResult => { | ||
const copy = i18n.i18n(copyJson); | ||
|
||
return infoScreenTemplate({ | ||
cancel: skip, | ||
cancelText: copy.skip, | ||
next: add, | ||
nextText: copy.add, | ||
title: copy.title, | ||
paragraph: copy.paragraph, | ||
scrollToTop: true, | ||
icon: "info", | ||
pageId: "add-current-device", | ||
label: copy.label_icon, | ||
}); | ||
}; | ||
|
||
export const addCurrentDevicePage = renderPage(addCurrentDeviceTemplate); | ||
|
||
// Prompt the user to add the current device (with the current origin). | ||
// Adding the current device to the current origin improves the UX of the user when they come back to this origin. | ||
export const addCurrentDevice = (): Promise<{ | ||
action: "skip" | "add-current-device"; | ||
}> => { | ||
return new Promise((resolve) => | ||
addCurrentDevicePage({ | ||
i18n: new I18n(), | ||
add: () => resolve({ action: "add-current-device" }), | ||
skip: () => resolve({ action: "skip" }), | ||
}) | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.