This commit is contained in:
@@ -116,6 +116,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modalFilesSection" style="display: none;">
|
||||
<h4 class="text-lg font-semibold text-gray-900 mb-3 flex items-center"><i class="fas fa-file-powerpoint mr-2 text-orange-500"></i>项目文件</h4>
|
||||
<div id="modalFilesList" class="bg-gray-50 p-4 rounded-lg border border-gray-100 space-y-2">
|
||||
<!-- Files will be injected here -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="aiResultSection" style="display:none;" class="border border-indigo-100 rounded-xl overflow-hidden">
|
||||
<div class="bg-indigo-50 px-4 py-3 border-b border-indigo-100 flex items-center">
|
||||
<i class="fas fa-robot text-indigo-600 mr-2"></i>
|
||||
@@ -548,6 +555,39 @@ async function viewProject(id) {
|
||||
audioSection.classList.add('justify-center');
|
||||
}
|
||||
|
||||
// Render Project Files (PPT/PDF)
|
||||
const filesSection = document.getElementById('modalFilesSection');
|
||||
const filesList = document.getElementById('modalFilesList');
|
||||
if (data.files && data.files.length > 0) {
|
||||
filesSection.style.display = 'block';
|
||||
filesList.innerHTML = data.files.map(file => {
|
||||
let iconClass = 'fas fa-file';
|
||||
let iconColor = 'text-gray-500';
|
||||
if (file.file_type === 'ppt' || file.file_type === 'pptx') {
|
||||
iconClass = 'fas fa-file-powerpoint';
|
||||
iconColor = 'text-orange-500';
|
||||
} else if (file.file_type === 'pdf') {
|
||||
iconClass = 'fas fa-file-pdf';
|
||||
iconColor = 'text-red-500';
|
||||
} else if (file.file_type === 'video') {
|
||||
iconClass = 'fas fa-video';
|
||||
iconColor = 'text-purple-500';
|
||||
} else if (file.file_type === 'image') {
|
||||
iconClass = 'fas fa-image';
|
||||
iconColor = 'text-green-500';
|
||||
}
|
||||
return `
|
||||
<a href="${file.file_url}" target="_blank" class="flex items-center p-3 bg-white rounded-lg border border-gray-200 hover:bg-gray-50 hover:border-blue-300 transition-colors group">
|
||||
<i class="${iconClass} ${iconColor} text-xl mr-3 group-hover:scale-110 transition-transform"></i>
|
||||
<span class="flex-1 text-sm font-medium text-gray-700 truncate">${file.name || '未命名文件'}</span>
|
||||
<i class="fas fa-external-link-alt text-gray-400 group-hover:text-blue-500"></i>
|
||||
</a>
|
||||
`;
|
||||
}).join('');
|
||||
} else {
|
||||
filesSection.style.display = 'none';
|
||||
}
|
||||
|
||||
// AI Result
|
||||
const aiSection = document.getElementById('aiResultSection');
|
||||
if (data.ai_result) {
|
||||
|
||||
Reference in New Issue
Block a user