Skip to content

Commit

Permalink
Merge pull request #63 from sparrowapp-dev/feat/added-policy-button-o…
Browse files Browse the repository at this point in the history
…n-sign-in

Feat: Added PrivacyPpolicy button on sign in & Register
  • Loading branch information
itsmdasifraza authored Oct 9, 2024
2 parents 6b8d038 + 62661a0 commit 3ae9f9f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ VITE_ENABLE_MIX_PANEL="false"
VITE_MIX_PANEL_TOKEN=""
VITE_TERMS_OF_SERVICE="https://example.dev/termsandconditions"
VITE_SPARROW_WEB_URL="http://localhost:1422"
VITE_SPARROW_PRIVACY_POLICY="https://example.com/privacy-policy"
23 changes: 23 additions & 0 deletions src/lib/components/privacy-policy/PrivacyPolicy.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script>
import constants from "$lib/utils/constants";
</script>

<div style="margin-bottom: 16px;">
<p style="text-align: center; margin-bottom:0px;" class="sparrow-fs-12 px-3 text-lightGray">By creating an account, you agree to receive occasional marketing emails & product updates. You may unsubscribe from these communications at any time. Please refer to our</p>

<div class="w-100 d-flex align-items-center justify-content-center" >
<a target="_blank" href={constants.SPARROW_TERMS_OF_SERVICE} class="sparrow-fs-14" style="font-weight:400;">Terms of Service</a>
<span class="px-2 text-lightGray sparrow-fs-14" style="font-weight:400;" >&</span>
<a target="_blank" href={constants.SPARROW_PRIVACY_POLICY} class="sparrow-fs-14" style="font-weight:400;">Privacy Policy</a>
</div>

</div>

<style>
a{
text-decoration: underline;
color: var(--primary-btn-color);
/* border-bottom: 1px solid var( --primary-color); */
font-weight: 400;
}
</style>
3 changes: 2 additions & 1 deletion src/lib/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const constants = {
SPARROW_OAUTH:import.meta.env.VITE_SPARROW_OAUTH,
SPARROW_SUPPORT_EMAIL:import.meta.env.VITE_SPARROW_SUPPORT_EMAIL,
SPARROW_TERMS_OF_SERVICE: import.meta.env.VITE_TERMS_OF_SERVICE,
SPARROW_WEB_URL: import.meta.env.VITE_SPARROW_WEB_URL
SPARROW_WEB_URL: import.meta.env.VITE_SPARROW_WEB_URL,
SPARROW_PRIVACY_POLICY:import.meta.env.VITE_SPARROW_PRIVACY_POLICY
};

export default constants;
2 changes: 2 additions & 0 deletions src/pages/Auth/entry-point/EntryPoint.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import Button from '$lib/components/button/Button.svelte';
import BgContainer from '$lib/components/bgContainer/BgContainer.svelte';
import { onMount } from 'svelte';
import PrivacyPolicy from '$lib/components/privacy-policy/PrivacyPolicy.svelte';
let isEmailTouched = false;
//---------------- Login Validation --------------------//
Expand Down Expand Up @@ -149,6 +150,7 @@
</div>
</form>
<Oauth />
<PrivacyPolicy/>
<SupportHelp />
</BgContainer>
{/if}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Auth/register-page/RegisterPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import constants from '$lib/utils/constants';
import Button from '$lib/components/button/Button.svelte';
import BgContainer from '$lib/components/bgContainer/BgContainer.svelte';
import PrivacyPolicy from '$lib/components/privacy-policy/PrivacyPolicy.svelte';
export let id;
let isRegistered = false;
let redirectRules = {
Expand Down Expand Up @@ -398,6 +399,7 @@
</div>
</form>
<Oauth />
<PrivacyPolicy/>
<SupportHelp />
</BgContainer>
{/if}
Expand Down

0 comments on commit 3ae9f9f

Please sign in to comment.