Skip to content

Commit

Permalink
Merge pull request #73 from sparrowapp-dev/development
Browse files Browse the repository at this point in the history
Release Version 2.10.0 [Merging development into prod]
  • Loading branch information
itsmdasifraza authored Oct 25, 2024
2 parents fa9a0dd + e0cb7de commit 10ac274
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
VITE_MIX_PANEL_TOKEN: ${{ vars.VITE_MIX_PANEL_TOKEN_DEV }}
VITE_TERMS_OF_SERVICE: ${{ vars.VITE_TERMS_OF_SERVICE_DEV }}
VITE_SPARROW_PRIVACY_POLICY: ${{ vars.VITE_SPARROW_PRIVACY_POLICY_DEV }}
VITE_SPARROW_WEB_URL: ${{ vars.VITE_SPARROW_WEB_URL_DEV }}

jobs:
build-and-deploy:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
VITE_MIX_PANEL_TOKEN: ${{ vars.VITE_MIX_PANEL_TOKEN_PROD }}
VITE_TERMS_OF_SERVICE: ${{ vars.VITE_TERMS_OF_SERVICE_PROD }}
VITE_SPARROW_PRIVACY_POLICY: ${{ vars.VITE_SPARROW_PRIVACY_POLICY_PROD }}
VITE_SPARROW_WEB_URL: ${{vars.VITE_SPARROW_WEB_URL_PROD}}

jobs:
build-and-deploy:
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Auth/forgot-password/ForgotPassword.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</div>
<div class="mb-3">
<div>
<label for="exampleInputEmail1" class="form-label text-lightGray sparrow-fs-14 d-flex">Email<p class="ms-1 mb-0 sparrow-fw-600 text-dangerColor">*</p></label>
<label for="exampleInputEmail1" class="form-label text-lightGray sparrow-fs-14 d-flex">Email ID<p class="ms-1 mb-0 sparrow-fw-600 text-dangerColor">*</p></label>
</div>
<input
type="email"
Expand Down
11 changes: 10 additions & 1 deletion src/pages/Auth/oauth-redirect/OauthRedirect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
import Redirect from '../redirect/Redirect.svelte';
import constants from '$lib/utils/constants';
let userFromDesktop = localStorage.getItem('isUserFromDesktop');
onMount(() => {
const urlParams = new URLSearchParams(window.location.search);
const accessToken = urlParams.get('accessToken');
const refreshToken = urlParams.get('refreshToken');
const refreshToken = urlParams.get('refreshToken');
const source = urlParams.get('source');
const sparrowRedirect = `sparrow://?accessToken=${accessToken}&refreshToken=${refreshToken}&event=${source}&method=google`;
const sparrowWebRedirect = constants.SPARROW_WEB_URL +`?accessToken=${accessToken}&refreshToken=${refreshToken}&event=${source}&method=google`;
if (accessToken && refreshToken) {
if(userFromDesktop === "true"){
setTimeout(() => {
let data = JSON.parse(window.atob(accessToken?.split('.')[1]));
redirectRules.title = `Welcome ${data.name}`;
Expand All @@ -27,6 +32,10 @@
};
}, constants.API_REDIRECT_TIMEOUT);
}
else{
navigate(sparrowWebRedirect)
}
}
});
let redirectRules = {
title: 'Welcome to Sparrow!',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Auth/reset-password/ResetPassword.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

<div class="form-group mb-1 text-lightGray">
<div>
<label for="password" class="sparrow-fs-16">New Password</label>
<label for="password" class="sparrow-fs-16 d-flex">New Password <p class="ms-1 mb-0 sparrow-fw-600 text-dangerColor">*</p></label>
</div>
<div class="d-flex position-relative">
<input
Expand Down
13 changes: 13 additions & 0 deletions src/pages/Auth/verify-email/VerifyEmail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import AngleUp from '$lib/assets/angle-up.svelte';
import BgContainer from '$lib/components/bgContainer/BgContainer.svelte';
import Redirect from '../redirect/Redirect.svelte';
import constants from '$lib/utils/constants';
export let id: string;
let seconds = 60;
Expand Down Expand Up @@ -74,6 +75,10 @@
let emailText: string = id || '';
let userFromDesktop = localStorage.getItem('isUserFromDesktop');
const handleVerificationCode = () => {
verifyCode =
verificationCode1 +
Expand Down Expand Up @@ -498,6 +503,9 @@
const accessToken = response?.data.accessToken?.token;
const refreshToken = response?.data.refreshToken?.token;
const sparrowRedirect = `sparrow://?accessToken=${accessToken}&refreshToken=${refreshToken}&response=${JSON.stringify(response.data)}&event=register&method=email`;
const sparrowWebRedirect = constants.SPARROW_WEB_URL +`?accessToken=${accessToken}&refreshToken=${refreshToken}&response=${JSON.stringify(response)}&event=register&method=email`;

if(userFromDesktop === "true"){
setTimeout(() => {
let data = JSON.parse(window.atob(accessToken?.split('.')[1]));
redirectRules.title = `Welcome ${data.name.split(' ')[0]}`;
Expand All @@ -513,6 +521,11 @@
}, 5000);
}

else{
navigate(sparrowWebRedirect);
}
}

verifyCodeLoader = false;
}}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Auth/verify-email/verify-email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export const isSuccessfulResponse = writable(false);
import { writable } from 'svelte/store';

export const handleVerifyUserEmail = async (verifyCodeCredential: verifyPostbody) => {
const response = await verifyUserEmail(verifyCodeCredential);
if (response.isSuccessful) {
const response = await verifyUserEmail(verifyCodeCredential);
if (response.isSuccessful) {
errorMessageText.set("");
} else {
} else {
isSuccessfulResponse.set(true);
if (response.message === 'verificationCode should not be empty') {
errorMessageText.set('Please enter the 6-digit verification code.');
Expand Down

0 comments on commit 10ac274

Please sign in to comment.