mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 08:51:13 -05:00
Fix auth and upload issues
This commit is contained in:
@@ -207,7 +207,7 @@ export default function Auth() {
|
||||
<Label htmlFor="signin-email">Email</Label>
|
||||
<div className="relative">
|
||||
<Mail className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" />
|
||||
<Input id="signin-email" name="email" type="email" placeholder="your@email.com" value={formData.email} onChange={handleInputChange} className="pl-10" required />
|
||||
<Input id="signin-email" name="email" type="email" placeholder="your@email.com" value={formData.email} onChange={handleInputChange} className="pl-10" autoComplete="email" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -215,7 +215,7 @@ export default function Auth() {
|
||||
<Label htmlFor="signin-password">Password</Label>
|
||||
<div className="relative">
|
||||
<Lock className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" />
|
||||
<Input id="signin-password" name="password" type={showPassword ? "text" : "password"} placeholder="Your password" value={formData.password} onChange={handleInputChange} className="pl-10 pr-10" required />
|
||||
<Input id="signin-password" name="password" type={showPassword ? "text" : "password"} placeholder="Your password" value={formData.password} onChange={handleInputChange} className="pl-10 pr-10" autoComplete="current-password" required />
|
||||
<Button type="button" variant="ghost" size="sm" className="absolute right-0 top-0 h-full px-3" onClick={() => setShowPassword(!showPassword)}>
|
||||
{showPassword ? <EyeOff className="w-4 h-4" /> : <Eye className="w-4 h-4" />}
|
||||
</Button>
|
||||
@@ -302,7 +302,7 @@ export default function Auth() {
|
||||
<Label htmlFor="signup-email">Email</Label>
|
||||
<div className="relative">
|
||||
<Mail className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" />
|
||||
<Input id="signup-email" name="email" type="email" placeholder="your@email.com" value={formData.email} onChange={handleInputChange} className="pl-10" required />
|
||||
<Input id="signup-email" name="email" type="email" placeholder="your@email.com" value={formData.email} onChange={handleInputChange} className="pl-10" autoComplete="email" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -310,7 +310,7 @@ export default function Auth() {
|
||||
<Label htmlFor="signup-password">Password</Label>
|
||||
<div className="relative">
|
||||
<Lock className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" />
|
||||
<Input id="signup-password" name="password" type={showPassword ? "text" : "password"} placeholder="Create a password" value={formData.password} onChange={handleInputChange} className="pl-10 pr-10" required />
|
||||
<Input id="signup-password" name="password" type={showPassword ? "text" : "password"} placeholder="Create a password" value={formData.password} onChange={handleInputChange} className="pl-10 pr-10" autoComplete="new-password" required />
|
||||
<Button type="button" variant="ghost" size="sm" className="absolute right-0 top-0 h-full px-3" onClick={() => setShowPassword(!showPassword)}>
|
||||
{showPassword ? <EyeOff className="w-4 h-4" /> : <Eye className="w-4 h-4" />}
|
||||
</Button>
|
||||
@@ -321,7 +321,7 @@ export default function Auth() {
|
||||
<Label htmlFor="confirmPassword">Confirm Password</Label>
|
||||
<div className="relative">
|
||||
<Lock className="absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" />
|
||||
<Input id="confirmPassword" name="confirmPassword" type="password" placeholder="Confirm your password" value={formData.confirmPassword} onChange={handleInputChange} className="pl-10" required />
|
||||
<Input id="confirmPassword" name="confirmPassword" type="password" placeholder="Confirm your password" value={formData.confirmPassword} onChange={handleInputChange} className="pl-10" autoComplete="new-password" required />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,13 +27,6 @@ serve(async (req) => {
|
||||
const formData = new FormData()
|
||||
formData.append('requireSignedURLs', 'false')
|
||||
|
||||
// Add metadata if provided
|
||||
if (metadata && Object.keys(metadata).length > 0) {
|
||||
for (const [key, value] of Object.entries(metadata)) {
|
||||
formData.append(`metadata.${key}`, String(value))
|
||||
}
|
||||
}
|
||||
|
||||
const directUploadResponse = await fetch(
|
||||
`https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/images/v2/direct_upload`,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user