дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
fix(vcs): clarify staging groups and row actions
Цей коміт міститься в:
1 джерело
76d67145f5
коміт
9a9c7dd9dd
2 files changed
+8
-5
No files matched your search
@@ -89,6 +89,9 @@
|
||||
.groupLabel {
|
||||
color: var(--fg-strong);
|
||||
}
|
||||
.stageGroupLabel {
|
||||
font-weight: 600;
|
||||
}
|
||||
.detail {
|
||||
flex: 0 10000 auto;
|
||||
min-width: 0;
|
||||
@@ -450,14 +453,13 @@
|
||||
.checkProblemLink:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
/* Staging area: Stage / Unstage on the hovered or selected row, as a hover icon at the row's end. */
|
||||
.stageButton {
|
||||
flex: none;
|
||||
margin-left: auto;
|
||||
visibility: hidden;
|
||||
}
|
||||
[role="treeitem"]:hover .stageButton,
|
||||
[role="treeitem"][aria-selected="true"] .stageButton {
|
||||
.stageButtonLead {
|
||||
visibility: visible;
|
||||
}
|
||||
.inspectionFix {
|
||||
|
||||
@@ -590,7 +590,7 @@ export function stageOperation(n: ChangeNode): { label: string; icon: "plus" | "
|
||||
return null;
|
||||
}
|
||||
|
||||
function StageButton({ node }: { node: ChangeNode }) {
|
||||
function StageButton({ node, leadSelected }: { node: ChangeNode; leadSelected: boolean }) {
|
||||
const op = stageOperation(node);
|
||||
if (!op) return null;
|
||||
const { label, icon, paths } = op;
|
||||
@@ -600,7 +600,7 @@ function StageButton({ node }: { node: ChangeNode }) {
|
||||
icon={icon}
|
||||
title={label}
|
||||
size="small"
|
||||
className={styles.stageButton}
|
||||
className={clsx(styles.stageButton, leadSelected && styles.stageButtonLead)}
|
||||
onMouseDown={(e) => e.stopPropagation()}
|
||||
onDoubleClick={(e) => e.stopPropagation()}
|
||||
onClick={(e) => {
|
||||
@@ -1161,6 +1161,7 @@ export function ChangesTree({ mode, amended }: { mode: "commit" | "local" | "dia
|
||||
className={clsx(
|
||||
styles.label,
|
||||
n.type === "group" && styles.groupLabel,
|
||||
staging && n.type === "group" && styles.stageGroupLabel,
|
||||
n.type === "group" && n.changelist && !n.active && styles.inactiveList,
|
||||
)}
|
||||
style={n.type === "file" && n.kind ? { color: KIND_COLOR[n.kind] } : undefined}
|
||||
@@ -1268,7 +1269,7 @@ export function ChangesTree({ mode, amended }: { mode: "commit" | "local" | "dia
|
||||
)}
|
||||
{n.detail && n.detailIcon && <Icon name={n.detailIcon} size={14} className={styles.detailIcon} />}
|
||||
{n.detail && <span className={styles.detail}>{n.detail}</span>}
|
||||
{staging && <StageButton node={n} />}
|
||||
{staging && <StageButton node={n} leadSelected={st.selected && st.lead} />}
|
||||
</span>
|
||||
);
|
||||
}}
|
||||
|
||||
Reference in new issue
Заблокувати користувача