Pārlūkot izejas kodu

Adds reset views location command

main
Eric Amodio pirms 1 gada
vecāks
revīzija
cb7b23de8b
3 mainītis faili ar 19 papildinājumiem un 0 dzēšanām
  1. +5
    -0
      package.json
  2. +13
    -0
      src/commands/setViewsLayout.ts
  3. +1
    -0
      src/constants.ts

+ 5
- 0
package.json Parādīt failu

@ -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 Parādīt failu

@ -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 Parādīt failu

@ -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',

Notiek ielāde…
Atcelt
Saglabāt