mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
UX affordance when settings are only initialized but sync is not turned on
- Show the badge on gear icon - Have an action in gear dropdown to explain and turn on sync
This commit is contained in:
@@ -276,6 +276,22 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
|
||||
throw new Error(localize('no account', "No account available"));
|
||||
}
|
||||
|
||||
await this.turnOnUsingCurrentAccount();
|
||||
}
|
||||
|
||||
async turnOnUsingCurrentAccount(): Promise<void> {
|
||||
if (this.userDataAutoSyncEnablementService.isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.userDataSyncService.status !== SyncStatus.Idle) {
|
||||
throw new Error('Cannont turn on sync while syncing');
|
||||
}
|
||||
|
||||
if (this.accountStatus !== AccountStatus.Available) {
|
||||
throw new Error(localize('no account', "No account available"));
|
||||
}
|
||||
|
||||
const syncTitle = SYNC_TITLE;
|
||||
const title = `${syncTitle} [(${localize('show log', "show log")})](command:${SHOW_SYNC_LOG_COMMAND_ID})`;
|
||||
const manualSyncTask = await this.userDataSyncService.createManualSyncTask();
|
||||
|
||||
Reference in New Issue
Block a user