Skip to content

Commit 8a8fc95

Browse files
--globalshanalikhan
authored andcommitted
1 parent 87df350 commit 8a8fc95

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

package.nls.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"cmd.otherOptions.quietSync.off": "Sync : Summary will be shown upon download / upload.",
7070
"cmd.otherOptions.warning.tokenNotRequire": "Sync : Settings Sync will not ask for GitHub Token from now on.",
7171
"cmd.otherOptions.error.toggleFail": "Sync : Unable to Toggle.",
72+
"cmd.otherOptions.triggerReset" : "Sync : Do you want to reset the settings ?",
7273
"common.info.installed": "Sync : Settings created, thank you for installing!",
7374
"common.info.needHelp": "Sync : Need Help configuring this extension?",
7475
"common.info.excludeFile": "Sync : You can exclude any file / folder for upload and settings for download.",
@@ -99,5 +100,7 @@
99100
"common.prompt.multipleGist": "Allows you to identify the settings if you have multiple gist.",
100101
"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.",
101102
"common.prompt.enterGithubAccessToken": "You also manually add a token (User Folder / syncLocalSettings.json). Press [Enter] or [Esc] to cancel.",
102-
"common.prompt.restartCode": "Do you want to reload to apply extensions and configurations?"
103+
"common.prompt.restartCode": "Do you want to reload to apply extensions and configurations?",
104+
"common.button.yes" :"Yes"
105+
103106
}

src/sync.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,18 @@ export class Sync {
735735
const common: Commons = new Commons(env, this.context);
736736
const setting: ExtensionConfig = await common.GetSettings();
737737
const customSettings: CustomSettings = await common.GetCustomSettings();
738+
if (customSettings == null) {
739+
vscode.window
740+
.showInformationMessage(
741+
localize("cmd.otherOptions.triggerReset"),
742+
localize("common.button.yes")
743+
)
744+
.then(val => {
745+
if (val === localize("common.button.yes")) {
746+
vscode.commands.executeCommand("extension.resetSettings");
747+
}
748+
});
749+
}
738750
const localSetting: LocalConfig = new LocalConfig();
739751
const tokenAvailable: boolean =
740752
customSettings.token != null && customSettings.token !== "";

0 commit comments

Comments
 (0)