diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue
index b448d4124..b128074d7 100644
--- a/src/views/AccountViewView.vue
+++ b/src/views/AccountViewView.vue
@@ -91,16 +91,13 @@
{{ activeDid }}
+ Copied!
- Copied!
{{ publicBase64 }}
- Copied!
+ Copied!
{{ publicHex }}
- Copied!
+ Copied!
{{ derivationPath }}
- Copied!
+ Copied!
@@ -323,37 +312,19 @@ export default class AccountViewView extends Vue {
limits: RateLimits | null = null;
showContactGives = false;
- did = false;
- derpath = false;
- base64 = false;
- pubhex = false;
-
- copy = useClipboard().copy;
- text = useClipboard().text;
-
- showCopyMessage() {
- this.did = true;
- }
-
- st(f) {
- setTimeout(f, 2000);
+ showDidCopy = false;
+ showDerCopy = false;
+ showB64Copy = false;
+ showPubCopy = false;
+
+ // call fn, copy text to the clipboard, then redo fn after 2 seconds
+ doCopyTwoSecRedo(text, fn) {
+ fn();
+ useClipboard()
+ .copy(text)
+ .then(() => setTimeout(fn, 2000));
}
- copyText = (e: MouseEvent, inputText: string, loc: string) => {
- console.log(this);
- console.log(e, inputText);
- this.copy(inputText).then(() => {
- if (loc == "did") {
- this.showCopyMessage();
- console.log(this);
- } else if (loc == "base64") {
- this.base64 = true;
- } else if (loc == "pubhex") {
- this.pubhex = true;
- }
- });
- };
-
handleChange() {
this.showContactGives = !this.showContactGives;
this.updateShowContactAmounts();