Procházet zdrojové kódy

Add and send setting to graph for showing remote names on ref branches (#2256)

main
Ramin Tadayon před 2 roky
odevzdal GitHub
rodič
revize
3c67f2c44c
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
6 změnil soubory, kde provedl 27 přidání a 1 odebrání
  1. +7
    -0
      package.json
  2. +1
    -0
      src/config.ts
  3. +3
    -1
      src/plus/webviews/graph/graphWebview.ts
  4. +1
    -0
      src/plus/webviews/graph/protocol.ts
  5. +1
    -0
      src/webviews/apps/plus/graph/GraphWrapper.tsx
  6. +14
    -0
      src/webviews/apps/settings/partials/commit-graph.html

+ 7
- 0
package.json Zobrazit soubor

@ -2135,6 +2135,13 @@
"scope": "window",
"order": 13
},
"gitlens.graph.showRemoteNamesOnRefs": {
"type": "boolean",
"default": false,
"markdownDescription": "Specifies whether to show remote names on remote branches in the _Commit Graph_",
"scope": "window",
"order": 14
},
"gitlens.graph.defaultItemLimit": {
"type": "number",
"default": 500,

+ 1
- 0
src/config.ts Zobrazit soubor

@ -382,6 +382,7 @@ export interface GraphConfig {
highlightRowsOnRefHover: boolean;
showDetailsView: 'open' | 'selection' | false;
showGhostRefsOnRowHover: boolean;
showRemoteNamesOnRefs: boolean;
pageItemLimit: number;
searchItemLimit: number;
statusBar: {

+ 3
- 1
src/plus/webviews/graph/graphWebview.ts Zobrazit soubor

@ -468,7 +468,8 @@ export class GraphWebview extends WebviewBase {
configuration.changed(e, 'graph.dateFormat') ||
configuration.changed(e, 'graph.dateStyle') ||
configuration.changed(e, 'graph.highlightRowsOnRefHover') ||
configuration.changed(e, 'graph.showGhostRefsOnRowHover')
configuration.changed(e, 'graph.showGhostRefsOnRowHover') ||
configuration.changed(e, 'graph.showRemoteNamesOnRefs')
) {
void this.notifyDidChangeConfiguration();
}
@ -1127,6 +1128,7 @@ export class GraphWebview extends WebviewBase {
enableMultiSelection: false,
highlightRowsOnRefHover: configuration.get('graph.highlightRowsOnRefHover'),
showGhostRefsOnRowHover: configuration.get('graph.showGhostRefsOnRowHover'),
showRemoteNamesOnRefs: configuration.get('graph.showRemoteNamesOnRefs'),
idLength: configuration.get('advanced.abbreviatedShaLength'),
};
return config;

+ 1
- 0
src/plus/webviews/graph/protocol.ts Zobrazit soubor

@ -96,6 +96,7 @@ export interface GraphComponentConfig {
enableMultiSelection?: boolean;
highlightRowsOnRefHover?: boolean;
showGhostRefsOnRowHover?: boolean;
showRemoteNamesOnRefs?: boolean;
idLength?: number;
}

+ 1
- 0
src/webviews/apps/plus/graph/GraphWrapper.tsx Zobrazit soubor

@ -711,6 +711,7 @@ export function GraphWrapper({
highlightedShas={searchResults?.ids as GraphContainerProps['highlightedShas']}
highlightRowsOnRefHover={graphConfig?.highlightRowsOnRefHover}
showGhostRefsOnRowHover={graphConfig?.showGhostRefsOnRowHover}
showRemoteNamesOnRefs={graphConfig?.showRemoteNamesOnRefs}
isLoadingRows={isLoading}
isSelectedBySha={selectedRows}
nonce={nonce}

+ 14
- 0
src/webviews/apps/settings/partials/commit-graph.html Zobrazit soubor

@ -116,6 +116,20 @@
<div class="setting">
<div class="setting__input">
<input
id="graph.showRemoteNamesOnRefs"
name="graph.showRemoteNamesOnRefs"
type="checkbox"
data-setting
/>
<label for="graph.showRemoteNamesOnRefs"
>Show remote names on remote branches</label
>
</div>
</div>
<div class="setting">
<div class="setting__input">
<input
id="graph.dateStyle"
name="graph.dateStyle"
type="checkbox"

Načítá se…
Zrušit
Uložit