fix(studio): resolve className syntax error in Login.jsx and rebuild bundle
Browse files- studio/src/pages/auth/Login.jsx +11 -11
studio/src/pages/auth/Login.jsx
CHANGED
|
@@ -134,11 +134,11 @@ export default function Login() {
|
|
| 134 |
let meRes;
|
| 135 |
try {
|
| 136 |
meRes = await fetch(`${API_BASE}/auth/me`, {
|
| 137 |
-
headers: { Authorization: Bearer
|
| 138 |
});
|
| 139 |
} catch {
|
| 140 |
meRes = await fetch("https://shak3008-diffweave.hf.space/api/auth/me", {
|
| 141 |
-
headers: { Authorization: Bearer
|
| 142 |
});
|
| 143 |
}
|
| 144 |
|
|
@@ -216,17 +216,17 @@ export default function Login() {
|
|
| 216 |
<div className="dw-auth-tabs">
|
| 217 |
<button
|
| 218 |
type="button"
|
| 219 |
-
className={dw-auth-tab }
|
| 220 |
onClick={() => { setLoginMode('email'); setError(null); }}
|
| 221 |
>
|
| 222 |
-
<span>
|
| 223 |
</button>
|
| 224 |
<button
|
| 225 |
type="button"
|
| 226 |
-
className={dw-auth-tab }
|
| 227 |
onClick={() => { setLoginMode('apikey'); setError(null); }}
|
| 228 |
>
|
| 229 |
-
<span>
|
| 230 |
</button>
|
| 231 |
</div>
|
| 232 |
|
|
@@ -254,7 +254,7 @@ export default function Login() {
|
|
| 254 |
className="dw-input"
|
| 255 |
type={showPassword ? "text" : "password"}
|
| 256 |
autoComplete="current-password"
|
| 257 |
-
placeholder="
|
| 258 |
value={password}
|
| 259 |
onChange={(e) => setPassword(e.target.value)}
|
| 260 |
required
|
|
@@ -286,7 +286,7 @@ export default function Login() {
|
|
| 286 |
{error && <div className="dw-auth-form__error">{error}</div>}
|
| 287 |
|
| 288 |
<button type="submit" className="dw-btn dw-btn--primary" disabled={loading}>
|
| 289 |
-
{loading ? "Signing in
|
| 290 |
</button>
|
| 291 |
|
| 292 |
<div className="dw-auth-form__footer-text">
|
|
@@ -303,7 +303,7 @@ export default function Login() {
|
|
| 303 |
onClick={handleDemoLogin}
|
| 304 |
disabled={demoLoading || loading}
|
| 305 |
>
|
| 306 |
-
{demoLoading ? "Starting demo workspace
|
| 307 |
</button>
|
| 308 |
</form>
|
| 309 |
) : (
|
|
@@ -340,7 +340,7 @@ export default function Login() {
|
|
| 340 |
{error && <div className="dw-auth-form__error">{error}</div>}
|
| 341 |
|
| 342 |
<button type="submit" className="dw-btn dw-btn--primary" disabled={loading}>
|
| 343 |
-
{loading ? "Validating token
|
| 344 |
</button>
|
| 345 |
|
| 346 |
<div className="dw-auth-form__footer-text">
|
|
@@ -357,7 +357,7 @@ export default function Login() {
|
|
| 357 |
onClick={handleDemoLogin}
|
| 358 |
disabled={demoLoading || loading}
|
| 359 |
>
|
| 360 |
-
{demoLoading ? "Starting demo workspace
|
| 361 |
</button>
|
| 362 |
</form>
|
| 363 |
)}
|
|
|
|
| 134 |
let meRes;
|
| 135 |
try {
|
| 136 |
meRes = await fetch(`${API_BASE}/auth/me`, {
|
| 137 |
+
headers: { Authorization: `Bearer ${cleanKey}` },
|
| 138 |
});
|
| 139 |
} catch {
|
| 140 |
meRes = await fetch("https://shak3008-diffweave.hf.space/api/auth/me", {
|
| 141 |
+
headers: { Authorization: `Bearer ${cleanKey}` },
|
| 142 |
});
|
| 143 |
}
|
| 144 |
|
|
|
|
| 216 |
<div className="dw-auth-tabs">
|
| 217 |
<button
|
| 218 |
type="button"
|
| 219 |
+
className={`dw-auth-tab ${loginMode === 'email' ? 'dw-auth-tab--active' : ''}`}
|
| 220 |
onClick={() => { setLoginMode('email'); setError(null); }}
|
| 221 |
>
|
| 222 |
+
<span>Email & Password</span>
|
| 223 |
</button>
|
| 224 |
<button
|
| 225 |
type="button"
|
| 226 |
+
className={`dw-auth-tab ${loginMode === 'apikey' ? 'dw-auth-tab--active' : ''}`}
|
| 227 |
onClick={() => { setLoginMode('apikey'); setError(null); }}
|
| 228 |
>
|
| 229 |
+
<span>Login with API Key</span>
|
| 230 |
</button>
|
| 231 |
</div>
|
| 232 |
|
|
|
|
| 254 |
className="dw-input"
|
| 255 |
type={showPassword ? "text" : "password"}
|
| 256 |
autoComplete="current-password"
|
| 257 |
+
placeholder="••••••••"
|
| 258 |
value={password}
|
| 259 |
onChange={(e) => setPassword(e.target.value)}
|
| 260 |
required
|
|
|
|
| 286 |
{error && <div className="dw-auth-form__error">{error}</div>}
|
| 287 |
|
| 288 |
<button type="submit" className="dw-btn dw-btn--primary" disabled={loading}>
|
| 289 |
+
{loading ? "Signing in…" : "Sign in"}
|
| 290 |
</button>
|
| 291 |
|
| 292 |
<div className="dw-auth-form__footer-text">
|
|
|
|
| 303 |
onClick={handleDemoLogin}
|
| 304 |
disabled={demoLoading || loading}
|
| 305 |
>
|
| 306 |
+
{demoLoading ? "Starting demo workspace…" : "⚡ Quick Demo Access (No account needed)"}
|
| 307 |
</button>
|
| 308 |
</form>
|
| 309 |
) : (
|
|
|
|
| 340 |
{error && <div className="dw-auth-form__error">{error}</div>}
|
| 341 |
|
| 342 |
<button type="submit" className="dw-btn dw-btn--primary" disabled={loading}>
|
| 343 |
+
{loading ? "Validating token…" : "Sign in with API Key"}
|
| 344 |
</button>
|
| 345 |
|
| 346 |
<div className="dw-auth-form__footer-text">
|
|
|
|
| 357 |
onClick={handleDemoLogin}
|
| 358 |
disabled={demoLoading || loading}
|
| 359 |
>
|
| 360 |
+
{demoLoading ? "Starting demo workspace…" : "⚡ Quick Demo Access (No account needed)"}
|
| 361 |
</button>
|
| 362 |
</form>
|
| 363 |
)}
|