chore: add open app link
This commit is contained in:
@@ -10,7 +10,11 @@
|
||||
to="/"
|
||||
/>
|
||||
<div class="flex">
|
||||
<HoppSmartItem :label="t('app.open_in_hoppscotch')" />
|
||||
<HoppSmartItem
|
||||
:label="t('app.open_in_hoppscotch')"
|
||||
:to="sharedRequestURL"
|
||||
blank
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -96,7 +100,6 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ tab.document.response }}
|
||||
<HttpResponse :document="tab.document" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -122,6 +125,8 @@ const toast = useToast()
|
||||
|
||||
const props = defineProps<{
|
||||
modelTab: HoppTab<HoppRESTDocument>
|
||||
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",
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div class="flex flex-col flex-1 w-full">
|
||||
<Embeds v-if="tab" v-model:modelTab="tab" />
|
||||
<Embeds
|
||||
v-if="tab"
|
||||
v-model:modelTab="tab"
|
||||
:properties="properties"
|
||||
:shared-request-i-d="sharedRequestID"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user