Merge branch 'develop' into release/1.1.11-beta

This commit is contained in:
JackLian 2023-09-26 17:46:33 +08:00
commit 3435aacb81
2 changed files with 7 additions and 5 deletions

View File

@ -64,7 +64,6 @@ export class SettingsPrimaryPane extends Component<ISettingsPrimaryPaneProps, {
<div className="lc-settings-navigator"> <div className="lc-settings-navigator">
{createIcon(settings.componentMeta?.icon, { {createIcon(settings.componentMeta?.icon, {
className: 'lc-settings-navigator-icon', className: 'lc-settings-navigator-icon',
class: 'lc-settings-navigator-icon',
})} })}
<Title title={settings.componentMeta!.title} /> <Title title={settings.componentMeta!.title} />
<span> x {settings.nodes.length}</span> <span> x {settings.nodes.length}</span>

View File

@ -130,7 +130,9 @@ export class Workspace implements IWorkspace {
} }
const windowInfo = this.windowQueue.shift(); const windowInfo = this.windowQueue.shift();
if (windowInfo) { if (windowInfo instanceof Resource) {
this.openEditorWindowByResource(windowInfo);
} else if (windowInfo) {
this.openEditorWindow(windowInfo.name, windowInfo.title, windowInfo.options, windowInfo.viewName); this.openEditorWindow(windowInfo.name, windowInfo.title, windowInfo.options, windowInfo.viewName);
} }
} }
@ -251,7 +253,7 @@ export class Workspace implements IWorkspace {
} }
async openEditorWindowByResource(resource: IResource, sleep: boolean = false): Promise<void> { async openEditorWindowByResource(resource: IResource, sleep: boolean = false): Promise<void> {
if (this.window && !this.window?.initReady && !sleep) { if (this.window && !this.window.sleep && !this.window?.initReady && !sleep) {
this.windowQueue.push(resource); this.windowQueue.push(resource);
return; return;
} }
@ -292,7 +294,7 @@ export class Workspace implements IWorkspace {
} }
async openEditorWindow(name: string, title: string, options: Object, viewName?: string, sleep?: boolean) { async openEditorWindow(name: string, title: string, options: Object, viewName?: string, sleep?: boolean) {
if (this.window && !this.window?.initReady && !sleep) { if (this.window && !this.window.sleep && !this.window?.initReady && !sleep) {
this.windowQueue.push({ this.windowQueue.push({
name, title, options, viewName, name, title, options, viewName,
}); });
@ -304,7 +306,7 @@ export class Workspace implements IWorkspace {
return; return;
} }
this.window?.updateState(WINDOW_STATE.inactive); this.window?.updateState(WINDOW_STATE.inactive);
const filterWindows = this.windows.filter(d => (d.resource?.name === name && d.resource.title == title)); const filterWindows = this.windows.filter(d => (d.resource?.name === name && d.resource.title == title) || (d.resource.id == title));
if (filterWindows && filterWindows.length) { if (filterWindows && filterWindows.length) {
this.window = filterWindows[0]; this.window = filterWindows[0];
if (!sleep && this.window.sleep) { if (!sleep && this.window.sleep) {
@ -320,6 +322,7 @@ export class Workspace implements IWorkspace {
resourceName: name, resourceName: name,
title, title,
options, options,
id: title?.toString(),
}, resourceType, this); }, resourceType, this);
const window = new EditorWindow(resource, this, { const window = new EditorWindow(resource, this, {
title, title,