Parcourir la source

Adds reset views location command

main
Eric Amodio il y a 1 an
Parent
révision
cb7b23de8b
3 fichiers modifiés avec 19 ajouts et 0 suppressions
  1. +5
    -0
      package.json
  2. +13
    -0
      src/commands/setViewsLayout.ts
  3. +1
    -0
      src/constants.ts

+ 5
- 0
package.json Voir le fichier

@ -5044,6 +5044,11 @@
"category": "GitLens"
},
{
"command": "gitlens.resetViewsLayout",
"title": "Reset Views Layout",
"category": "GitLens"
},
{
"command": "gitlens.setViewsLayout",
"title": "Set Views Layout",
"category": "GitLens"

+ 13
- 0
src/commands/setViewsLayout.ts Voir le fichier

@ -5,6 +5,19 @@ import type { Container } from '../container';
import { command, executeCommand, executeCoreCommand } from '../system/command';
import { Command } from './base';
@command()
export class ResetViewsLayoutCommand extends Command {
constructor(private readonly container: Container) {
super(Commands.ResetViewsLayout);
}
async execute() {
for (const view of viewsConfigKeys) {
void (await executeCommand(`gitlens.views.${view}.resetViewLocation`));
}
}
}
export enum ViewsLayout {
GitLens = 'gitlens',
SourceControl = 'scm',

+ 1
- 0
src/constants.ts Voir le fichier

@ -223,6 +223,7 @@ export const enum Commands {
ResetOpenAIKey = 'gitlens.resetOpenAIKey',
ResetSuppressedWarnings = 'gitlens.resetSuppressedWarnings',
ResetTrackedUsage = 'gitlens.resetTrackedUsage',
ResetViewsLayout = 'gitlens.resetViewsLayout',
RevealCommitInView = 'gitlens.revealCommitInView',
SearchCommits = 'gitlens.showCommitSearch',
SearchCommitsInView = 'gitlens.views.searchAndCompare.searchCommits',

Chargement…
Annuler
Enregistrer