mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 20:58:38 +00:00
feat: add video preview modal
This commit is contained in:
@@ -211,6 +211,7 @@ export const getTaskLogsColumns = ({
|
||||
copyText,
|
||||
openContentModal,
|
||||
isAdminUser,
|
||||
openVideoModal,
|
||||
}) => {
|
||||
return [
|
||||
{
|
||||
@@ -342,7 +343,13 @@ export const getTaskLogsColumns = ({
|
||||
const isUrl = typeof text === 'string' && /^https?:\/\//.test(text);
|
||||
if (isSuccess && isVideoTask && isUrl) {
|
||||
return (
|
||||
<a href={text} target="_blank" rel="noopener noreferrer">
|
||||
<a
|
||||
href="#"
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
openVideoModal(text);
|
||||
}}
|
||||
>
|
||||
{t('点击预览视频')}
|
||||
</a>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user