Skip to content

Commit 2e4f758

Browse files
committed
feat: enhance pre-operation check with background processing and error handling
1 parent afe72b3 commit 2e4f758

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

src/main/java/com/laker/postman/common/constants/ModernColors.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,23 @@ public final class ModernColors {
182182
*/
183183
public static final Color NEUTRAL_DARKER = new Color(51, 65, 85);
184184

185+
// ==================== Git 操作颜色(现代简约风格)====================
186+
187+
/**
188+
* Git Commit(提交)- 柔和翠绿色
189+
*/
190+
public static final Color GIT_COMMIT = new Color(34, 197, 94); // Green-500
191+
192+
/**
193+
* Git Push(推送)- 优雅深蓝色
194+
*/
195+
public static final Color GIT_PUSH = new Color(59, 130, 246); // Blue-500
196+
197+
/**
198+
* Git Pull(拉取)- 清新紫色
199+
*/
200+
public static final Color GIT_PULL = new Color(168, 85, 247); // Purple-500
201+
185202
// ==================== 中性色系 - 文字 ====================
186203

187204
/**

src/main/java/com/laker/postman/model/GitOperation.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.laker.postman.model;
22

3+
import com.laker.postman.common.constants.ModernColors;
34
import com.laker.postman.util.I18nUtil;
45
import com.laker.postman.util.MessageKeys;
56
import lombok.Getter;
@@ -8,9 +9,9 @@
89

910
@Getter
1011
public enum GitOperation {
11-
COMMIT(I18nUtil.getMessage(MessageKeys.GIT_OPERATION_COMMIT), "icons/git-commit.svg", new Color(34, 139, 34)),
12-
PUSH(I18nUtil.getMessage(MessageKeys.GIT_OPERATION_PUSH), "icons/git-push.svg", new Color(30, 144, 255)),
13-
PULL(I18nUtil.getMessage(MessageKeys.GIT_OPERATION_PULL), "icons/git-pull.svg", new Color(216, 209, 160));
12+
COMMIT(I18nUtil.getMessage(MessageKeys.GIT_OPERATION_COMMIT), "icons/git-commit.svg", ModernColors.GIT_COMMIT),
13+
PUSH(I18nUtil.getMessage(MessageKeys.GIT_OPERATION_PUSH), "icons/git-push.svg", ModernColors.GIT_PUSH),
14+
PULL(I18nUtil.getMessage(MessageKeys.GIT_OPERATION_PULL), "icons/git-pull.svg", ModernColors.GIT_PULL);
1415

1516
private final String displayName;
1617
private final String iconName;

0 commit comments

Comments
 (0)