Spaces:
Running
Running
Upload 10 files
Browse files
src/views/InstructorView.js
CHANGED
|
@@ -383,10 +383,10 @@ export function setupInstructorEvents() {
|
|
| 383 |
} catch (error) {
|
| 384 |
console.error(error);
|
| 385 |
let msg = error.message;
|
| 386 |
-
if (error.code === 'auth/popup-blocked') {
|
| 387 |
-
msg = "瀏覽器攔截了登入視窗。";
|
| 388 |
// Show Redirect Option
|
| 389 |
-
if (confirm("
|
| 390 |
try {
|
| 391 |
await signInWithGoogleRedirect();
|
| 392 |
} catch (err) {
|
|
|
|
| 383 |
} catch (error) {
|
| 384 |
console.error(error);
|
| 385 |
let msg = error.message;
|
| 386 |
+
if (error.code === 'auth/popup-blocked' || error.code === 'auth/popup-closed-by-user') {
|
| 387 |
+
msg = "瀏覽器攔截了登入視窗,或視窗被提前關閉。";
|
| 388 |
// Show Redirect Option
|
| 389 |
+
if (confirm("視窗無法正常開啟。是否改用頁面跳轉方式登入?\n(將會重新整理頁面)")) {
|
| 390 |
try {
|
| 391 |
await signInWithGoogleRedirect();
|
| 392 |
} catch (err) {
|