mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-25 05:51:04 -08:00
fix: not properly log errors from services
This commit is contained in:
parent
21c9894fb9
commit
ea7fb46337
12 changed files with 153 additions and 110 deletions
|
|
@ -124,7 +124,7 @@ export class WorkspaceView implements IWorkspaceViewService {
|
|||
);
|
||||
}
|
||||
|
||||
public async createWorkspaceView(workspaceOptions: INewWorkspaceConfig): Promise<void> {
|
||||
public async createWorkspaceView(workspaceOptions: INewWorkspaceConfig): Promise<IWorkspace> {
|
||||
const newWorkspace = await this.workspaceService.create(workspaceOptions);
|
||||
const mainWindow = this.windowService.get(WindowNames.main);
|
||||
if (mainWindow !== undefined) {
|
||||
|
|
@ -138,6 +138,7 @@ export class WorkspaceView implements IWorkspaceViewService {
|
|||
if (typeof workspaceOptions.picturePath === 'string') {
|
||||
await this.workspaceService.setWorkspacePicture(newWorkspace.id, workspaceOptions.picturePath);
|
||||
}
|
||||
return newWorkspace;
|
||||
}
|
||||
|
||||
public async setWorkspaceView(id: string, workspaceOptions: IWorkspace): Promise<void> {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { IWorkspace, INewWorkspaceConfig } from '@services/workspaces/interface'
|
|||
* Deal with operations that needs to create a workspace and a browserView at once
|
||||
*/
|
||||
export interface IWorkspaceViewService {
|
||||
createWorkspaceView(workspaceOptions: INewWorkspaceConfig): Promise<void>;
|
||||
createWorkspaceView(workspaceOptions: INewWorkspaceConfig): Promise<IWorkspace>;
|
||||
initializeAllWorkspaceView(): Promise<void>;
|
||||
setWorkspaceView(id: string, workspaceOptions: IWorkspace): Promise<void>;
|
||||
setWorkspaceViews(workspaces: Record<string, IWorkspace>): Promise<void>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue