Browse Source

Adds views upgrade notification

main
Eric Amodio 4 years ago
parent
commit
64e9216003
2 changed files with 23 additions and 6 deletions
  1. +5
    -5
      src/extension.ts
  2. +18
    -1
      src/messages.ts

+ 5
- 5
src/extension.ts View File

@ -176,12 +176,12 @@ async function showWelcomeOrWhatsNew(version: string, previousVersion: string |
return;
}
// Show the Welcome for v10 since its all new
if (major !== prevMajor && major === 10) {
await commands.executeCommand(Commands.ShowWelcomePage);
}
if (Container.config.showWhatsNewAfterUpgrades && major !== prevMajor) {
await Messages.showWhatsNewMessage(version);
}
// Show a views upgrade notification
if (major !== prevMajor && major === 11) {
await Messages.showViewsUpgradeMessage();
}
}

+ 18
- 1
src/messages.ts View File

@ -1,5 +1,6 @@
'use strict';
import { ConfigurationTarget, env, MessageItem, Uri, window } from 'vscode';
import { commands, ConfigurationTarget, env, MessageItem, Uri, window } from 'vscode';
import { Commands } from './commands';
import { configuration } from './configuration';
import { GitCommit } from './git/git';
import { Logger } from './logger';
@ -94,6 +95,22 @@ export class Messages {
);
}
static async showViewsUpgradeMessage() {
const openSettings: MessageItem = { title: 'Open Settings' };
const result = await Messages.showMessage(
'info',
'GitLens 11 has replaced the Repositories view with many new views, and integrated the Line History view into the File History view. To re-enable either of these views, open the GitLens Interactive Settings.',
undefined,
null,
openSettings,
);
if (result === openSettings) {
await commands.executeCommand(Commands.ShowSettingsPageAndJumpToRepositoriesView);
}
}
static async showWhatsNewMessage(version: string) {
const actions: MessageItem[] = [{ title: "What's New" }, { title: 'Release Notes' }, { title: '❤' }];

Loading…
Cancel
Save