diff --git a/package.nls.json b/package.nls.json index 5aeaa472..4a88d4db 100644 --- a/package.nls.json +++ b/package.nls.json @@ -69,6 +69,7 @@ "cmd.otherOptions.quietSync.off": "Sync : Summary will be shown upon download / upload.", "cmd.otherOptions.warning.tokenNotRequire": "Sync : Settings Sync will not ask for GitHub Token from now on.", "cmd.otherOptions.error.toggleFail": "Sync : Unable to Toggle.", + "cmd.otherOptions.triggerReset" : "Sync : Do you want to reset the settings ?", "common.info.installed": "Sync : Settings created, thank you for installing!", "common.info.needHelp": "Sync : Need Help configuring this extension?", "common.info.excludeFile": "Sync : You can exclude any file / folder for upload and settings for download.", @@ -99,5 +100,7 @@ "common.prompt.multipleGist": "Allows you to identify the settings if you have multiple gist.", "common.prompt.enterGistId": "Enter Gist Id from previously uploaded settings. You can also set manually in code settings (sync.gist). Press [Enter] or [Esc] to cancel.", "common.prompt.enterGithubAccessToken": "You also manually add a token (User Folder / syncLocalSettings.json). Press [Enter] or [Esc] to cancel.", - "common.prompt.restartCode": "Do you want to reload to apply extensions and configurations?" + "common.prompt.restartCode": "Do you want to reload to apply extensions and configurations?", + "common.button.yes" :"Yes" + } diff --git a/src/sync.ts b/src/sync.ts index 8b4bd6b3..c2c6edbd 100644 --- a/src/sync.ts +++ b/src/sync.ts @@ -735,6 +735,18 @@ export class Sync { const common: Commons = new Commons(env, this.context); const setting: ExtensionConfig = await common.GetSettings(); const customSettings: CustomSettings = await common.GetCustomSettings(); + if (customSettings == null) { + vscode.window + .showInformationMessage( + localize("cmd.otherOptions.triggerReset"), + localize("common.button.yes") + ) + .then(val => { + if (val === localize("common.button.yes")) { + vscode.commands.executeCommand("extension.resetSettings"); + } + }); + } const localSetting: LocalConfig = new LocalConfig(); const tokenAvailable: boolean = customSettings.token != null && customSettings.token !== "";