refactor: allow send message to server side

This commit is contained in:
linonetwo 2023-10-16 20:09:17 +08:00
parent 219ba38e57
commit 24446cea6f
30 changed files with 494 additions and 487 deletions

View file

@ -92,10 +92,10 @@ export class Git implements IGitService {
*/
const githubRepoName = `${userName}/${repoName}`;
if (await this.wikiService.getTiddlerText(workspace, '$:/GitHub/Repo') !== githubRepoName) {
await this.wikiService.wikiOperation(WikiChannel.addTiddler, workspace.id, '$:/GitHub/Repo', githubRepoName);
await this.wikiService.wikiOperationInBrowser(WikiChannel.addTiddler, workspace.id, ['$:/GitHub/Repo', githubRepoName]);
}
if (await this.wikiService.getTiddlerText(workspace, '$:/GitHub/Branch') !== branch) {
await this.wikiService.wikiOperation(WikiChannel.addTiddler, workspace.id, '$:/GitHub/Branch', branch);
await this.wikiService.wikiOperationInBrowser(WikiChannel.addTiddler, workspace.id, ['$:/GitHub/Branch', branch]);
}
}
@ -247,7 +247,7 @@ export class Git implements IGitService {
});
private createFailedNotification(message: string, workspaceID: string) {
this.wikiService.wikiOperation(WikiChannel.generalNotification, workspaceID, `${i18n.t('Log.SynchronizationFailed')} ${message}`);
void this.wikiService.wikiOperationInBrowser(WikiChannel.generalNotification, workspaceID, [`${i18n.t('Log.SynchronizationFailed')} ${message}`]);
}
private createFailedDialog(message: string, wikiFolderPath: string): void {