feat(预览): 支持更多文本文件类型预览并增强URL处理
添加对js和html文件类型的文本预览支持,并改进预览组件的URL处理逻辑。现在能自动补全相对路径为完整URL,同时增加详细的日志记录以便调试。
This commit is contained in:
@@ -83,7 +83,7 @@ class FileCard(CardWidget):
|
||||
"gif",
|
||||
]:
|
||||
signalBus.imagePreviewSignal.emit(self._id)
|
||||
if self.fileType == "file" and self.suffix in ["txt", "py", "md"]:
|
||||
if self.fileType == "file" and self.suffix in ["txt", "py", "md", "js", "html"]:
|
||||
signalBus.txtPreviewSignal.emit(self._id)
|
||||
|
||||
def downloadFile(self):
|
||||
|
||||
Reference in New Issue
Block a user