Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
wip signin
Browse files
src/lib/stores/use-user.ts
CHANGED
@@ -8,14 +8,15 @@ export const userStore = writable<any>(null);
|
|
8 |
export const openWindowLogin = async () => {
|
9 |
console.log(process.env.SPACE_HOST)
|
10 |
if (window.location.host.includes("huggingface.co")) {
|
|
|
11 |
window.location.href = env.PUBLIC_SPACE_URL as string;
|
12 |
return
|
13 |
}
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
};
|
20 |
|
21 |
export const loginFromCode = async (code: string) => {
|
|
|
8 |
export const openWindowLogin = async () => {
|
9 |
console.log(process.env.SPACE_HOST)
|
10 |
if (window.location.host.includes("huggingface.co")) {
|
11 |
+
console.log("redirecting to public space", env.PUBLIC_SPACE_URL)
|
12 |
window.location.href = env.PUBLIC_SPACE_URL as string;
|
13 |
return
|
14 |
}
|
15 |
+
return window.open(
|
16 |
+
"/api/auth/login",
|
17 |
+
"Login to LoRAs Studio",
|
18 |
+
"menubar=no,width=500,height=777,location=no,resizable=no,scrollbars=yes,status=no"
|
19 |
+
);
|
20 |
};
|
21 |
|
22 |
export const loginFromCode = async (code: string) => {
|