feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面

This commit is contained in:
zhanjunhao
2026-11-09 21:45:37 +08:00
parent 9fc5fd212d
commit 28e924e371
242 changed files with 9242 additions and 5043 deletions
@@ -17,15 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { copyText } from '../../../../helpers/clipboard';
import React, { useState, useEffect } from 'react';
import {
Modal,
Image,
Button,
Space,
Typography,
Tag,
} from '@/components/ui';
import { Modal, Image, Button, Space, Typography, Tag } from '@/components/ui';
import { Download, Copy, ImagePlus, Sparkles } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { showSuccess, showError } from '../../../../helpers';
@@ -83,30 +77,7 @@ const ImageDetailModal = ({
};
// 复制(带 execCommand 兜底,兼容 http / 老浏览器)
const copyToClipboard = async (text) => {
if (navigator.clipboard && window.isSecureContext) {
try {
await navigator.clipboard.writeText(text);
return true;
} catch (err) {
console.warn('Clipboard API failed:', err);
}
}
try {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.left = '-9999px';
document.body.appendChild(textArea);
textArea.select();
const ok = document.execCommand('copy');
document.body.removeChild(textArea);
return ok;
} catch (err) {
console.error('execCommand copy failed:', err);
return false;
}
};
const copyToClipboard = copyText;
const handleCopyPrompt = async () => {
if (!task.prompt) return;
@@ -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 { copyText } from '../../../../helpers/clipboard';
import React, { useState, useMemo, useEffect, useRef } from 'react';
import {
Empty,
@@ -443,30 +444,7 @@ const ImageTaskList = ({
}
};
const copyToClipboard = async (text) => {
if (navigator.clipboard && window.isSecureContext) {
try {
await navigator.clipboard.writeText(text);
return true;
} catch (err) {
console.warn('Clipboard API failed:', err);
}
}
try {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.left = '-9999px';
document.body.appendChild(textArea);
textArea.select();
const ok = document.execCommand('copy');
document.body.removeChild(textArea);
return ok;
} catch (err) {
console.error('execCommand copy failed:', err);
return false;
}
};
const copyToClipboard = copyText;
const handleCopyPrompt = async (prompt) => {
if (!prompt) return;
@@ -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('复制失败,请手动复制')));
};
// 处理生成视频(同时关闭当前播放的视频)