mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Disable the User Setup prompt (#2501)
This commit is contained in:
@@ -284,47 +284,48 @@ export class WinUserSetupContribution implements IWorkbenchContribution {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onUpdateStateChange(state: UpdateState): void {
|
private onUpdateStateChange(state: UpdateState): void {
|
||||||
if (state.type !== StateType.Idle) {
|
// {{SQL CARBON EDIT}}
|
||||||
return;
|
return;
|
||||||
}
|
// if (state.type !== StateType.Idle) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
if (state.updateType !== UpdateType.Setup) {
|
// if (state.updateType !== UpdateType.Setup) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!this.environmentService.isBuilt || this.environmentService.disableUpdates) {
|
// if (!this.environmentService.isBuilt || this.environmentService.disableUpdates) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const neverShowAgain = new NeverShowAgain(WinUserSetupContribution.KEY, this.storageService);
|
// const neverShowAgain = new NeverShowAgain(WinUserSetupContribution.KEY, this.storageService);
|
||||||
|
// if (!neverShowAgain.shouldShow()) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
if (!neverShowAgain.shouldShow()) {
|
// const handle = this.notificationService.prompt(
|
||||||
return;
|
// severity.Info,
|
||||||
}
|
// nls.localize('usersetup', "We recommend switching to our new User Setup distribution of {0} for Windows! Click [here]({1}) to learn more.", product.nameShort, WinUserSetupContribution.READ_MORE),
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// label: nls.localize('downloadnow', "Download"),
|
||||||
|
// run: () => {
|
||||||
|
// const url = product.quality === 'insider'
|
||||||
|
// ? (process.arch === 'ia32' ? WinUserSetupContribution.INSIDER_URL_32BIT : WinUserSetupContribution.INSIDER_URL)
|
||||||
|
// : (process.arch === 'ia32' ? WinUserSetupContribution.STABLE_URL_32BIT : WinUserSetupContribution.STABLE_URL);
|
||||||
|
|
||||||
const handle = this.notificationService.prompt(
|
// return this.openerService.open(URI.parse(url));
|
||||||
severity.Info,
|
// }
|
||||||
nls.localize('usersetup', "We recommend switching to our new User Setup distribution of {0} for Windows! Click [here]({1}) to learn more.", product.nameShort, WinUserSetupContribution.READ_MORE),
|
// },
|
||||||
[
|
// {
|
||||||
{
|
// label: nls.localize('neveragain', "Don't Show Again"),
|
||||||
label: nls.localize('downloadnow', "Download"),
|
// isSecondary: true,
|
||||||
run: () => {
|
// run: () => {
|
||||||
const url = product.quality === 'insider'
|
// neverShowAgain.action.run(handle);
|
||||||
? (process.arch === 'ia32' ? WinUserSetupContribution.INSIDER_URL_32BIT : WinUserSetupContribution.INSIDER_URL)
|
// neverShowAgain.action.dispose();
|
||||||
: (process.arch === 'ia32' ? WinUserSetupContribution.STABLE_URL_32BIT : WinUserSetupContribution.STABLE_URL);
|
// }
|
||||||
|
// }]
|
||||||
return this.openerService.open(URI.parse(url));
|
// );
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: nls.localize('neveragain', "Don't Show Again"),
|
|
||||||
isSecondary: true,
|
|
||||||
run: () => {
|
|
||||||
neverShowAgain.action.run(handle);
|
|
||||||
neverShowAgain.action.dispose();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dispose(): void {
|
dispose(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user