Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
--global authored and shanalikhan committed Nov 26, 2018
1 parent 87df350 commit 8a8fc95
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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"

}
12 changes: 12 additions & 0 deletions src/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 !== "";
Expand Down

0 comments on commit 8a8fc95

Please sign in to comment.