fix: add web project folder picker and isolated HTML file previews
This commit is contained in:
@@ -40,6 +40,13 @@ export class DesktopBridge {
|
||||
const error = await this.shell.openPath(project.root); if (error) throw desktopError('系统无法打开所属项目目录。');
|
||||
return { opened: true, projectId: project.id, root: project.root };
|
||||
}
|
||||
if (action === 'openFilePreview') {
|
||||
const access = await this.controller.api('/local-file-preview-access?url=' + encodeURIComponent(value.url));
|
||||
if (!access.allowed || access.projectId !== value.projectId) throw desktopError('此预览已关闭或不属于当前项目。');
|
||||
assertDesktopFrame(event, this.getWindow(), this.controller.url);
|
||||
await this.shell.openExternal(value.url);
|
||||
return { opened: true };
|
||||
}
|
||||
if (action === 'reviewTask') {
|
||||
const session = await this.task(value); await this.project(value.projectId);
|
||||
return { projectId: session.projectId, sessionId: session.id, taskId: value.taskId, eventSeq: session.eventSeq };
|
||||
|
||||
Reference in New Issue
Block a user