From fbca9b06c35d448dc303e259d83981372a08bc8f Mon Sep 17 00:00:00 2001 From: nivedin Date: Tue, 5 Dec 2023 22:00:26 +0530 Subject: [PATCH] chore: add open app link --- .../src/components/embeds/index.vue | 14 ++++++++++++-- packages/hoppscotch-common/src/pages/e/_id.vue | 9 ++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/packages/hoppscotch-common/src/components/embeds/index.vue b/packages/hoppscotch-common/src/components/embeds/index.vue index b7640e8ed..54902b959 100644 --- a/packages/hoppscotch-common/src/components/embeds/index.vue +++ b/packages/hoppscotch-common/src/components/embeds/index.vue @@ -10,7 +10,11 @@ to="/" />
- +
@@ -96,7 +100,6 @@
- {{ tab.document.response }}
@@ -122,6 +125,8 @@ const toast = useToast() const props = defineProps<{ modelTab: HoppTab + properties: string[] + sharedRequestID: string }>() const tab = useModel(props, "modelTab") @@ -134,6 +139,11 @@ const requestCancelFunc: Ref<(() => void) | null> = ref(null) const loading = ref(false) +const baseURL = import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh" +const sharedRequestURL = computed(() => { + return `${baseURL}/r/${props.sharedRequestID}` +}) + const methods = [ "GET", "POST", diff --git a/packages/hoppscotch-common/src/pages/e/_id.vue b/packages/hoppscotch-common/src/pages/e/_id.vue index c899cd0bc..0c5294acb 100644 --- a/packages/hoppscotch-common/src/pages/e/_id.vue +++ b/packages/hoppscotch-common/src/pages/e/_id.vue @@ -1,6 +1,11 @@ @@ -28,6 +33,7 @@ const route = useRoute() const sharedRequestID = ref("") const invalidLink = ref(false) +const properties = ref([]) const sharedRequestDetails = useGQLQuery< ResolveShortcodeQuery, @@ -81,6 +87,7 @@ watch( applySetting("BG_COLOR", "system") } console.log("properties", JSON.parse(data.right.shortcode.properties)) + properties.value = parsedProperties.options } } }