Merge pull request #389 from webees/fix/cloud-login-external-browser

Fix cloud login opening in profile selector
This commit is contained in:
andy
2026-05-28 10:47:36 -07:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
"use client";
import { invoke } from "@tauri-apps/api/core";
import { openUrl } from "@tauri-apps/plugin-opener";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { LuExternalLink } from "react-icons/lu";
@@ -45,7 +46,7 @@ export function DeviceCodeVerifyDialog({
const handleOpenLogin = async () => {
setIsOpeningLogin(true);
try {
await invoke("handle_url_open", { url: DEVICE_LINK_URL });
await openUrl(DEVICE_LINK_URL);
} catch (error) {
console.error("Failed to open login link:", error);
showErrorToast(String(error));
+2 -1
View File
@@ -1,6 +1,7 @@
"use client";
import { invoke } from "@tauri-apps/api/core";
import { openUrl } from "@tauri-apps/plugin-opener";
import { useCallback, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { LuEye, LuEyeOff } from "react-icons/lu";
@@ -206,7 +207,7 @@ export function SyncConfigDialog({
const handleOpenLogin = useCallback(async () => {
try {
await invoke("handle_url_open", { url: DEVICE_LINK_URL });
await openUrl(DEVICE_LINK_URL);
// Hand off the verify step to its own dialog so the user has a
// focused place to paste the code, and so it doesn't visually
// stack with this dialog or any other modal currently on screen.