From dba7c66a276e4f24f0e70ef4fad9883575ede7e1 Mon Sep 17 00:00:00 2001
From: callebtc <93376500+callebtc@users.noreply.github.com>
Date: Wed, 26 Apr 2023 21:29:35 +0200
Subject: [PATCH] layout
---
src/components/WelcomeDialog.vue | 81 ++++++++++++++++++--------------
src/stores/mints.js | 31 +++++++-----
2 files changed, 67 insertions(+), 45 deletions(-)
diff --git a/src/components/WelcomeDialog.vue b/src/components/WelcomeDialog.vue
index ede51923..8636e59e 100644
--- a/src/components/WelcomeDialog.vue
+++ b/src/components/WelcomeDialog.vue
@@ -1,5 +1,12 @@
-
+
@@ -8,7 +15,8 @@
/>
Cashu walletCashu.me
+ wallet
@@ -36,22 +44,15 @@
will lose your tokens. Press the Backup button to download a copy of
your tokens.
-
- Restore wallet backupUpload wallet backup
-
-
- You can drag & drop the wallet backup file here!
-
-
-
+
+
+
Install Cashu
- Copy URL
-
RestoreYou can drag & drop the wallet backup here!
+
diff --git a/src/stores/mints.js b/src/stores/mints.js
index b021719a..1f62362c 100644
--- a/src/stores/mints.js
+++ b/src/stores/mints.js
@@ -168,24 +168,33 @@ export const useMintsStore = defineStore("mints", {
}
notifySuccess("Mint removed.");
},
- restoreFromBackup: function(backup) {
- if(!backup || !backup["cashu.welcomeDialogSeen"])
- {
+ restoreFromBackup: function (backup) {
+ if (!backup || !backup["cashu.welcomeDialogSeen"]) {
notifyError("Unrecognized Backup Format!");
- }
- else
- {
- localStorage.setItem("cashu.welcomeDialogSeen", backup["cashu.welcomeDialogSeen"]);
+ } else {
+ localStorage.setItem(
+ "cashu.welcomeDialogSeen",
+ backup["cashu.welcomeDialogSeen"]
+ );
localStorage.setItem("cashu.theme", backup["cashu.theme"]);
localStorage.setItem("cashu.mints", backup["cashu.mints"]);
localStorage.setItem("cashu.keysets", backup["cashu.keysets"]);
localStorage.setItem("cashu.keys", backup["cashu.keys"]);
localStorage.setItem("cashu.proofs", backup["cashu.proofs"]);
- localStorage.setItem("cashu.historyTokens", backup["cashu.historyTokens"]);
- localStorage.setItem("cashu.activeMintUrl", backup["cashu.activeMintUrl"]);
- localStorage.setItem("cashu.activeProofs", backup["cashu.activeProofs"]);
+ localStorage.setItem(
+ "cashu.historyTokens",
+ backup["cashu.historyTokens"]
+ );
+ localStorage.setItem(
+ "cashu.activeMintUrl",
+ backup["cashu.activeMintUrl"]
+ );
+ localStorage.setItem(
+ "cashu.activeProofs",
+ backup["cashu.activeProofs"]
+ );
- notifySuccess("Backup Successfully Restored!");
+ notifySuccess("Backup successfully restored!");
}
},
assertMintError: function (response, verbose = true) {