Quellcode durchsuchen

Adds whats new image to home view

Updates upgrade notification
main
Eric Amodio vor 2 Jahren
Ursprung
Commit
edec95e308
5 geänderte Dateien mit 19 neuen und 7 gelöschten Zeilen
  1. +0
    -0
      images/sponsors/cresus.png
  2. +4
    -0
      src/extension.ts
  3. +5
    -3
      src/messages.ts
  4. +7
    -4
      src/webviews/apps/home/home.scss
  5. +3
    -0
      src/webviews/apps/home/partials/welcome.html

+ 0
- 0
images/sponsors/cresus.png Datei anzeigen


+ 4
- 0
src/extension.ts Datei anzeigen

@ -245,6 +245,10 @@ async function showWelcomeOrWhatsNew(container: Container, version: string, prev
return;
}
if (major !== prevMajor) {
version = String(major);
}
void executeCommand(Commands.ShowHomeView);
if (container.config.showWhatsNewAfterUpgrades) {

+ 5
- 3
src/messages.ts Datei anzeigen

@ -1,7 +1,9 @@
import { ConfigurationTarget, env, MessageItem, Uri, window } from 'vscode';
import { configuration } from './configuration';
import { Commands } from './constants';
import { GitCommit } from './git/models';
import { Logger } from './logger';
import { executeCommand } from './system/command';
export const enum SuppressedMessages {
CommitHasNoPreviousCommitWarning = 'suppressCommitHasNoPreviousCommitWarning',
@ -154,17 +156,17 @@ export class Messages {
}
static async showWhatsNewMessage(version: string) {
const whatsnew = { title: "What's New" };
const whatsnew = { title: "See What's New" };
const result = await Messages.showMessage(
'info',
`GitLens has been updated to v${version} — check out what's new!`,
`GitLens ${version} is here — check out what's new!`,
undefined,
null,
whatsnew,
);
if (result === whatsnew) {
await env.openExternal(Uri.parse('https://gitlens.amod.io/#whats-new'));
void (await executeCommand(Commands.ShowWelcomePage));
}
}

+ 7
- 4
src/webviews/apps/home/home.scss Datei anzeigen

@ -23,10 +23,6 @@ body {
min-height: 100%;
}
.welcome {
grid-template-rows: repeat(3, min-content);
}
section {
display: flex;
flex-direction: column;
@ -75,6 +71,8 @@ p {
}
.welcome {
grid-template-rows: repeat(3, min-content);
ul {
list-style: none;
padding: 0;
@ -86,6 +84,11 @@ p {
}
}
.welcomelink__whatsnew {
max-width: 400px;
margin: 1rem auto 0 auto;
}
.links {
display: grid;
grid-template-columns: repeat(3, auto);

+ 3
- 0
src/webviews/apps/home/partials/welcome.html Datei anzeigen

@ -1,6 +1,9 @@
<template id="welcome">
<section class="welcome">
<h3>Welcome to GitLens 12</h3>
<a class="welcomelink__whatsnew" title="See What's New" href="command:gitlens.showWelcomePage">
<img class="image--preview" src="#{webroot}/media/gitlens-12-card.webp" alt="What's new" />
</a>
<p>
GitLens <b>supercharges</b> Git inside VS Code and unlocks the <b>untapped knowledge</b> within each
repository. It helps you to <b>visualize code authorship</b> at a glance via Git blame annotations and

Laden…
Abbrechen
Speichern