From 076a8b8f925e856f27fecfd1beaa0dac44a283a1 Mon Sep 17 00:00:00 2001 From: hay-kot Date: Tue, 11 May 2021 20:35:03 -0800 Subject: [PATCH] add copy tooltip --- .../src/components/Recipe/ContextMenu.vue | 2 +- .../components/UI/Buttons/TheCopyButton.vue | 68 +++++++++++++++++++ .../Admin/ManageUsers/TheSignUpTable.vue | 9 +-- 3 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 frontend/src/components/UI/Buttons/TheCopyButton.vue diff --git a/frontend/src/components/Recipe/ContextMenu.vue b/frontend/src/components/Recipe/ContextMenu.vue index 25cb8c8a0..ca7a40c80 100644 --- a/frontend/src/components/Recipe/ContextMenu.vue +++ b/frontend/src/components/Recipe/ContextMenu.vue @@ -129,7 +129,7 @@ export default { }, async downloadJson() { const recipe = await api.recipes.requestDetails(this.slug); - this.downloadString(JSON.stringify(recipe, "", 4), "text/json", recipe.slug+'.json'); + this.downloadString(JSON.stringify(recipe, "", 4), "text/json", recipe.slug + ".json"); }, downloadString(text, fileType, fileName) { let blob = new Blob([text], { type: fileType }); diff --git a/frontend/src/components/UI/Buttons/TheCopyButton.vue b/frontend/src/components/UI/Buttons/TheCopyButton.vue new file mode 100644 index 000000000..a91dcb682 --- /dev/null +++ b/frontend/src/components/UI/Buttons/TheCopyButton.vue @@ -0,0 +1,68 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/pages/Admin/ManageUsers/TheSignUpTable.vue b/frontend/src/pages/Admin/ManageUsers/TheSignUpTable.vue index 21138a520..6610935c2 100644 --- a/frontend/src/pages/Admin/ManageUsers/TheSignUpTable.vue +++ b/frontend/src/pages/Admin/ManageUsers/TheSignUpTable.vue @@ -70,11 +70,7 @@