Sfoglia il codice sorgente

Add possibility to disable all welcome screens. Fixes #1049. (#1258)

main
Rickard 4 anni fa
committed by GitHub
parent
commit
b30f4bcf0d
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
4 ha cambiato i file con 15 aggiunte e 3 eliminazioni
  1. +2
    -1
      README.md
  2. +8
    -2
      package.json
  3. +1
    -0
      src/config.ts
  4. +4
    -0
      src/extension.ts

+ 2
- 1
README.md Vedi File

@ -903,7 +903,8 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| `gitlens.insiders` | Specifies whether to enable experimental features |
| `gitlens.liveshare.allowGuestAccess` | Specifies whether to allow guest access to GitLens features when using Visual Studio Live Share |
| `gitlens.outputLevel` | Specifies how much (if any) output will be sent to the GitLens output channel |
| `gitlens.showWhatsNewAfterUpgrades` | Specifies whether to show What's New after upgrading to new feature releases |
| `gitlens.showWelcomeOrWhatsNew` | Specifies whether to show the Welcome (Quick Setup) experience on first install, or the What's New notification after upgrading to new feature releases |
| `gitlens.showWhatsNewAfterUpgrades` | Specifies whether to show the What's New notification after upgrading to new feature releases |
| `gitlens.advanced.abbreviatedShaLength` | Specifies the length of abbreviated commit SHAs (shas) |
| `gitlens.advanced.blame.customArguments` | Specifies additional arguments to pass to the `git blame` command |
| `gitlens.advanced.blame.delayAfterEdit` | Specifies the time (in milliseconds) to wait before re-blaming an unsaved document after an edit. Use 0 to specify an infinite wait |

+ 8
- 2
package.json Vedi File

@ -1463,10 +1463,16 @@
"markdownDescription": "Specifies user-defined remote (code-hosting) services or custom domains for built-in remote services",
"scope": "resource"
},
"gitlens.showWelcomeOrWhatsNew": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to show the Welcome (Quick Setup) experience on first install, or the What's New notification after upgrading to new feature releases",
"scope": "window"
},
"gitlens.showWhatsNewAfterUpgrades": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to show What's New after upgrading to new feature releases",
"markdownDescription": "Specifies whether to show the What's New notification after upgrading to new feature releases",
"scope": "window"
},
"gitlens.sortBranchesBy": {
@ -2600,7 +2606,7 @@
},
{
"command": "gitlens.showWelcomePage",
"title": "Welcome",
"title": "Welcome (Quick Setup)",
"category": "GitLens"
},
{

+ 1
- 0
src/config.ts Vedi File

@ -108,6 +108,7 @@ export interface Config {
modes: Record<string, ModeConfig>;
outputLevel: TraceLevel;
remotes: RemotesConfig[] | null;
showWelcomeOrWhatsNew: boolean;
showWhatsNewAfterUpgrades: boolean;
sortBranchesBy: BranchSorting;
sortTagsBy: TagSorting;

+ 4
- 0
src/extension.ts Vedi File

@ -198,6 +198,8 @@ export function notifyOnUnsupportedGitVersion(version: string) {
async function showWelcomeOrWhatsNew(version: string, previousVersion: string | undefined) {
if (previousVersion == null) {
Logger.log('GitLens first-time install');
if (!Container.config.showWelcomeOrWhatsNew) return;
await commands.executeCommand(Commands.ShowWelcomePage);
return;
@ -207,6 +209,8 @@ async function showWelcomeOrWhatsNew(version: string, previousVersion: string |
Logger.log(`GitLens upgraded from v${previousVersion} to v${version}`);
}
if (!Container.config.showWelcomeOrWhatsNew) return;
const [major, minor] = version.split('.').map(v => parseInt(v, 10));
const [prevMajor, prevMinor] = previousVersion.split('.').map(v => parseInt(v, 10));
if (

Caricamento…
Annulla
Salva