mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-24 13:30:59 -08:00
feat: restart current workspace
This commit is contained in:
parent
992b2d9918
commit
54db442550
4 changed files with 21 additions and 12 deletions
|
|
@ -276,6 +276,15 @@ export class WorkspaceView implements IWorkspaceViewService {
|
|||
this.viewService.removeView(id);
|
||||
}
|
||||
|
||||
public async restartWorkspaceViewService(id?: string): Promise<void> {
|
||||
const workspaceToRestart = id !== undefined ? await this.workspaceService.get(id) : await this.workspaceService.getActiveWorkspace();
|
||||
if (workspaceToRestart !== undefined) {
|
||||
await this.wikiService.restartWiki(workspaceToRestart);
|
||||
await this.viewService.reloadViewsWebContents(workspaceToRestart.id);
|
||||
await this.wikiService.wikiOperation(WikiChannel.generalNotification, [i18n.t('ContextMenu.RestartServiceComplete')]);
|
||||
}
|
||||
}
|
||||
|
||||
public async clearBrowsingDataWithConfirm(): Promise<void> {
|
||||
const availableWindowToShowDialog = this.windowService.get(WindowNames.preferences) ?? this.windowService.get(WindowNames.main);
|
||||
if (availableWindowToShowDialog !== undefined) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ export interface IWorkspaceViewService {
|
|||
printTiddler(tiddlerName?: string | undefined): Promise<void>;
|
||||
realignActiveWorkspace(): Promise<void>;
|
||||
removeWorkspaceView(id: string): Promise<void>;
|
||||
restartWorkspaceViewService(id?: string | undefined): Promise<void>;
|
||||
setActiveWorkspaceView(id: string): Promise<void>;
|
||||
setWorkspaceView(id: string, workspaceOptions: IWorkspace): Promise<void>;
|
||||
setWorkspaceViews(workspaces: Record<string, IWorkspace>): Promise<void>;
|
||||
|
|
@ -48,6 +49,7 @@ export const WorkspaceViewServiceIPCDescriptor = {
|
|||
printTiddler: ProxyPropertyType.Function,
|
||||
realignActiveWorkspace: ProxyPropertyType.Function,
|
||||
removeWorkspaceView: ProxyPropertyType.Function,
|
||||
restartWorkspaceViewService: ProxyPropertyType.Function,
|
||||
setActiveWorkspaceView: ProxyPropertyType.Function,
|
||||
setWorkspaceView: ProxyPropertyType.Function,
|
||||
setWorkspaceViews: ProxyPropertyType.Function,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue