From ca36ea63dd99cd53b875ef2d43ffd2e528438670 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Sun, 12 Nov 2023 12:43:50 +0100 Subject: [PATCH 1/5] fix: updated DOIBadge component and various other fixes/updates --- app/Providers/AppServiceProvider.php | 6 +- resources/js/Mixins/Global.js | 12 ++-- resources/js/Pages/Project/Show.vue | 4 +- resources/js/Pages/Public/Project/Dataset.vue | 20 ++++--- resources/js/Pages/Public/Project/Files.vue | 4 +- resources/js/Pages/Public/Project/Layout.vue | 13 ++--- resources/js/Pages/Public/Project/Samples.vue | 6 +- resources/js/Pages/Public/Project/Show.vue | 15 ++++- resources/js/Pages/Public/Project/Study.vue | 50 +++++----------- resources/js/Shared/Citation.vue | 2 +- resources/js/Shared/DOIBadge.vue | 57 +++++++++++++++++++ 11 files changed, 122 insertions(+), 67 deletions(-) create mode 100644 resources/js/Shared/DOIBadge.vue diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 5eab1ffb..a83c403d 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -26,8 +26,8 @@ public function register() */ public function boot() { - // if ($this->app->environment('production')) { - // \URL::forceScheme('https'); - // } + if ($this->app->environment('production')) { + \URL::forceScheme('https'); + } } } diff --git a/resources/js/Mixins/Global.js b/resources/js/Mixins/Global.js index bcf2084f..09a896dc 100644 --- a/resources/js/Mixins/Global.js +++ b/resources/js/Mixins/Global.js @@ -74,13 +74,15 @@ export default { return str; }, - copyToClipboard(text, id) { - document.getElementById(id).select(); - copyText(text, undefined, (error, event) => { + copyToClipboard(text, element) { + if (typeof element == "string") { + document.getElementById(id).select(); + } else { + element.select(); + } + copyText(text, undefined, (error) => { if (error) { console.log(error); - } else { - // console.log(event) } }); }, diff --git a/resources/js/Pages/Project/Show.vue b/resources/js/Pages/Project/Show.vue index 3a90d71c..4f0426ac 100644 --- a/resources/js/Pages/Project/Show.vue +++ b/resources/js/Pages/Project/Show.vue @@ -306,7 +306,7 @@ v-if="project.identifier" class="text-gray-400 mt-2" > - +
- +
@@ -97,7 +100,7 @@
-
+

- +
@@ -338,6 +340,7 @@ import ProjectLayout from "@/Pages/Public/Project/Layout.vue"; import { ShareIcon, ClipboardDocumentIcon } from "@heroicons/vue/24/solid"; import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue"; import SpectraViewer from "@/Shared/SpectraViewer.vue"; +import DOIBadge from "@/Shared/DOIBadge.vue"; export default { components: { @@ -349,6 +352,7 @@ export default { MenuItem, MenuItems, SpectraViewer, + DOIBadge, }, props: ["project", "tab", "study", "dataset"], data() { diff --git a/resources/js/Pages/Public/Project/Files.vue b/resources/js/Pages/Public/Project/Files.vue index 8d248053..e94d0af1 100644 --- a/resources/js/Pages/Public/Project/Files.vue +++ b/resources/js/Pages/Public/Project/Files.vue @@ -1,7 +1,9 @@