Compare commits

..

4 Commits

Author SHA1 Message Date
jamesgeorge007
019c2cec46 refactor: remove unnecessary check for slot contents 2023-12-12 14:26:13 +05:30
Liyas Thomas
40b9508361 chore: use template wrapper for slot 2023-12-12 14:26:13 +05:30
Liyas Thomas
85285a5204 fix: search input height 2023-12-12 14:26:13 +05:30
Liyas Thomas
c0c0c37a67 chore: improve placeholder component styles 2023-12-12 14:26:13 +05:30
7 changed files with 25 additions and 33 deletions

View File

@@ -105,11 +105,9 @@ const requestCancelFunc: Ref<(() => void) | null> = ref(null)
const loading = ref(false)
const shortcodeBaseURL =
import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
const baseURL = import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
const sharedRequestURL = computed(() => {
return `${shortcodeBaseURL}/r/${props.sharedRequestID}`
return `${baseURL}/r/${props.sharedRequestID}`
})
const { subscribeToStream } = useStreamSubscriber()

View File

@@ -3,7 +3,7 @@
<div
class="sticky top-0 z-10 flex flex-shrink-0 flex-col overflow-x-auto border-b border-dividerLight bg-primary"
>
<WorkspaceCurrent :section="t('tab.history')" :is-only-personal="true" />
<WorkspaceCurrent :section="t('tab.history')" />
<div class="flex">
<input
v-model="filterText"

View File

@@ -180,18 +180,6 @@
class="input mb-2 !bg-primaryContrast"
@keyup.enter="hide()"
/>
<HoppSmartItem
ref="saveRequestAction"
:label="`${t('request.save_as')}`"
:icon="IconFolderPlus"
@click="
() => {
showSaveRequestModal = true
hide()
}
"
/>
<hr />
<HoppSmartItem
ref="copyRequestAction"
:label="t('request.share_request')"
@@ -204,6 +192,18 @@
}
"
/>
<hr />
<HoppSmartItem
ref="saveRequestAction"
:label="`${t('request.save_as')}`"
:icon="IconFolderPlus"
@click="
() => {
showSaveRequestModal = true
hide()
}
"
/>
</div>
</template>
</tippy>

View File

@@ -370,11 +370,10 @@ const linkVariants: LinkVariant[] = [
},
]
const shortcodeBaseURL =
import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
const baseURL = import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
const copyEmbed = () => {
return `<iframe src="${shortcodeBaseURL}/e/${props.request?.id}" title="Hoppscotch Embed" style="width: 100%; height: 480px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.1);"></iframe>`
return `<iframe src="${baseURL}/e/${props.request?.id}' style='width: 100%; height: 500px; border: 0; border-radius: 4px; overflow: hidden;'></iframe>`
}
const copyButton = (
@@ -391,18 +390,18 @@ const copyButton = (
}
if (type === "markdown") {
return `[![Run in Hoppscotch](${shortcodeBaseURL}/${badge})](${shortcodeBaseURL}/r/${props.request?.id})`
return `[![Run in Hoppscotch](${baseURL}/${badge})](${baseURL}/r/${props.request?.id})`
}
return `<a href="${shortcodeBaseURL}/r/${props.request?.id}"><img src="${shortcodeBaseURL}/${badge}" alt="Run in Hoppscotch" /></a>`
return `<a href="${baseURL}/r/${props.request?.id}"><img src="${baseURL}/${badge}" alt="Run in Hoppscotch" /></a>`
}
const copyLink = (variationID: string) => {
if (variationID === "link1") {
return `${shortcodeBaseURL}/r/${props.request?.id}`
return `${baseURL}/r/${props.request?.id}`
} else if (variationID === "link2") {
return `<a href="${shortcodeBaseURL}/r/${props.request?.id}">Run in Hoppscotch</a>`
return `<a href="${baseURL}/r/${props.request?.id}">Run in Hoppscotch</a>`
}
return `[Run in Hoppscotch](${shortcodeBaseURL}/r/${props.request?.id})`
return `[Run in Hoppscotch](${baseURL}/r/${props.request?.id})`
}
const copyContent = ({

View File

@@ -13,7 +13,7 @@
>
<HoppButtonSecondary
v-tippy="{ theme: 'tooltip' }"
to="https://docs.hoppscotch.io/documentation/features/share-requests"
to="https://docs.hoppscotch.io/documentation/features/shared-request"
blank
:title="t('app.wiki')"
:icon="IconHelpCircle"

View File

@@ -21,12 +21,7 @@ const props = defineProps<{
label?: string | undefined
}>()
const shortcodeBaseURL =
import.meta.env.VITE_SHORTCODE_BASE_URL ?? "https://hopp.sh"
const text = computed(() => {
return props.label
? t(props.label)
: `${shortcodeBaseURL}/r/${props.link ?? "xxxx"}`
return props.label ? t(props.label) : `hopp.sh/r/${props.link ?? "xxxx"}`
})
</script>

View File

@@ -2,7 +2,7 @@
<HoppSmartLink
:to="to"
:blank="blank"
class="relative inline-flex items-center justify-center whitespace-nowrap py-2 font-semibold transition focus:outline-none focus-visible:bg-accentDark"
class="button-primary relative inline-flex items-center justify-center whitespace-nowrap py-2 font-semibold transition focus:outline-none focus-visible:bg-accentDark"
:exact="exact"
:class="[
color