chore: merge hoppscotch/staging into self-hosted/main

This commit is contained in:
Andrew Bastin
2023-04-04 21:12:21 +05:30
4 changed files with 70 additions and 58 deletions

View File

@@ -55,3 +55,6 @@ VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
VITE_BACKEND_WS_URL=wss://localhost:3170/graphql VITE_BACKEND_WS_URL=wss://localhost:3170/graphql
VITE_BACKEND_API_URL=http://localhost:3170/v1 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

View File

@@ -1185,7 +1185,7 @@ const onRemoveRequest = () => {
}) })
if (possibleTab) { if (possibleTab) {
possibleTab.value.document.saveContext = undefined possibleTab.value.document.saveContext = null
possibleTab.value.document.isDirty = true possibleTab.value.document.isDirty = true
} }
} }

View File

@@ -76,18 +76,21 @@
</div> </div>
</template> </template>
<template #footer> <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 By signing in, you are agreeing to our
<HoppSmartAnchor <HoppSmartAnchor
class="link" class="link"
to="https://docs.hoppscotch.io/terms" :to="tosLink"
blank blank
label="Terms of Service" label="Terms of Service"
/> />
and and
<HoppSmartAnchor <HoppSmartAnchor
class="link" class="link"
to="https://docs.hoppscotch.io/privacy" :to="privacyPolicyLink"
blank blank
label="Privacy Policy" label="Privacy Policy"
/> />
@@ -141,6 +144,9 @@ export default defineComponent({
setup() { setup() {
const { subscribeToStream } = useStreamSubscriber() const { subscribeToStream } = useStreamSubscriber()
const tosLink = import.meta.env.VITE_APP_TOS_LINK
const privacyPolicyLink = import.meta.env.VITE_APP_PRIVACY_POLICY_LINK
return { return {
subscribeToStream, subscribeToStream,
t: useI18n(), t: useI18n(),
@@ -150,6 +156,8 @@ export default defineComponent({
IconEmail, IconEmail,
IconMicrosoft, IconMicrosoft,
IconArrowLeft, IconArrowLeft,
tosLink,
privacyPolicyLink,
} }
}, },
data() { data() {

View File

@@ -1,4 +1,5 @@
<template> <template>
<div>
<AppPaneLayout layout-id="http"> <AppPaneLayout layout-id="http">
<template #primary> <template #primary>
<HoppSmartWindows <HoppSmartWindows
@@ -30,7 +31,6 @@
{{ tab.document.request.name }} {{ tab.document.request.name }}
</span> </span>
</template> </template>
<HttpRequestTab <HttpRequestTab
:model-value="tab" :model-value="tab"
@update:model-value="onTabUpdate" @update:model-value="onTabUpdate"
@@ -54,6 +54,7 @@
:mode="'rest'" :mode="'rest'"
@hide-modal="onSaveModalClose" @hide-modal="onSaveModalClose"
/> />
</div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>