Compare commits

..

1 Commits

Author SHA1 Message Date
Liyas Thomas
7517446f79 chore: add protocols' logo to realtime page 2023-12-12 14:21:35 +05:30
47 changed files with 438 additions and 512 deletions

View File

@@ -17,10 +17,9 @@
v-if="isEmpty(shortcutsResults)"
:text="`${t('state.nothing_found')} ‟${filterText}”`"
>
<template #icon>
<icon-lucide-search class="svg-icons opacity-75" />
</template>
<icon-lucide-search class="svg-icons pb-2 opacity-75" />
</HoppSmartPlaceholder>
<details
v-for="(sectionResults, sectionTitle) in shortcutsResults"
v-else

View File

@@ -49,15 +49,13 @@
:text="`${t('state.nothing_found')} ‟${search}”`"
>
<template #icon>
<icon-lucide-search class="svg-icons opacity-75" />
</template>
<template #body>
<HoppButtonSecondary
:label="t('action.clear')"
outline
@click="search = ''"
/>
<icon-lucide-search class="svg-icons pb-2 opacity-75" />
</template>
<HoppButtonSecondary
:label="t('action.clear')"
outline
@click="search = ''"
/>
</HoppSmartPlaceholder>
</div>
<div

View File

@@ -254,7 +254,7 @@
:text="`${t('state.nothing_found')}${filterText}`"
>
<template #icon>
<icon-lucide-search class="svg-icons opacity-75" />
<icon-lucide-search class="svg-icons pb-2 opacity-75" />
</template>
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
@@ -263,29 +263,27 @@
:alt="`${t('empty.collections')}`"
:text="t('empty.collections')"
>
<template #body>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("collection.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
@click="emit('display-modal-import-export')"
/>
<HoppButtonSecondary
:icon="IconPlus"
:label="t('add.new')"
filled
outline
@click="emit('display-modal-add')"
/>
</div>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("collection.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
@click="emit('display-modal-import-export')"
/>
<HoppButtonSecondary
:icon="IconPlus"
:label="t('add.new')"
filled
outline
@click="emit('display-modal-add')"
/>
</div>
</template>
</div>
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-else-if="node.data.type === 'collections'"
@@ -293,20 +291,18 @@
:alt="`${t('empty.collections')}`"
:text="t('empty.collections')"
>
<template #body>
<HoppButtonSecondary
:label="t('add.new')"
filled
outline
@click="
node.data.type === 'collections' &&
emit('add-folder', {
path: node.id,
folder: node.data.data.data,
})
"
/>
</template>
<HoppButtonSecondary
:label="t('add.new')"
filled
outline
@click="
node.data.type === 'collections' &&
emit('add-folder', {
path: node.id,
folder: node.data.data.data,
})
"
/>
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-else-if="node.data.type === 'folders'"

View File

@@ -274,37 +274,33 @@
:text="t('empty.collections')"
@drop.stop
>
<template #body>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("collection.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
:disabled="hasNoTeamAccess"
:title="hasNoTeamAccess ? t('team.no_access') : ''"
@click="
hasNoTeamAccess
? null
: emit('display-modal-import-export')
"
/>
<HoppButtonSecondary
:icon="IconPlus"
:label="t('add.new')"
filled
outline
:disabled="hasNoTeamAccess"
:title="hasNoTeamAccess ? t('team.no_access') : ''"
@click="hasNoTeamAccess ? null : emit('display-modal-add')"
/>
</div>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("collection.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
:disabled="hasNoTeamAccess"
:title="hasNoTeamAccess ? t('team.no_access') : ''"
@click="
hasNoTeamAccess ? null : emit('display-modal-import-export')
"
/>
<HoppButtonSecondary
:icon="IconPlus"
:label="t('add.new')"
filled
outline
:disabled="hasNoTeamAccess"
:title="hasNoTeamAccess ? t('team.no_access') : ''"
@click="hasNoTeamAccess ? null : emit('display-modal-add')"
/>
</div>
</template>
</div>
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-else-if="node.data.type === 'collections'"
@@ -313,20 +309,18 @@
:text="t('empty.collections')"
@drop.stop
>
<template #body>
<HoppButtonSecondary
:label="t('add.new')"
filled
outline
@click="
node.data.type === 'collections' &&
emit('add-folder', {
path: node.id,
folder: node.data.data.data,
})
"
/>
</template>
<HoppButtonSecondary
:label="t('add.new')"
filled
outline
@click="
node.data.type === 'collections' &&
emit('add-folder', {
path: node.id,
folder: node.data.data.data,
})
"
/>
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-else-if="node.data.type === 'folders'"

View File

@@ -180,18 +180,16 @@
:alt="`${t('empty.collection')}`"
:text="t('empty.collection')"
>
<template #body>
<HoppButtonSecondary
:label="t('add.new')"
filled
outline
@click="
emit('add-folder', {
path: `${collectionIndex}`,
})
"
/>
</template>
<HoppButtonSecondary
:label="t('add.new')"
filled
outline
@click="
emit('add-folder', {
path: `${collectionIndex}`,
})
"
/>
</HoppSmartPlaceholder>
</div>
</div>

View File

@@ -176,7 +176,8 @@
:src="`/images/states/${colorMode.value}/pack.svg`"
:alt="`${t('empty.folder')}`"
:text="t('empty.folder')"
/>
>
</HoppSmartPlaceholder>
</div>
</div>
<HoppSmartConfirmModal

View File

@@ -11,7 +11,7 @@
type="search"
autocomplete="off"
:placeholder="t('action.search')"
class="flex w-full bg-transparent px-4 py-2 h-8"
class="!border-0 bg-transparent py-2 pl-4 pr-2"
/>
<div
class="flex flex-1 flex-shrink-0 justify-between border-y border-dividerLight bg-primary"
@@ -66,36 +66,34 @@
:alt="`${t('empty.collections')}`"
:text="t('empty.collections')"
>
<template #body>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("collection.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
@click="displayModalImportExport(true)"
/>
<HoppButtonSecondary
:label="t('add.new')"
filled
outline
:icon="IconPlus"
@click="displayModalAdd(true)"
/>
</div>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("collection.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
@click="displayModalImportExport(true)"
/>
<HoppButtonSecondary
:label="t('add.new')"
filled
outline
:icon="IconPlus"
@click="displayModalAdd(true)"
/>
</div>
</template>
</div>
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-if="!(filteredCollections.length !== 0 || collections.length === 0)"
:text="`${t('state.nothing_found')}${filterText}`"
>
<template #icon>
<icon-lucide-search class="svg-icons opacity-75" />
<icon-lucide-search class="svg-icons pb-2 opacity-75" />
</template>
</HoppSmartPlaceholder>
<CollectionsGraphqlAdd

View File

@@ -22,7 +22,7 @@
v-model="filterTexts"
type="search"
autocomplete="off"
class="flex w-full bg-transparent px-4 py-2 h-8"
class="flex w-full bg-transparent px-4 py-2"
:placeholder="t('action.search')"
:disabled="collectionsType.type === 'team-collections'"
/>

View File

@@ -11,9 +11,7 @@
v-if="!currentInterceptorSupportsCookies"
:text="t('cookies.modal.interceptor_no_support')"
>
<template #body>
<AppInterceptor class="rounded border border-dividerLight p-2" />
</template>
<AppInterceptor class="rounded border border-dividerLight p-2" />
</HoppSmartPlaceholder>
<div v-else class="flex flex-col">
<div
@@ -40,7 +38,8 @@
:alt="`${t('cookies.modal.empty_domains')}`"
:text="t('cookies.modal.empty_domains')"
class="mt-6"
/>
>
</HoppSmartPlaceholder>
<div
v-for="[domain, entries] in workingCookieJar.entries()"
v-else

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

@@ -93,12 +93,20 @@
}
"
/>
<HoppSmartPlaceholder
<div
v-if="myEnvironments.length === 0"
:src="`/images/states/${colorMode.value}/blockchain.svg`"
:alt="`${t('empty.environments')}`"
:text="t('empty.environments')"
/>
class="flex flex-col items-center justify-center text-secondaryLight"
>
<img
:src="`/images/states/${colorMode.value}/blockchain.svg`"
loading="lazy"
class="mb-2 inline-flex h-16 w-16 flex-col object-contain object-center"
:alt="`${t('empty.environments')}`"
/>
<span class="pb-2 text-center">
{{ t("empty.environments") }}
</span>
</div>
</HoppSmartTab>
<HoppSmartTab
:id="'team-environments'"
@@ -132,12 +140,20 @@
}
"
/>
<HoppSmartPlaceholder
<div
v-if="teamEnvironmentList.length === 0"
:src="`/images/states/${colorMode.value}/blockchain.svg`"
:alt="`${t('empty.environments')}`"
:text="t('empty.environments')"
/>
class="flex flex-col items-center justify-center text-secondaryLight"
>
<img
:src="`/images/states/${colorMode.value}/blockchain.svg`"
loading="lazy"
class="mb-2 inline-flex h-16 w-16 flex-col object-contain object-center"
:alt="`${t('empty.environments')}`"
/>
<span class="pb-2 text-center">
{{ t("empty.environments") }}
</span>
</div>
</div>
<div
v-if="!teamListLoading && teamAdapterError"

View File

@@ -78,13 +78,11 @@
:alt="`${t('empty.environments')}`"
:text="t('empty.environments')"
>
<template #body>
<HoppButtonSecondary
:label="`${t('add.new')}`"
filled
@click="addEnvironmentVariable"
/>
</template>
<HoppButtonSecondary
:label="`${t('add.new')}`"
filled
@click="addEnvironmentVariable"
/>
</HoppSmartPlaceholder>
</div>
</div>

View File

@@ -38,29 +38,27 @@
:alt="`${t('empty.environments')}`"
:text="t('empty.environments')"
>
<template #body>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("environment.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
@click="displayModalImportExport(true)"
/>
<HoppButtonSecondary
:icon="IconPlus"
:label="`${t('add.new')}`"
filled
outline
@click="displayModalAdd(true)"
/>
</div>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("environment.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
@click="displayModalImportExport(true)"
/>
<HoppButtonSecondary
:icon="IconPlus"
:label="`${t('add.new')}`"
filled
outline
@click="displayModalAdd(true)"
/>
</div>
</template>
</div>
</HoppSmartPlaceholder>
<EnvironmentsMyDetails
:show="showModalDetails"

View File

@@ -81,20 +81,18 @@
:alt="`${t('empty.environments')}`"
:text="t('empty.environments')"
>
<template #body>
<HoppButtonSecondary
v-if="isViewer"
disabled
:label="`${t('add.new')}`"
filled
/>
<HoppButtonSecondary
v-else
:label="`${t('add.new')}`"
filled
@click="addEnvironmentVariable"
/>
</template>
<HoppButtonSecondary
v-if="isViewer"
disabled
:label="`${t('add.new')}`"
filled
/>
<HoppButtonSecondary
v-else
:label="`${t('add.new')}`"
filled
@click="addEnvironmentVariable"
/>
</HoppSmartPlaceholder>
</div>
</div>

View File

@@ -49,33 +49,31 @@
:alt="`${t('empty.environments')}`"
:text="t('empty.environments')"
>
<template #body>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("environment.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
:title="isTeamViewer ? t('team.no_access') : ''"
:disabled="isTeamViewer"
@click="isTeamViewer ? null : displayModalImportExport(true)"
/>
<HoppButtonSecondary
:label="`${t('add.new')}`"
filled
outline
:icon="IconPlus"
:title="isTeamViewer ? t('team.no_access') : ''"
:disabled="isTeamViewer"
@click="isTeamViewer ? null : displayModalAdd(true)"
/>
</div>
<div class="flex flex-col items-center space-y-4">
<span class="text-center text-secondaryLight">
{{ t("environment.import_or_create") }}
</span>
<div class="flex flex-col items-stretch gap-4">
<HoppButtonPrimary
:icon="IconImport"
:label="t('import.title')"
filled
outline
:title="isTeamViewer ? t('team.no_access') : ''"
:disabled="isTeamViewer"
@click="isTeamViewer ? null : displayModalImportExport(true)"
/>
<HoppButtonSecondary
:label="`${t('add.new')}`"
filled
outline
:icon="IconPlus"
:title="isTeamViewer ? t('team.no_access') : ''"
:disabled="isTeamViewer"
@click="isTeamViewer ? null : displayModalAdd(true)"
/>
</div>
</template>
</div>
</HoppSmartPlaceholder>
<div v-else-if="!loading">
<EnvironmentsTeamsEnvironment

View File

@@ -120,16 +120,14 @@
:alt="`${t('empty.authorization')}`"
:text="t('empty.authorization')"
>
<template #body>
<HoppButtonSecondary
outline
:label="t('app.documentation')"
to="https://docs.hoppscotch.io/documentation/features/authorization"
blank
:icon="IconExternalLink"
reverse
/>
</template>
<HoppButtonSecondary
outline
:label="t('app.documentation')"
to="https://docs.hoppscotch.io/documentation/features/authorization"
blank
:icon="IconExternalLink"
reverse
/>
</HoppSmartPlaceholder>
<div v-else class="flex flex-1 border-b border-dividerLight">
<div class="w-2/3 border-r border-dividerLight">

View File

@@ -162,14 +162,12 @@
:alt="`${t('empty.headers')}`"
:text="t('empty.headers')"
>
<template #body>
<HoppButtonSecondary
:label="`${t('add.new')}`"
filled
:icon="IconPlus"
@click="addHeader"
/>
</template>
<HoppButtonSecondary
:label="`${t('add.new')}`"
filled
:icon="IconPlus"
@click="addHeader"
/>
</HoppSmartPlaceholder>
</div>
</template>

View File

@@ -20,7 +20,8 @@
:src="`/images/states/${colorMode.value}/add_comment.svg`"
:alt="`${t('empty.documentation')}`"
:text="t('empty.documentation')"
/>
>
</HoppSmartPlaceholder>
<div v-else>
<div
class="sticky top-0 z-10 flex flex-shrink-0 overflow-x-auto bg-primary"
@@ -29,7 +30,7 @@
v-model="graphqlFieldsFilterText"
type="search"
autocomplete="off"
class="flex w-full bg-transparent px-4 py-2 h-8"
class="flex w-full bg-transparent px-4 py-2"
:placeholder="`${t('action.search')}`"
/>
<div class="flex">

View File

@@ -3,13 +3,13 @@
<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"
type="search"
autocomplete="off"
class="flex w-full bg-transparent px-4 py-2 h-8"
class="flex w-full bg-transparent px-4 py-2"
:placeholder="`${t('action.search')}`"
/>
<div class="flex">
@@ -114,7 +114,8 @@
:src="`/images/states/${colorMode.value}/history.svg`"
:alt="`${t('empty.history')}`"
:text="t('empty.history')"
/>
>
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-else-if="
Object.keys(filteredHistoryGroups).length === 0 ||
@@ -123,20 +124,18 @@
:text="`${t('state.nothing_found')} ‟${filterText || filterSelection}”`"
>
<template #icon>
<icon-lucide-search class="svg-icons opacity-75" />
</template>
<template #body>
<HoppButtonSecondary
:label="t('action.clear')"
outline
@click="
() => {
filterText = ''
filterSelection = 'ALL'
}
"
/>
<icon-lucide-search class="svg-icons pb-2 opacity-75" />
</template>
<HoppButtonSecondary
:label="t('action.clear')"
outline
@click="
() => {
filterText = ''
filterSelection = 'ALL'
}
"
/>
</HoppSmartPlaceholder>
<HoppSmartConfirmModal
:show="confirmRemove"

View File

@@ -119,16 +119,14 @@
:alt="`${t('empty.authorization')}`"
:text="t('empty.authorization')"
>
<template #body>
<HoppButtonSecondary
outline
:label="t('app.documentation')"
to="https://docs.hoppscotch.io/documentation/features/authorization"
blank
:icon="IconExternalLink"
reverse
/>
</template>
<HoppButtonSecondary
outline
:label="t('app.documentation')"
to="https://docs.hoppscotch.io/documentation/features/authorization"
blank
:icon="IconExternalLink"
reverse
/>
</HoppSmartPlaceholder>
<div v-else class="flex flex-1 border-b border-dividerLight">
<div class="w-2/3 border-r border-dividerLight">

View File

@@ -112,16 +112,14 @@
:alt="`${t('empty.body')}`"
:text="t('empty.body')"
>
<template #body>
<HoppButtonSecondary
outline
:label="`${t('app.documentation')}`"
to="https://docs.hoppscotch.io/documentation/getting-started/rest/uploading-data"
blank
:icon="IconExternalLink"
reverse
/>
</template>
<HoppButtonSecondary
outline
:label="`${t('app.documentation')}`"
to="https://docs.hoppscotch.io/documentation/getting-started/rest/uploading-data"
blank
:icon="IconExternalLink"
reverse
/>
</HoppSmartPlaceholder>
</div>
</template>

View File

@@ -158,14 +158,12 @@
:alt="`${t('empty.body')}`"
:text="t('empty.body')"
>
<template #body>
<HoppButtonSecondary
:label="`${t('add.new')}`"
filled
:icon="IconPlus"
@click="addBodyParam"
/>
</template>
<HoppButtonSecondary
:label="`${t('add.new')}`"
filled
:icon="IconPlus"
@click="addBodyParam"
/>
</HoppSmartPlaceholder>
</div>
</template>

View File

@@ -61,7 +61,7 @@
:text="`${t('state.nothing_found')}${searchQuery}`"
>
<template #icon>
<icon-lucide-search class="svg-icons opacity-75" />
<icon-lucide-search class="svg-icons pb-2 opacity-75" />
</template>
</HoppSmartPlaceholder>
</div>

View File

@@ -209,14 +209,12 @@
:alt="`${t('empty.headers')}`"
:text="t('empty.headers')"
>
<template #body>
<HoppButtonSecondary
filled
:label="`${t('add.new')}`"
:icon="IconPlus"
@click="addHeader"
/>
</template>
<HoppButtonSecondary
filled
:label="`${t('add.new')}`"
:icon="IconPlus"
@click="addHeader"
/>
</HoppSmartPlaceholder>
</div>
</div>

View File

@@ -157,14 +157,12 @@
:alt="`${t('empty.parameters')}`"
:text="t('empty.parameters')"
>
<template #body>
<HoppButtonSecondary
:label="`${t('add.new')}`"
:icon="IconPlus"
filled
@click="addParam"
/>
</template>
<HoppButtonSecondary
:label="`${t('add.new')}`"
:icon="IconPlus"
filled
@click="addParam"
/>
</HoppSmartPlaceholder>
</div>
</div>

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

@@ -37,9 +37,7 @@
:text="t('helpers.network_fail')"
large
>
<template #body>
<AppInterceptor class="rounded border border-dividerLight p-2" />
</template>
<AppInterceptor class="rounded border border-dividerLight p-2" />
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-if="response.type === 'script_fail'"
@@ -49,14 +47,12 @@
:text="t('helpers.script_fail')"
large
>
<template #body>
<div
class="mt-2 w-full overflow-auto whitespace-normal rounded bg-primaryLight px-4 py-2 font-mono text-red-400"
>
{{ response.error.name }}: {{ response.error.message }}<br />
{{ response.error.stack }}
</div>
</template>
<div
class="mt-2 w-full overflow-auto whitespace-normal rounded bg-primaryLight px-4 py-2 font-mono text-red-400"
>
{{ response.error.name }}: {{ response.error.message }}<br />
{{ response.error.stack }}
</div>
</HoppSmartPlaceholder>
<div
v-if="response.type === 'success' || response.type === 'fail'"

View File

@@ -159,7 +159,8 @@
:alt="`${t('error.test_script_fail')}`"
:heading="t('error.test_script_fail')"
:text="t('helpers.test_script_fail')"
/>
>
</HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-else
:src="`/images/states/${colorMode.value}/validation.svg`"
@@ -167,16 +168,15 @@
:heading="t('empty.tests')"
:text="t('helpers.tests')"
>
<template #body>
<HoppButtonSecondary
outline
:label="`${t('action.learn_more')}`"
to="https://docs.hoppscotch.io/documentation/getting-started/rest/tests"
blank
:icon="IconExternalLink"
reverse
/>
</template>
<HoppButtonSecondary
outline
:label="`${t('action.learn_more')}`"
to="https://docs.hoppscotch.io/documentation/getting-started/rest/tests"
blank
:icon="IconExternalLink"
reverse
class="my-4"
/>
</HoppSmartPlaceholder>
<EnvironmentsMyDetails
:show="showMyEnvironmentDetailsModal"

View File

@@ -149,14 +149,12 @@
:alt="`${t('empty.body')}`"
:text="t('empty.body')"
>
<template #body>
<HoppButtonSecondary
filled
:label="`${t('add.new')}`"
:icon="IconPlus"
@click="addUrlEncodedParam"
/>
</template>
<HoppButtonSecondary
filled
:label="`${t('add.new')}`"
:icon="IconPlus"
@click="addUrlEncodedParam"
/>
</HoppSmartPlaceholder>
</div>
</div>

View File

@@ -5,57 +5,55 @@
:heading="t('error.network_fail')"
large
>
<template #body>
<div class="my-1 flex flex-col items-center text-secondaryLight">
<span>
{{ t("error.please_install_extension") }}
</span>
<span>
{{ t("error.check_how_to_add_origin") }}
<HoppSmartLink
blank
to="https://docs.hoppscotch.io/documentation/features/interceptor#browser-extension"
class="text-accent hover:text-accentDark"
>
here
</HoppSmartLink>
</span>
<div class="my-1 flex flex-col items-center text-secondaryLight">
<span>
{{ t("error.please_install_extension") }}
</span>
<span>
{{ t("error.check_how_to_add_origin") }}
<HoppSmartLink
blank
to="https://docs.hoppscotch.io/documentation/features/interceptor#browser-extension"
class="text-accent hover:text-accentDark"
>
here
</HoppSmartLink>
</span>
</div>
<div class="flex flex-col space-y-2 py-4">
<span>
<HoppSmartItem
to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
blank
:icon="IconChrome"
label="Chrome"
:info-icon="hasChromeExtInstalled ? IconCheckCircle : null"
:active-info-icon="hasChromeExtInstalled"
outline
/>
</span>
<span>
<HoppSmartItem
to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
blank
:icon="IconFirefox"
label="Firefox"
:info-icon="hasFirefoxExtInstalled ? IconCheckCircle : null"
:active-info-icon="hasFirefoxExtInstalled"
outline
/>
</span>
</div>
<div class="space-y-4 py-4">
<div class="flex items-center">
<HoppSmartToggle
:on="extensionEnabled"
@change="extensionEnabled = !extensionEnabled"
>
{{ t("settings.extensions_use_toggle") }}
</HoppSmartToggle>
</div>
<div class="flex flex-col space-y-2 py-4">
<span>
<HoppSmartItem
to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
blank
:icon="IconChrome"
label="Chrome"
:info-icon="hasChromeExtInstalled ? IconCheckCircle : null"
:active-info-icon="hasChromeExtInstalled"
outline
/>
</span>
<span>
<HoppSmartItem
to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
blank
:icon="IconFirefox"
label="Firefox"
:info-icon="hasFirefoxExtInstalled ? IconCheckCircle : null"
:active-info-icon="hasFirefoxExtInstalled"
outline
/>
</span>
</div>
<div class="space-y-4 py-4">
<div class="flex items-center">
<HoppSmartToggle
:on="extensionEnabled"
@change="extensionEnabled = !extensionEnabled"
>
{{ t("settings.extensions_use_toggle") }}
</HoppSmartToggle>
</div>
</div>
</template>
</div>
</HoppSmartPlaceholder>
</template>

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"
@@ -32,12 +32,10 @@
:alt="`${t('empty.shared_requests_logout')}`"
:text="`${t('empty.shared_requests_logout')}`"
>
<template #body>
<HoppButtonPrimary
:label="t('auth.login')"
@click="invokeAction('modals.login.toggle')"
/>
</template>
<HoppButtonPrimary
:label="t('auth.login')"
@click="invokeAction('modals.login.toggle')"
/>
</HoppSmartPlaceholder>
<template v-else-if="sharedRequests.length">

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

@@ -60,7 +60,7 @@
:text="`${t('state.nothing_found')}${searchQuery}`"
>
<template #icon>
<icon-lucide-search class="svg-icons opacity-75" />
<icon-lucide-search class="svg-icons pb-2 opacity-75" />
</template>
</HoppSmartPlaceholder>
</div>

View File

@@ -45,17 +45,15 @@
:alt="`${t('empty.members')}`"
:text="t('empty.members')"
>
<template #body>
<HoppButtonSecondary
:icon="IconUserPlus"
:label="t('team.invite')"
@click="
() => {
emit('invite-team')
}
"
/>
</template>
<HoppButtonSecondary
:icon="IconUserPlus"
:label="t('team.invite')"
@click="
() => {
emit('invite-team')
}
"
/>
</HoppSmartPlaceholder>
<div v-else class="divide-y divide-dividerLight">
<div

View File

@@ -125,7 +125,8 @@
pendingInvites.data.right.team?.teamInvitations.length === 0
"
:text="t('empty.pending_invites')"
/>
>
</HoppSmartPlaceholder>
<div
v-if="!pendingInvites.loading && E.isLeft(pendingInvites.data)"
class="flex flex-col items-center p-4"
@@ -244,13 +245,11 @@
:alt="`${t('empty.invites')}`"
:text="`${t('empty.invites')}`"
>
<template #body>
<HoppButtonSecondary
:label="t('add.new')"
filled
@click="addNewInvitee"
/>
</template>
<HoppButtonSecondary
:label="t('add.new')"
filled
@click="addNewInvitee"
/>
</HoppSmartPlaceholder>
</div>
<div

View File

@@ -16,13 +16,11 @@
:alt="`${t('empty.teams')}`"
:text="`${t('empty.teams')}`"
>
<template #body>
<HoppButtonSecondary
:label="`${t('team.create_new')}`"
filled
@click="displayModalAdd(true)"
/>
</template>
<HoppButtonSecondary
:label="`${t('team.create_new')}`"
filled
@click="displayModalAdd(true)"
/>
</HoppSmartPlaceholder>
<div
v-else-if="!loading"

View File

@@ -21,15 +21,13 @@
:alt="`${t('empty.teams')}`"
:text="`${t('empty.teams')}`"
>
<template #body>
<HoppButtonSecondary
:label="t('team.create_new')"
filled
outline
:icon="IconPlus"
@click="displayModalAdd(true)"
/>
</template>
<HoppButtonSecondary
:label="t('team.create_new')"
filled
outline
:icon="IconPlus"
@click="displayModalAdd(true)"
/>
</HoppSmartPlaceholder>
<div v-else-if="!loading" class="flex flex-col">
<div

View File

@@ -14,12 +14,10 @@
:alt="`${t('empty.profile')}`"
:text="`${t('empty.profile')}`"
>
<template #body>
<HoppButtonPrimary
:label="t('auth.login')"
@click="invokeAction('modals.login.toggle')"
/>
</template>
<HoppButtonPrimary
:label="t('auth.login')"
@click="invokeAction('modals.login.toggle')"
/>
</HoppSmartPlaceholder>
<div v-else class="space-y-8">
<div

View File

@@ -142,14 +142,12 @@
:alt="`${t('empty.subscription')}`"
:text="`${t('empty.subscription')}`"
>
<template #body>
<HoppButtonSecondary
:label="t('mqtt.new')"
filled
outline
@click="showSubscriptionModal(true)"
/>
</template>
<HoppButtonSecondary
:label="t('mqtt.new')"
filled
outline
@click="showSubscriptionModal(true)"
/>
</HoppSmartPlaceholder>
<div v-else>
<div

View File

@@ -197,16 +197,14 @@
:alt="`${t('socketio.connection_not_authorized')}`"
:text="`${t('socketio.connection_not_authorized')}`"
>
<template #body>
<HoppButtonSecondary
outline
:label="t('app.documentation')"
to="https://docs.hoppscotch.io/documentation/features/authorization"
blank
:icon="IconExternalLink"
reverse
/>
</template>
<HoppButtonSecondary
outline
:label="t('app.documentation')"
to="https://docs.hoppscotch.io/documentation/features/authorization"
blank
:icon="IconExternalLink"
reverse
/>
</HoppSmartPlaceholder>
<div
v-if="authType === 'Bearer'"

View File

@@ -163,7 +163,8 @@
:src="`/images/states/${colorMode.value}/add_category.svg`"
:alt="`${t('empty.protocols')}`"
:text="`${t('empty.protocols')}`"
/>
>
</HoppSmartPlaceholder>
</HoppSmartTab>
</HoppSmartTabs>
</template>

View File

@@ -117,13 +117,7 @@
alt="No invites"
text="No invites"
>
<template #body>
<HoppButtonSecondary
label="Add new"
filled
@click="addNewMember"
/>
</template>
<HoppButtonSecondary label="Add new" filled @click="addNewMember" />
</HoppSmartPlaceholder>
</div>
<div

View File

@@ -15,17 +15,15 @@
v-if="team?.teamMembers?.length === 0"
text="No members in this team. Add members to this team to collaborate"
>
<template #body>
<HoppButtonSecondary
:icon="IconUserPlus"
:label="t('teams.add_members')"
@click="
() => {
showInvite = !showInvite;
}
"
/>
</template>
<HoppButtonSecondary
:icon="IconUserPlus"
:label="t('teams.add_members')"
@click="
() => {
showInvite = !showInvite;
}
"
/>
</HoppSmartPlaceholder>
<div v-else class="divide-y divide-dividerLight">
<div

View File

@@ -41,12 +41,10 @@
v-if="team && pendingInvites?.length === 0"
text="No pending invites"
>
<template #body>
<div v-if="!fetching && error" class="flex flex-col items-center p-4">
<icon-lucide-help-circle class="mb-4 svg-icons" />
{{ t('error.something_went_wrong') }}
</div>
</template>
<div v-if="!fetching && error" class="flex flex-col items-center p-4">
<icon-lucide-help-circle class="mb-4 svg-icons" />
Something went wrong. Please try again later.
</div>
</HoppSmartPlaceholder>
</div>
</div>

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

View File

@@ -4,29 +4,24 @@
v-if="src"
:src="src"
loading="lazy"
class="inline-flex flex-col object-contain object-center"
class="inline-flex flex-col object-contain object-center mb-4"
:class="large ? 'w-32 h-32' : 'w-16 h-16'"
:alt="alt"
/>
<slot name="icon"></slot>
<span v-if="heading" class="font-semibold mt-2 text-center">
<span v-if="heading" class="mb-2 font-semibold text-center">
{{ heading }}
</span>
<span
v-if="text"
class="max-w-sm mt-2 text-center whitespace-normal text-secondaryLight text-tiny"
class="max-w-sm mb-4 text-center whitespace-normal text-secondaryLight"
>
{{ text }}
</span>
<div v-if="hasBody" class="mt-4">
<slot name="body"></slot>
</div>
<slot></slot>
</div>
</template>
<script setup lang="ts">
import { computed, useSlots } from "vue"
withDefaults(
defineProps<{
src?: string
@@ -40,10 +35,4 @@ withDefaults(
text: "",
}
)
const slots = useSlots()
const hasBody = computed(() => {
return !!slots.body
})
</script>