Update
This commit is contained in:
@@ -8,7 +8,6 @@ import useVideoEditorStore from '@/stores/VideoEditorStore';
|
||||
// Import fonts first - this loads all Fontsource packages
|
||||
import '@/modules/editor/fonts';
|
||||
|
||||
import UpgradeSheet from '../upgrade/upgrade-sheet';
|
||||
import EditNavSidebar from './partials/edit-nav-sidebar';
|
||||
import EditSidebar from './partials/edit-sidebar';
|
||||
import EditorAISheet from './partials/editor-ai-sheet';
|
||||
@@ -218,7 +217,7 @@ const Editor = () => {
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<UpgradeSheet />
|
||||
{/* <UpgradeSheet /> */}
|
||||
<EditorAISheet />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ const VideoDownloadModal = ({
|
||||
const lastProgressTime = useRef(null);
|
||||
const lastProgress = useRef(0);
|
||||
|
||||
const { premiumExportRequest, premiumExportComplete } = useUserStore();
|
||||
const { premiumExportRequest, premiumExportComplete, basicExportRequest, basicExportComplete } = useUserStore();
|
||||
|
||||
const handleShareOrDownload = async () => {
|
||||
if (!videoBlob || !videoBlobFilename) {
|
||||
@@ -116,11 +116,28 @@ const VideoDownloadModal = ({
|
||||
}
|
||||
};
|
||||
|
||||
const handleExportWithWatermark = () => {
|
||||
const handleExportWithWatermark = async () => {
|
||||
setIsPremiumExport(false);
|
||||
setEstimatedTimeRemaining(null);
|
||||
setStatus('processing');
|
||||
handleDownloadButton();
|
||||
|
||||
// Call basicExportRequest and check response
|
||||
const response = await basicExportRequest();
|
||||
|
||||
if (response?.error) {
|
||||
// Halt the process if there's an error
|
||||
setIsPremiumExport(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (response?.success) {
|
||||
// Store the export token
|
||||
const token = response.success.data.export_token;
|
||||
console.log('Received basic export token:', token);
|
||||
setExportToken(token);
|
||||
// Continue with export if successful
|
||||
setStatus('processing');
|
||||
handleDownloadButton();
|
||||
}
|
||||
};
|
||||
|
||||
const handleClose = async () => {
|
||||
@@ -140,15 +157,18 @@ const VideoDownloadModal = ({
|
||||
useEffect(() => {
|
||||
if (status === 'processing' && exportProgress >= 100) {
|
||||
setStatus('complete');
|
||||
// Call premiumExportComplete immediately when export completes
|
||||
// Call appropriate export complete method based on export type
|
||||
if (isPremiumExport && exportToken) {
|
||||
console.log('Calling premiumExportComplete with token:', exportToken);
|
||||
premiumExportComplete(exportToken);
|
||||
} else if (isPremiumExport && !exportToken) {
|
||||
console.error('Premium export completed but no token available');
|
||||
} else if (!isPremiumExport && exportToken) {
|
||||
console.log('Calling basicExportComplete with token:', exportToken);
|
||||
basicExportComplete(exportToken);
|
||||
} else if (!exportToken) {
|
||||
console.error('Export completed but no token available');
|
||||
}
|
||||
}
|
||||
}, [exportProgress, status, isPremiumExport, exportToken, premiumExportComplete]);
|
||||
}, [exportProgress, status, isPremiumExport, exportToken, premiumExportComplete, basicExportComplete]);
|
||||
|
||||
// Calculate estimated time remaining based on progress speed
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Head } from '@inertiajs/react';
|
||||
import AuthUser from '@/modules/auth/auth-user';
|
||||
import Footer from '@/pages/home/partials/Footer.jsx';
|
||||
import { Head } from '@inertiajs/react';
|
||||
import React from 'react';
|
||||
|
||||
interface PrivacyProps {
|
||||
content: string;
|
||||
@@ -12,22 +11,19 @@ const Privacy: React.FC<PrivacyProps> = ({ content, title }) => {
|
||||
return (
|
||||
<div className="min-h-[100vh] bg-neutral-50 dark:bg-black">
|
||||
<Head title={title} />
|
||||
|
||||
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<div className="max-w-4xl mx-auto">
|
||||
<div className="bg-white dark:bg-neutral-900 rounded-lg shadow-lg p-8">
|
||||
<div
|
||||
className="max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: content }}
|
||||
/>
|
||||
<div className="mx-auto max-w-4xl">
|
||||
<div className="rounded-lg bg-white p-8 shadow-lg dark:bg-neutral-900">
|
||||
<div className="max-w-none" dangerouslySetInnerHTML={{ __html: content }} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<Footer />
|
||||
<AuthUser />
|
||||
{/* <AuthUser /> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Privacy;
|
||||
export default Privacy;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Head } from '@inertiajs/react';
|
||||
import AuthUser from '@/modules/auth/auth-user';
|
||||
import Footer from '@/pages/home/partials/Footer.jsx';
|
||||
import { Head } from '@inertiajs/react';
|
||||
import React from 'react';
|
||||
|
||||
interface TermsProps {
|
||||
content: string;
|
||||
@@ -12,22 +11,19 @@ const Terms: React.FC<TermsProps> = ({ content, title }) => {
|
||||
return (
|
||||
<div className="min-h-[100vh] bg-neutral-50 dark:bg-black">
|
||||
<Head title={title} />
|
||||
|
||||
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<div className="max-w-4xl mx-auto">
|
||||
<div className="bg-white dark:bg-neutral-900 rounded-lg shadow-lg p-8">
|
||||
<div
|
||||
className="max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: content }}
|
||||
/>
|
||||
<div className="mx-auto max-w-4xl">
|
||||
<div className="rounded-lg bg-white p-8 shadow-lg dark:bg-neutral-900">
|
||||
<div className="max-w-none" dangerouslySetInnerHTML={{ __html: content }} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<Footer />
|
||||
<AuthUser />
|
||||
{/* <AuthUser /> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Terms;
|
||||
export default Terms;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import AuthUser from '@/modules/auth/auth-user';
|
||||
import { useEffect, useState } from 'react';
|
||||
import FAQDiscord from './partials/FAQDiscord.jsx';
|
||||
import Features from './partials/Features.jsx';
|
||||
@@ -36,7 +35,7 @@ const Home = ({ faqData }) => {
|
||||
<FAQDiscord faqData={faqData} />
|
||||
</div>
|
||||
<Footer />
|
||||
<AuthUser />
|
||||
{/* <AuthUser /> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -108,6 +108,46 @@ const useUserStore = create(
|
||||
console.error('Error fetching:', error);
|
||||
}
|
||||
},
|
||||
|
||||
basicExportRequest: async () => {
|
||||
try {
|
||||
const response = await axiosInstance.post(route('api.basic_export.request'));
|
||||
|
||||
if (response?.data?.success?.message) {
|
||||
toast.success(response.data.success.message);
|
||||
}
|
||||
|
||||
if (response?.data?.error?.message) {
|
||||
toast.error(response.data.error.message);
|
||||
}
|
||||
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error(route('api.basic_export.request'));
|
||||
console.error('Error fetching:', error);
|
||||
}
|
||||
},
|
||||
|
||||
basicExportComplete: async (exportToken) => {
|
||||
try {
|
||||
const response = await axiosInstance.post(route('api.basic_export.complete'), {
|
||||
export_token: exportToken,
|
||||
});
|
||||
|
||||
if (response?.data?.success?.message) {
|
||||
toast.success(response.data.success.message);
|
||||
}
|
||||
|
||||
if (response?.data?.error?.message) {
|
||||
toast.error(response.data.error.message);
|
||||
}
|
||||
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error(route('api.basic_export.complete'));
|
||||
console.error('Error fetching:', error);
|
||||
}
|
||||
},
|
||||
})),
|
||||
{
|
||||
name: 'UserStore',
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user