feat(git): add ignore and untrack paths commands
The changes introduce server-side commands to manage gitignore rules and to untrack paths without deleting local files. A new GitIgnoreKind enum and helper functions normalize targets and build proper ignore patterns, and UI code was wired to use these commands. - add_to_gitignore command and related helpers - untrack_paths command to remove paths from the index - UI wiring to expose ignore and untrack actions in explorer
This commit is contained in:
+47
-1
@@ -2350,8 +2350,20 @@
|
||||
.status-context-menu,
|
||||
.repo-tab-context-menu { position: fixed; }
|
||||
|
||||
.explorer-context-menu {
|
||||
box-sizing: border-box;
|
||||
width: min(240px, calc(100vw - 16px));
|
||||
max-height: calc(100vh - 16px);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.status-context-menu {
|
||||
box-sizing: border-box;
|
||||
width: min(280px, calc(100vw - 16px));
|
||||
max-height: calc(100vh - 16px);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 6px;
|
||||
border-color: color-mix(in srgb, var(--color-border) 78%, #5a8cf8);
|
||||
background:
|
||||
@@ -2461,11 +2473,26 @@
|
||||
}
|
||||
|
||||
.status-context-menu button {
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
min-height: 42px;
|
||||
gap: 9px;
|
||||
padding: 6px 7px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.explorer-context-menu button {
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.explorer-context-menu button svg { flex: 0 0 auto; }
|
||||
.explorer-context-menu button.ignore { color: #91b59a; }
|
||||
.explorer-context-menu button.untrack { color: #d7ad6d; }
|
||||
|
||||
.status-context-action-icon {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
@@ -2475,17 +2502,26 @@
|
||||
color: var(--color-ink-dim);
|
||||
}
|
||||
|
||||
.status-context-action-copy { gap: 1px; }
|
||||
.status-context-action-copy {
|
||||
gap: 1px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.status-context-action-copy strong {
|
||||
overflow: hidden;
|
||||
color: var(--color-ink-muted);
|
||||
font-size: 11.5px;
|
||||
line-height: 1.25;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.status-context-action-copy span {
|
||||
overflow: hidden;
|
||||
color: var(--color-ink-faint);
|
||||
font-size: 9.5px;
|
||||
font-weight: 500;
|
||||
line-height: 1.25;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.branch-context-menu button:hover:not(:disabled),
|
||||
@@ -2506,8 +2542,18 @@
|
||||
color: var(--color-ink);
|
||||
}
|
||||
|
||||
.status-context-action-icon.ignore {
|
||||
color: #91b59a;
|
||||
}
|
||||
|
||||
.status-context-action-icon.untrack {
|
||||
color: #d7ad6d;
|
||||
}
|
||||
|
||||
.branch-context-menu .menu-separator,
|
||||
.history-context-menu .menu-separator,
|
||||
.explorer-context-menu .menu-separator,
|
||||
.status-context-menu .menu-separator,
|
||||
.repo-tab-context-menu .menu-separator {
|
||||
height: 1px;
|
||||
margin: 4px 3px;
|
||||
|
||||
Reference in New Issue
Block a user