chore: add open app link

This commit is contained in:
nivedin
2023-12-05 22:00:26 +05:30
committed by Andrew Bastin
parent bb0bf35164
commit fbca9b06c3
2 changed files with 20 additions and 3 deletions

View File

@@ -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",