Skip to content

Commit 511302a

Browse files
committed
frontend: fix naming of recovery file
1 parent 625df4a commit 511302a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

frontend/src/components/RecoveryDataComponent.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function saveRecoveryData(secret: Uint8Array, email: string) {
2626
const url = URL.createObjectURL(file);
2727
a.href = url;
2828
a.target = "_blank";
29-
a.download = `${email.replaceAll(".", "_").replaceAll("@", "_at_")}_my_warp_charger_com_recovery_data`;
29+
a.download = `${email.replaceAll(".", "_").replaceAll("@", "_at_")}_${origin.replace("https://", "").replace(".", "_")}_recovery_data`;
3030
document.body.appendChild(a);
3131
a.click()
3232
URL.revokeObjectURL(url);
@@ -52,8 +52,8 @@ export function RecoveryDataComponent(props: RecoveryDataProps) {
5252
<Modal.Body>
5353
<p className="mb-3">{t("save_recovery_data_text")}</p>
5454
<div className="mb-3">
55-
<Button
56-
variant="primary"
55+
<Button
56+
variant="primary"
5757
size="lg"
5858
className="w-100"
5959
onClick={() => {
@@ -76,8 +76,8 @@ export function RecoveryDataComponent(props: RecoveryDataProps) {
7676
</Modal.Body>
7777

7878
<Modal.Footer>
79-
<Button
80-
variant={saved.value && confirmed.value ? "primary" : "secondary"}
79+
<Button
80+
variant={saved.value && confirmed.value ? "primary" : "secondary"}
8181
disabled={!saved.value || !confirmed.value}
8282
onClick={() => {
8383
if (saved.value && confirmed.value) {

0 commit comments

Comments
 (0)