feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { writeClipboardText } from '../../../../../helpers/clipboard';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Card,
|
||||
@@ -40,6 +41,7 @@ import {
|
||||
Loader2,
|
||||
} from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { showError, showSuccess } from '../../../../../helpers';
|
||||
import {
|
||||
canCancelVideoTask,
|
||||
canRegenerateVideoTask,
|
||||
@@ -164,20 +166,9 @@ const VideoPreviewPanel = ({
|
||||
|
||||
// 复制到剪贴板
|
||||
const copyToClipboard = (text) => {
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
// 可以添加提示
|
||||
console.log('链接已复制到剪贴板');
|
||||
});
|
||||
} else {
|
||||
// 兼容旧浏览器
|
||||
const textArea = document.createElement('textarea');
|
||||
textArea.value = text;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textArea);
|
||||
}
|
||||
writeClipboardText(text)
|
||||
.then(() => showSuccess(t('链接已复制')))
|
||||
.catch(() => showError(t('复制失败,请手动复制')));
|
||||
};
|
||||
|
||||
// 处理生成视频(同时关闭当前播放的视频)
|
||||
|
||||
Reference in New Issue
Block a user