Skip to content

Commit

Permalink
fix: failed navigation to web for mac [#2266]
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmdasifraza committed Dec 24, 2024
1 parent d68d440 commit 81e26c9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 31 deletions.
2 changes: 1 addition & 1 deletion apps/@sparrow-desktop/src/constants/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const constants = {
WORKSPACE_LIMIT: 5,
API_LIMIT: 5,
SPARROW_SUPPORT_EMAIL: import.meta.env.VITE_SPARROW_SUPPORT_EMAIL,
SPARROW_AUTH_URL: import.meta.env.VITE_AUTH_URL + "/init?source=desktop",
SPARROW_AUTH_URL: import.meta.env.VITE_AUTH_URL,
SPARROW_GITHUB: import.meta.env.VITE_SPARROW_GITHUB,
SPARROW_LINKEDIN: import.meta.env.VITE_SPARROW_LINKEDIN,
SPARROW_DOWNLOAD_LINK: import.meta.env.VITE_SPARROW_DOWNLOAD_LINK,
Expand Down
11 changes: 6 additions & 5 deletions apps/@sparrow-desktop/src/pages/auth-page/Auth.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import {
logoSparrowSquare,
SparrowBackgroundV2,
sparrowLogoBackground,
} from "@sparrow/common/images";
import { DefaultHeader, Redirect } from "@sparrow/common/components";
import { DefaultHeader } from "@sparrow/common/components";
import constants from "@app/constants/constants";
import {
AISparkle,
Expand Down Expand Up @@ -35,7 +34,9 @@
import { handleLoginV2 } from "./sub-pages/login-page/login-page";
let isEntry = false;
let isHover = false;
let externalSparrowLink = `${constants.SPARROW_AUTH_URL}`;
let externalSparrowLink =
`${constants.SPARROW_AUTH_URL}` + "/init?source=desktop";
let externalHelpLink = `${constants.SPARROW_AUTH_URL}` + "/support";
const externalSparrowGithub = constants.SPARROW_GITHUB;
const _viewModel = new AuthViewModel();
const openDefaultBrowser = async () => {
Expand Down Expand Up @@ -291,7 +292,7 @@
{:else}
<a
on:click={async () => {
await open(externalSparrowLink + "/support");
await open(externalHelpLink);
}}
role="button"
class="link-button px-2 sparrow-fs-12">Need Help?</a
Expand All @@ -300,7 +301,7 @@
<a
role="button"
on:click={async () => {
await open(externalSparrowLink + "/support");
await open(externalHelpLink);
}}
class="px-2 link-button sparrow-fs-12">Report Issue</a
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
id: "none",
};
let externalSparrowLink = `${constants.SPARROW_AUTH_URL}`;
let externalSparrowLink =
`${constants.SPARROW_AUTH_URL}` + "/init?source=desktop";
let isPopupOpen = false;
let isLoginBannerActive = false;
let isGuestUser = false;
Expand Down
48 changes: 24 additions & 24 deletions packages/@sparrow-common/src/components/redirect/Redirect.svelte
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<script lang="ts">
import { logoSparrowSquare } from "@sparrow/common/images";
import { Spinner } from "@sparrow/library/ui";
import { leftIconIcon as leftIcon } from "@sparrow/library/assets";
import constants from "@app/constants/constants";
import { fly, fade } from "svelte/transition";
import { onMount } from "svelte";
import { platform } from "@tauri-apps/plugin-os";
import { open } from "@tauri-apps/plugin-shell";
export let title = "Title";
export let description = "Description";
export let message = "Detailed Message";
export let isSpinner = true;
export let buttonText = "Button";
export let buttonClick = () => {};
export let loadingMessage = "";
export let callback;
// import { logoSparrowSquare } from "@sparrow/common/images";
// import { Spinner } from "@sparrow/library/ui";
// import { leftIconIcon as leftIcon } from "@sparrow/library/assets";
// import constants from "@app/constants/constants";
// import { fly, fade } from "svelte/transition";
// import { onMount } from "svelte";
// import { platform } from "@tauri-apps/plugin-os";
// import { open } from "@tauri-apps/plugin-shell";
// export let title = "Title";
// export let description = "Description";
// export let message = "Detailed Message";
// export let isSpinner = true;
// export let buttonText = "Button";
// export let buttonClick = () => {};
// export let loadingMessage = "";
// export let callback;
let os = "";
let externalSparrowLink = `${constants.SPARROW_AUTH_URL}`;
onMount(async () => {
os = await platform();
});
export let appVersion = "";
// let os = "";
// let externalSparrowLink = `${constants.SPARROW_AUTH_URL}`;
// onMount(async () => {
// os = await platform();
// });
// export let appVersion = "";
</script>

<!-- <Header /> -->
<div
<!-- <div
class="d-flex align-items-center justify-content-center z-2"
style="height: 100vh;"
transition:fade={{ delay: 0, duration: 100 }}
Expand Down Expand Up @@ -128,7 +128,7 @@
</p>
</div>
</div>
</div>
</div> -->

<style>
.background-overlay {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
src={response.body}
alt="Sparrow logo"
on:error={() => (imageHasError = true)}
style="max-width:100%;"
/>
{:else}
<!-- if any error render sparrow logo -->
Expand Down

0 comments on commit 81e26c9

Please sign in to comment.