Update Owliver language and suggestions

This commit is contained in:
2026-10-07 19:15:44 +05:30
parent 8ac4e1ee88
commit 81e5979f8f
156 changed files with 7330 additions and 1755 deletions

View File

@@ -3,6 +3,7 @@ import React, { useState } from 'react';
import { Loader2, Camera } from 'lucide-react';
import { base44 } from '@/api/base44Client';
import { Image } from '@/components/ui/image';
import { useTranslation } from 'react-i18next';
// Photo or video proof — capture/upload, then submit for AI evaluation.
interface MediaChallengeProps {
@@ -12,6 +13,7 @@ interface MediaChallengeProps {
}
export default function MediaChallenge({ course, onSubmit, submitting }: MediaChallengeProps) {
const { t } = useTranslation();
const type = course?.challenge?.type || 'photo';
const [mediaUrl, setMediaUrl] = useState('');
const [uploading, setUploading] = useState(false);
@@ -43,7 +45,7 @@ export default function MediaChallenge({ course, onSubmit, submitting }: MediaCh
{type === 'video' ? (
<video src={mediaUrl} controls className="w-full max-h-64 object-cover" />
) : (
<Image src={mediaUrl} alt="Your proof" className="w-full max-h-64 object-cover" fittingType="fill" />
<Image src={mediaUrl} alt={t('mediaChallenge.yourProof')} className="w-full max-h-64 object-cover" fittingType="fill" />
)}
</div>
) : (
@@ -53,7 +55,7 @@ export default function MediaChallenge({ course, onSubmit, submitting }: MediaCh
) : (
<>
<Camera className="w-6 h-6 text-ink-4 mb-2" />
<span className="text-[13px] text-ink-3">Tap to {type === 'video' ? 'record' : 'capture'}</span>
<span className="text-[13px] text-ink-3">{t('mediaChallenge.tapTo')} {type === 'video' ? 'record' : 'capture'}</span>
</>
)}
<input type="file" accept={accept} capture={capture} onChange={handleFile} className="hidden" disabled={uploading || submitting} />
@@ -61,14 +63,14 @@ export default function MediaChallenge({ course, onSubmit, submitting }: MediaCh
)}
<div className="flex gap-2">
{mediaUrl && (
<button onClick={() => setMediaUrl('')} className="h-10 px-4 rounded-xl border border-border text-[13px] font-medium text-ink-3">Retake</button>
<button onClick={() => setMediaUrl('')} className="h-10 px-4 rounded-xl border border-border text-[13px] font-medium text-ink-3">{t('mediaChallenge.retake')}</button>
)}
<button
onClick={() => onSubmit(mediaUrl)}
disabled={!mediaUrl || uploading || submitting}
className="flex-1 h-10 rounded-xl bg-krow-navy text-white text-[13px] font-semibold disabled:opacity-40"
>
Submit proof for AI evaluation
{t('mediaChallenge.submitProofForAiEvaluation')}
</button>
</div>
</div>