Skip to content

Commit

Permalink
Merge pull request #80 from sparrowapp-dev/development
Browse files Browse the repository at this point in the history
Release Version 2.12.0 [Merging development into prod]
  • Loading branch information
Astitva877 authored Nov 22, 2024
2 parents bd88209 + 7cc415e commit 8b89e27
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/pages/Auth/login-page/LoginPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
on:click={togglePasswordVisibility}
class="border-0 position-absolute eye-icon d-flex align-items-center"
>
{#if !isPasswordVisible}
{#if isPasswordVisible}
<img src={eyeShow} alt="eye-show" />
{:else}
<img src={eyeHide} alt="eye-hie" />
Expand Down
37 changes: 24 additions & 13 deletions src/pages/Auth/oauth-redirect/OauthRedirect.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<script>
<script lang="ts">
import { onMount } from 'svelte';
import { navigate } from 'svelte-navigator';
import Redirect from '../redirect/Redirect.svelte';
import constants from '$lib/utils/constants';
let userFromDesktop = localStorage.getItem('isUserFromDesktop');
let accessToken = "";
let refreshToken = "";
onMount(() => {
const urlParams = new URLSearchParams(window.location.search);
const accessToken = urlParams.get('accessToken');
const refreshToken = urlParams.get('refreshToken');
accessToken = urlParams.get('accessToken') as string;
refreshToken = urlParams.get('refreshToken') as string;
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`;
Expand All @@ -36,6 +37,14 @@
navigate(sparrowWebRedirect)
}
}
else{
if(userFromDesktop === "true"){
navigate("/init")
}
else{
navigate("/init?source=web")
}
}
});
let redirectRules = {
title: 'Welcome to Sparrow!',
Expand All @@ -48,12 +57,14 @@
};
</script>

<Redirect
title={redirectRules.title}
description={redirectRules.description}
message={redirectRules.message}
isSpinner={redirectRules.isSpinner}
buttonText={redirectRules.buttonText}
buttonClick={redirectRules.buttonClick}
loadingMessage={redirectRules.loadingMessage}
/>
{#if accessToken && refreshToken}
<Redirect
title={redirectRules.title}
description={redirectRules.description}
message={redirectRules.message}
isSpinner={redirectRules.isSpinner}
buttonText={redirectRules.buttonText}
buttonClick={redirectRules.buttonClick}
loadingMessage={redirectRules.loadingMessage}
/>
{/if}
6 changes: 3 additions & 3 deletions src/pages/Auth/register-page/RegisterPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
on:click={togglePasswordVisibility}
class=" border-0 position-absolute eye-icon d-flex align-items-center"
>
{#if !isPasswordVisible}
{#if isPasswordVisible}
<img src={eyeShow} alt="eye-show" />
{:else}
<img src={eyeHide} alt="eye-hie" />
Expand Down Expand Up @@ -365,10 +365,10 @@
</div>
</div>

<div class="form-group mt-3 d-flex align-item-center" data-tauri-drag-region>
<div class="form-group mt-3 d-flex align-items-center" data-tauri-drag-region>
<input
type="checkbox"
class="form-check-input"
class="form-check-input mt-0"
id="tnsCheckbox"
bind:checked={userData.tnsCheckbox}
on:input={async () => {
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 @@ -147,7 +147,7 @@
on:click={togglePasswordVisibility}
class=" border-0 position-absolute eye-icon d-flex align-items-center"
>
{#if !isPasswordVisible}
{#if isPasswordVisible}
<img src={eyeShow} alt="eye-show" />
{:else}
<img src={eyeHide} alt="eye-hie" />
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Auth/update-password/UpdatePassword.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@
<div class="sparrow-fs-14 sparrow-fs-300">
<p>
Please enter the verification code you have received on
<span class="sparrow-fw-700 text-whiteColor cursor-pointer">{emailText}</span>
<span class="sparrow-fw-700 text-whiteColor cursor-pointer " style=" overflow:hidden; display: inline-block;
word-break: break-all; "> {emailText.slice(0, 100)}
{emailText.length > 100 ? '...' : ''}</span>
</p>
{#if seconds > 0}
<div class="d-flex flex-column">
Expand Down

0 comments on commit 8b89e27

Please sign in to comment.