fix(electron): tab title/icon default state (#7731)

This commit is contained in:
pengx17
2024-08-05 07:39:51 +00:00
parent 561fa46232
commit 5f52547d9e
2 changed files with 6 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ export class Workbench extends Entity {
return this.framework.createEntity(View, { return this.framework.createEntity(View, {
id: meta.id, id: meta.id,
defaultLocation: meta.path, defaultLocation: meta.path,
icon: meta.icon,
title: meta.title,
}); });
}) })
); );

View File

@@ -3,11 +3,15 @@ import type { GlobalStateService } from '@toeverything/infra';
import { createIdentifier, Service } from '@toeverything/infra'; import { createIdentifier, Service } from '@toeverything/infra';
import { nanoid } from 'nanoid'; import { nanoid } from 'nanoid';
import type { ViewIconName } from '../constants';
export type WorkbenchDefaultState = { export type WorkbenchDefaultState = {
basename: string; basename: string;
views: { views: {
id: string; id: string;
path?: { pathname?: string; hash?: string; search?: string }; path?: { pathname?: string; hash?: string; search?: string };
icon?: ViewIconName;
title?: string;
}[]; }[];
activeViewIndex: number; activeViewIndex: number;
}; };