From da0d79f0db873c08fab3bc85023167e174d18b0e Mon Sep 17 00:00:00 2001 From: 苏向夜 Date: Mon, 19 Jan 2026 14:17:32 +0800 Subject: chore(ui): refactor workspace to monorepo --- packages/ui/src/components/LoginModal.svelte | 126 +++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 packages/ui/src/components/LoginModal.svelte (limited to 'packages/ui/src/components/LoginModal.svelte') diff --git a/packages/ui/src/components/LoginModal.svelte b/packages/ui/src/components/LoginModal.svelte new file mode 100644 index 0000000..1886cd9 --- /dev/null +++ b/packages/ui/src/components/LoginModal.svelte @@ -0,0 +1,126 @@ + + +{#if authState.isLoginModalOpen} +
+
+
+

Login

+ +
+ + {#if authState.loginMode === "select"} +
+ + +
+
+
+
+
+ OR +
+
+ +
+ e.key === "Enter" && authState.performOfflineLogin()} + /> + +
+
+ {:else if authState.loginMode === "microsoft"} +
+ {#if authState.msLoginLoading && !authState.deviceCodeData} +
+ Starting login flow... +
+ {:else if authState.deviceCodeData} +
+

1. Go to this URL:

+ + +

2. Enter this code:

+
e.key === 'Enter' && navigator.clipboard.writeText(authState.deviceCodeData?.user_code || "")} + onclick={() => + navigator.clipboard.writeText( + authState.deviceCodeData?.user_code || "" + )} + > + {authState.deviceCodeData.user_code} +
+

Click code to copy

+ +
+
+
+ {authState.msLoginStatus} +
+

This window will update automatically.

+
+ + +
+ {/if} +
+ {/if} +
+
+{/if} -- cgit v1.2.3-70-g09d2