1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +02:00

simplify submodule remove

This commit is contained in:
Jesse Duffield 2022-01-28 22:09:10 +11:00
parent d13a648132
commit 1b09674ce8
9 changed files with 6 additions and 29 deletions

View File

@ -207,7 +207,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
<pre>
<kbd>ctrl+o</kbd>: copy submodule name to clipboard
<kbd>enter</kbd>: enter submodule
<kbd>d</kbd>: view reset and remove submodule options
<kbd>d</kbd>: remove submodule
<kbd>u</kbd>: update submodule
<kbd>n</kbd>: add new submodule
<kbd>e</kbd>: update submodule URL

View File

@ -207,7 +207,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
<pre>
<kbd>ctrl+o</kbd>: kopieer submodule naam naar klembord
<kbd>enter</kbd>: enter submodule
<kbd>d</kbd>: bekijk reset en verwijder submodule opties
<kbd>d</kbd>: remove submodule
<kbd>u</kbd>: update submodule
<kbd>n</kbd>: voeg nieuwe submodule toe
<kbd>e</kbd>: update submodule URL

View File

@ -207,7 +207,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
<pre>
<kbd>ctrl+o</kbd>: copy submodule name to clipboard
<kbd>enter</kbd>: enter submodule
<kbd>d</kbd>: view reset and remove submodule options
<kbd>d</kbd>: remove submodule
<kbd>u</kbd>: update submodule
<kbd>n</kbd>: add new submodule
<kbd>e</kbd>: update submodule URL

View File

@ -207,7 +207,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
<pre>
<kbd>ctrl+o</kbd>: 将子模块名称复制到剪贴板
<kbd>enter</kbd>: 输入子模块
<kbd>d</kbd>: 查看重置和删除子模块选项
<kbd>d</kbd>: 删除子模块
<kbd>u</kbd>: 更新子模块
<kbd>n</kbd>: 添加新的子模块
<kbd>e</kbd>: 更新子模块 URL

View File

@ -1724,8 +1724,8 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
ViewName: "files",
Contexts: []string{string(SUBMODULES_CONTEXT_KEY)},
Key: gui.getKey(config.Universal.Remove),
Handler: gui.forSubmodule(gui.handleResetRemoveSubmodule),
Description: gui.Tr.LcViewResetAndRemoveOptions,
Handler: gui.forSubmodule(gui.removeSubmodule),
Description: gui.Tr.LcRemoveSubmodule,
OpensMenu: true,
},
{

View File

@ -193,25 +193,6 @@ func (gui *Gui) forSubmodule(callback func(*models.SubmoduleConfig) error) func(
}
}
func (gui *Gui) handleResetRemoveSubmodule(submodule *models.SubmoduleConfig) error {
menuItems := []*menuItem{
{
displayString: gui.Tr.LcSubmoduleStashAndReset,
onPress: func() error {
return gui.resetSubmodule(submodule)
},
},
{
displayString: gui.Tr.LcRemoveSubmodule,
onPress: func() error {
return gui.removeSubmodule(submodule)
},
},
}
return gui.createMenu(submodule.Name, menuItems, createMenuOptions{showCancel: true})
}
func (gui *Gui) handleBulkSubmoduleActionsMenu() error {
menuItems := []*menuItem{
{

View File

@ -404,7 +404,6 @@ func chineseTranslationSet() TranslationSet {
LcEditSubmoduleUrl: "更新子模块 URL",
LcInitializingSubmoduleStatus: "正在初始化子模块",
LcInitSubmodule: "初始化子模块",
LcViewResetAndRemoveOptions: "查看重置和删除子模块选项",
LcSubmoduleUpdate: "更新子模块",
LcUpdatingSubmoduleStatus: "正在更新子模块",
LcBulkInitSubmodules: "批量初始化子模块",

View File

@ -355,7 +355,6 @@ func dutchTranslationSet() TranslationSet {
LcCreateNewBranchFromCommit: "creëer nieuwe branch van commit",
LcCopySubmoduleNameToClipboard: "kopieer submodule naam naar klembord",
LcEnterSubmodule: "enter submodule",
LcViewResetAndRemoveOptions: "bekijk reset en verwijder submodule opties",
LcAddSubmodule: "voeg nieuwe submodule toe",
LcInitSubmodule: "initialiseer submodule",
LcViewBulkSubmoduleOptions: "bekijk bulk submodule opties",

View File

@ -398,7 +398,6 @@ type TranslationSet struct {
LcEditSubmoduleUrl string
LcInitializingSubmoduleStatus string
LcInitSubmodule string
LcViewResetAndRemoveOptions string
LcSubmoduleUpdate string
LcUpdatingSubmoduleStatus string
LcBulkInitSubmodules string
@ -974,7 +973,6 @@ func EnglishTranslationSet() TranslationSet {
LcEditSubmoduleUrl: "update submodule URL",
LcInitializingSubmoduleStatus: "initializing submodule",
LcInitSubmodule: "initialize submodule",
LcViewResetAndRemoveOptions: "view reset and remove submodule options",
LcSubmoduleUpdate: "update submodule",
LcUpdatingSubmoduleStatus: "updating submodule",
LcBulkInitSubmodules: "bulk init submodules",