added free trial timer at welcome screen
This commit is contained in:
@ -33,6 +33,8 @@ import {
|
||||
MapPin,
|
||||
Music,
|
||||
ListVideo,
|
||||
Clock,
|
||||
AlertTriangle,
|
||||
} from 'lucide-react';
|
||||
|
||||
const LAST_MEDIA_PATH_KEY = 'talkedit:lastMediaPath';
|
||||
@ -136,6 +138,8 @@ export default function App() {
|
||||
const [lastSavedSignature, setLastSavedSignature] = useState<string | null>(null);
|
||||
const [showFileMenu, setShowFileMenu] = useState(false);
|
||||
const canEdit = useLicenseStore((s) => s.canEdit);
|
||||
const licenseStatus = useLicenseStore((s) => s.status);
|
||||
const setShowLicenseDialog = useLicenseStore((s) => s.setShowDialog);
|
||||
|
||||
const projectSignature = useMemo(() => {
|
||||
if (!videoPath) return null;
|
||||
@ -505,7 +509,8 @@ export default function App() {
|
||||
|
||||
if (!videoPath) {
|
||||
return (
|
||||
<div className="h-screen flex flex-col items-center justify-center gap-8 bg-editor-bg px-6">
|
||||
<div className="h-screen flex flex-col bg-editor-bg">
|
||||
<div className="flex-1 flex flex-col items-center justify-center gap-8 px-6">
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
<Film className="w-14 h-14 text-editor-accent opacity-80" />
|
||||
<h1 className="text-3xl font-semibold tracking-tight">TalkEdit</h1>
|
||||
@ -564,6 +569,35 @@ export default function App() {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{licenseStatus?.tag === 'Trial' && (
|
||||
<div className="h-9 flex items-center justify-center gap-2 px-4 bg-editor-accent/10 border-t border-editor-accent/20 shrink-0">
|
||||
<Clock className="w-3.5 h-3.5 text-editor-accent shrink-0" />
|
||||
<span className="text-xs text-editor-accent">
|
||||
Free trial: {licenseStatus.days_remaining} day{licenseStatus.days_remaining !== 1 ? 's' : ''} remaining
|
||||
</span>
|
||||
<button
|
||||
onClick={() => setShowLicenseDialog(true)}
|
||||
className="text-xs text-editor-accent underline font-medium hover:text-editor-accent-hover ml-2"
|
||||
>
|
||||
Activate license
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{licenseStatus?.tag === 'Expired' && (
|
||||
<div className="h-9 flex items-center justify-center gap-2 px-4 bg-red-500/15 border-t border-red-500/30 shrink-0">
|
||||
<AlertTriangle className="w-3.5 h-3.5 text-red-400 shrink-0" />
|
||||
<span className="text-xs text-red-300">Trial expired</span>
|
||||
<button
|
||||
onClick={() => setShowLicenseDialog(true)}
|
||||
className="text-xs text-red-300 underline font-medium hover:text-red-200 ml-2"
|
||||
>
|
||||
Activate license
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user