Skip to content

Commit e0adbba

Browse files
committed
updated Y/N buttons jetbrains
1 parent 9663e9d commit e0adbba

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.continuedev.continueintellijextension.editor
22

33
import com.github.continuedev.continueintellijextension.utils.getAltKeyLabel
4+
import com.github.continuedev.continueintellijextension.utils.getShiftKeyLabel
45
import com.intellij.openapi.Disposable
56
import com.intellij.openapi.command.WriteCommandAction
67
import com.intellij.openapi.editor.Editor
@@ -131,10 +132,12 @@ class VerticalDiffBlock(
131132
refreshEditor()
132133
}
133134

134-
135135
private fun createButtons(): Pair<JButton, JButton> {
136136
val rejectBtn =
137-
createButton("${getAltKeyLabel()}↑N", JBColor(0x99FF0000.toInt(), 0x99FF0000.toInt())).apply {
137+
createButton(
138+
"${getAltKeyLabel()}${getShiftKeyLabel()}N",
139+
JBColor(0x99FF0000.toInt(), 0x99FF0000.toInt())
140+
).apply {
138141
addActionListener {
139142
handleReject();
140143
onAcceptReject(this@VerticalDiffBlock, false)
@@ -143,7 +146,11 @@ class VerticalDiffBlock(
143146
}
144147

145148
val acceptBtn =
146-
createButton("${getAltKeyLabel()}↑Y", JBColor(0x9900FF00.toInt(), 0x9900FF00.toInt())).apply {
149+
createButton(
150+
"${getAltKeyLabel()}${
151+
getShiftKeyLabel()
152+
}Y", JBColor(0x7700BB00.toInt(), 0x7700BB00.toInt())
153+
).apply {
147154
addActionListener {
148155
handleAccept();
149156
onAcceptReject(this@VerticalDiffBlock, true)

extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/utils/Utils.kt

+7
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ fun getAltKeyLabel(): String {
2929
Os.WINDOWS -> "Alt"
3030
Os.LINUX -> "Alt"
3131
}
32+
}
33+
34+
fun getShiftKeyLabel(): String {
35+
return when (getOs()) {
36+
Os.MAC -> ""
37+
Os.WINDOWS, Os.LINUX -> ""
38+
}
3239
}

0 commit comments

Comments
 (0)