Spaces:
Running
Running
Upload 9 files
Browse files- src/services/auth.js +12 -0
- src/views/InstructorView.js +10 -2
src/services/auth.js
CHANGED
|
@@ -47,6 +47,18 @@ export async function registerWithEmail(email, password) {
|
|
| 47 |
}
|
| 48 |
}
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
/**
|
|
|
|
| 47 |
}
|
| 48 |
}
|
| 49 |
|
| 50 |
+
/**
|
| 51 |
+
* Send Password Reset Email
|
| 52 |
+
*/
|
| 53 |
+
export async function resetPassword(email) {
|
| 54 |
+
try {
|
| 55 |
+
await sendPasswordResetEmail(auth, email);
|
| 56 |
+
} catch (error) {
|
| 57 |
+
console.error("Reset Password Error:", error);
|
| 58 |
+
throw error;
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
|
| 63 |
|
| 64 |
/**
|
src/views/InstructorView.js
CHANGED
|
@@ -218,7 +218,15 @@ export async function renderInstructorView() {
|
|
| 218 |
|
| 219 |
<!-- Eraser -->
|
| 220 |
<button class="annotation-tool p-2 rounded-full hover:bg-gray-700 transition-colors ring-2 ring-transparent focus:outline-none flex items-center justify-center" data-tool="eraser" onclick="setPenTool('eraser', null, this)" title="橡皮擦">
|
| 221 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
</button>
|
| 223 |
|
| 224 |
<div class="w-px h-6 bg-gray-600 mx-2"></div>
|
|
@@ -1523,7 +1531,7 @@ export function setupInstructorEvents() {
|
|
| 1523 |
<p class="text-md text-gray-400 truncate" title="${item.title}">${item.title}</p>
|
| 1524 |
</div>
|
| 1525 |
<!-- Prompt Content: Larger Text (text-4xl) -->
|
| 1526 |
-
<div class="flex-1 overflow-y-auto font-mono text-green-300 text-
|
| 1527 |
${(item.prompt || '').trim()}
|
| 1528 |
</div>
|
| 1529 |
`;
|
|
|
|
| 218 |
|
| 219 |
<!-- Eraser -->
|
| 220 |
<button class="annotation-tool p-2 rounded-full hover:bg-gray-700 transition-colors ring-2 ring-transparent focus:outline-none flex items-center justify-center" data-tool="eraser" onclick="setPenTool('eraser', null, this)" title="橡皮擦">
|
| 221 |
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="w-6 h-6" fill="white">
|
| 222 |
+
<rect x="75.264" y="277.317" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -229.5849 204.8263)" style="fill:#F2EBD9;" width="114.382" height="204.46"/>
|
| 223 |
+
<path style="fill:#6DA8D6;" d="M281.767,297.776l164.291-164.29l-67.544-67.544l-227.84,227.84l67.544,67.544l40.44-40.44 c3.19-3.19,8.362-3.191,11.553-0.002l11.555-11.555C278.576,306.138,278.577,300.966,281.767,297.776z"/>
|
| 224 |
+
<g>
|
| 225 |
+
<path style="fill:#185F8D;" d="M293.321,309.331c-1.595,1.595-3.686,2.393-5.777,2.393s-4.182-0.797-5.777-2.393 c-0.001-0.002-11.556,11.553-11.556,11.553c3.193,3.192,3.193,8.365,0.002,11.556l-40.44,40.44l34.663,34.664l227.84-227.84 l-34.664-34.663L293.321,309.331z"/>
|
| 226 |
+
<rect x="74.609" y="126.462" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -37.7149 210.8935)" style="fill:#185F8D;" width="322.208" height="49.021"/>
|
| 227 |
+
</g>
|
| 228 |
+
<path style="fill:#082947;" d="M509.607,173.926L338.073,2.393C336.542,0.861,334.463,0,332.297,0c-2.167,0-4.245,0.861-5.777,2.393 L87.126,241.787c-3.191,3.191-3.191,8.364,0,11.554l1.926,1.926L2.393,341.926c-3.191,3.191-3.191,8.364,0,11.554l156.127,156.127 c1.595,1.595,3.686,2.393,5.777,2.393c2.09,0,4.182-0.797,5.777-2.393l86.659-86.659l1.926,1.926 c1.595,1.595,3.686,2.393,5.777,2.393s4.182-0.797,5.777-2.393L509.607,185.48c1.533-1.532,2.393-3.61,2.393-5.777 C512,177.537,511.139,175.458,509.607,173.926z M264.436,407.543l-34.663-34.664l40.44-40.44c3.191-3.191,3.191-8.364,0-11.554 c-3.193-3.191-8.364-3.19-11.554,0l-40.44,40.44l-67.544-67.544l227.84-227.84l67.544,67.544l-164.292,164.29 c-3.191,3.19-3.191,8.362-0.001,11.553c1.597,1.597,3.688,2.394,5.779,2.394s4.182-0.797,5.777-2.393l164.291-164.29l34.664,34.663 L264.436,407.543z M366.96,54.387l-227.84,227.84l-34.663-34.663l227.84-227.84L366.96,54.387z M245.178,411.394l-80.881,80.881 L19.725,347.702l80.881-80.881L245.178,411.394z"/>
|
| 229 |
+
</svg>
|
| 230 |
</button>
|
| 231 |
|
| 232 |
<div class="w-px h-6 bg-gray-600 mx-2"></div>
|
|
|
|
| 1531 |
<p class="text-md text-gray-400 truncate" title="${item.title}">${item.title}</p>
|
| 1532 |
</div>
|
| 1533 |
<!-- Prompt Content: Larger Text (text-4xl) -->
|
| 1534 |
+
<div class="flex-1 overflow-y-auto font-mono text-green-300 text-3xl leading-relaxed whitespace-pre-wrap p-2 hover:bg-white/5 transition-colors rounded custom-scrollbar text-left">
|
| 1535 |
${(item.prompt || '').trim()}
|
| 1536 |
</div>
|
| 1537 |
`;
|