refactor: load terms and privacy policy from env variables in dashboard login page (#79)

This commit is contained in:
Joel Jacob Stephen
2023-04-08 16:51:48 +05:30
committed by GitHub
parent 0dba28c388
commit a4781d5882
3 changed files with 27 additions and 16 deletions

View File

@@ -22,8 +22,6 @@ declare module '@vue/runtime-core' {
HoppSmartItem: typeof import('@hoppscotch/ui')['HoppSmartItem']
HoppSmartModal: typeof import('@hoppscotch/ui')['HoppSmartModal']
HoppSmartSpinner: typeof import('@hoppscotch/ui')['HoppSmartSpinner']
HoppSmartTab: typeof import('@hoppscotch/ui')['HoppSmartTab']
IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default']
IconLucideChevronDown: typeof import('~icons/lucide/chevron-down')['default']
IconLucideInbox: typeof import('~icons/lucide/inbox')['default']
IconLucideUser: typeof import('~icons/lucide/user')['default']

View File

@@ -78,18 +78,21 @@
</div>
<section class="mt-15">
<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"
/>
@@ -133,6 +136,9 @@ const { subscribeToStream } = useStreamSubscriber();
const toast = useToast();
const tosLink = import.meta.env.VITE_APP_TOS_LINK;
const privacyPolicyLink = import.meta.env.VITE_APP_PRIVACY_POLICY_LINK;
// DATA
const form = ref({