chore: merge hoppscotch/staging into self-hosted/main
This commit is contained in:
@@ -55,3 +55,6 @@ VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
|
||||
VITE_BACKEND_WS_URL=wss://localhost:3170/graphql
|
||||
VITE_BACKEND_API_URL=http://localhost:3170/v1
|
||||
|
||||
# Terms Of Service And Privacy Policy Links (Optional)
|
||||
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/terms
|
||||
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/privacy
|
||||
|
||||
@@ -1185,7 +1185,7 @@ const onRemoveRequest = () => {
|
||||
})
|
||||
|
||||
if (possibleTab) {
|
||||
possibleTab.value.document.saveContext = undefined
|
||||
possibleTab.value.document.saveContext = null
|
||||
possibleTab.value.document.isDirty = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,18 +76,21 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div v-if="mode === 'sign-in'" class="text-secondaryLight text-tiny">
|
||||
<div
|
||||
v-if="mode === 'sign-in' && tosLink && privacyPolicyLink"
|
||||
class="text-secondaryLight text-tiny"
|
||||
>
|
||||
By signing in, you are agreeing to our
|
||||
<HoppSmartAnchor
|
||||
class="link"
|
||||
to="https://docs.hoppscotch.io/terms"
|
||||
:to="tosLink"
|
||||
blank
|
||||
label="Terms of Service"
|
||||
/>
|
||||
and
|
||||
<HoppSmartAnchor
|
||||
class="link"
|
||||
to="https://docs.hoppscotch.io/privacy"
|
||||
:to="privacyPolicyLink"
|
||||
blank
|
||||
label="Privacy Policy"
|
||||
/>
|
||||
@@ -141,6 +144,9 @@ export default defineComponent({
|
||||
setup() {
|
||||
const { subscribeToStream } = useStreamSubscriber()
|
||||
|
||||
const tosLink = import.meta.env.VITE_APP_TOS_LINK
|
||||
const privacyPolicyLink = import.meta.env.VITE_APP_PRIVACY_POLICY_LINK
|
||||
|
||||
return {
|
||||
subscribeToStream,
|
||||
t: useI18n(),
|
||||
@@ -150,6 +156,8 @@ export default defineComponent({
|
||||
IconEmail,
|
||||
IconMicrosoft,
|
||||
IconArrowLeft,
|
||||
tosLink,
|
||||
privacyPolicyLink,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -1,59 +1,60 @@
|
||||
<template>
|
||||
<AppPaneLayout layout-id="http">
|
||||
<template #primary>
|
||||
<HoppSmartWindows
|
||||
v-if="currentTabID"
|
||||
:id="'rest_windows'"
|
||||
v-model="currentTabID"
|
||||
@remove-tab="removeTab"
|
||||
@add-tab="addNewTab"
|
||||
@sort="sortTabs"
|
||||
>
|
||||
<HoppSmartWindow
|
||||
v-for="tab in tabs"
|
||||
:id="tab.id"
|
||||
:key="tab.id"
|
||||
:label="tab.document.request.name"
|
||||
:is-removable="tabs.length > 1"
|
||||
<div>
|
||||
<AppPaneLayout layout-id="http">
|
||||
<template #primary>
|
||||
<HoppSmartWindows
|
||||
v-if="currentTabID"
|
||||
:id="'rest_windows'"
|
||||
v-model="currentTabID"
|
||||
@remove-tab="removeTab"
|
||||
@add-tab="addNewTab"
|
||||
@sort="sortTabs"
|
||||
>
|
||||
<template #tabhead>
|
||||
<span
|
||||
class="font-semibold truncate text-tiny w-10"
|
||||
:class="getMethodLabelColorClassOf(tab.document.request)"
|
||||
>
|
||||
{{ tab.document.request.method }}
|
||||
</span>
|
||||
<span class="text-green-600 mr-1" v-if="tab.document.isDirty">
|
||||
•
|
||||
</span>
|
||||
<span class="truncate flex-1">
|
||||
{{ tab.document.request.name }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<HttpRequestTab
|
||||
:model-value="tab"
|
||||
@update:model-value="onTabUpdate"
|
||||
/>
|
||||
</HoppSmartWindow>
|
||||
</HoppSmartWindows>
|
||||
</template>
|
||||
<template #sidebar>
|
||||
<HttpSidebar />
|
||||
</template>
|
||||
</AppPaneLayout>
|
||||
<HoppSmartConfirmModal
|
||||
:show="confirmingCloseForTabID !== null"
|
||||
:confirm="t('modal.close_unsaved_tab')"
|
||||
:title="t('confirm.save_unsaved_tab')"
|
||||
@hide-modal="onCloseConfirmSaveTab"
|
||||
@resolve="onResolveConfirmSaveTab"
|
||||
/>
|
||||
<CollectionsSaveRequest
|
||||
:show="savingRequest"
|
||||
:mode="'rest'"
|
||||
@hide-modal="onSaveModalClose"
|
||||
/>
|
||||
<HoppSmartWindow
|
||||
v-for="tab in tabs"
|
||||
:id="tab.id"
|
||||
:key="tab.id"
|
||||
:label="tab.document.request.name"
|
||||
:is-removable="tabs.length > 1"
|
||||
>
|
||||
<template #tabhead>
|
||||
<span
|
||||
class="font-semibold truncate text-tiny w-10"
|
||||
:class="getMethodLabelColorClassOf(tab.document.request)"
|
||||
>
|
||||
{{ tab.document.request.method }}
|
||||
</span>
|
||||
<span class="text-green-600 mr-1" v-if="tab.document.isDirty">
|
||||
•
|
||||
</span>
|
||||
<span class="truncate flex-1">
|
||||
{{ tab.document.request.name }}
|
||||
</span>
|
||||
</template>
|
||||
<HttpRequestTab
|
||||
:model-value="tab"
|
||||
@update:model-value="onTabUpdate"
|
||||
/>
|
||||
</HoppSmartWindow>
|
||||
</HoppSmartWindows>
|
||||
</template>
|
||||
<template #sidebar>
|
||||
<HttpSidebar />
|
||||
</template>
|
||||
</AppPaneLayout>
|
||||
<HoppSmartConfirmModal
|
||||
:show="confirmingCloseForTabID !== null"
|
||||
:confirm="t('modal.close_unsaved_tab')"
|
||||
:title="t('confirm.save_unsaved_tab')"
|
||||
@hide-modal="onCloseConfirmSaveTab"
|
||||
@resolve="onResolveConfirmSaveTab"
|
||||
/>
|
||||
<CollectionsSaveRequest
|
||||
:show="savingRequest"
|
||||
:mode="'rest'"
|
||||
@hide-modal="onSaveModalClose"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
Reference in New Issue
Block a user