瀏覽代碼

Updates ordering of minimap tooltip refs

main
Eric Amodio 1 年之前
父節點
當前提交
c27e2350b1
共有 1 個檔案被更改,包括 39 行新增33 行删除
  1. +39
    -33
      src/webviews/apps/plus/graph/minimap/minimap.ts

+ 39
- 33
src/webviews/apps/plus/graph/minimap/minimap.ts 查看文件

@ -333,6 +333,10 @@ const styles = css`
margin: 0.5rem 0;
max-width: fit-content;
}
.bb-tooltip .refs:empty {
margin: 0;
}
.bb-tooltip .refs .branch {
border-radius: 3px;
padding: 0 4px;
@ -861,39 +865,41 @@ export class GraphMinimap extends FASTElement {
${
groups != null
? /*html*/ `
<div class="refs">
${
groups
?.get('branch')
?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1))
.map(
m =>
/*html*/ `<span class="branch${m.current ? ' current' : ''}">${
m.name
}</span>`,
)
.join('') ?? ''
}
${
groups
?.get('remote')
?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1))
?.map(
m =>
/*html*/ `<span class="remote${m.current ? ' current' : ''}">${
m.name
}</span>`,
)
.join('') ?? ''
}
${stashesCount ? /*html*/ `<span class="stash">${pluralize('stash', stashesCount, { plural: 'stashes' })}</span>` : ''}
${
groups
?.get('tag')
?.map(m => /*html*/ `<span class="tag">${m.name}</span>`)
.join('') ?? ''
}
</div>`
<div class="refs">${
stashesCount
? /*html*/ `<span class="stash">${pluralize('stash', stashesCount, {
plural: 'stashes',
})}</span>`
: ''
}${
groups
?.get('branch')
?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1))
.map(
m =>
/*html*/ `<span class="branch${m.current ? ' current' : ''}">${
m.name
}</span>`,
)
.join('') ?? ''
}</div>
<div class="refs">${
groups
?.get('remote')
?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1))
?.map(
m =>
/*html*/ `<span class="remote${m.current ? ' current' : ''}">${
m.name
}</span>`,
)
.join('') ?? ''
}${
groups
?.get('tag')
?.map(m => /*html*/ `<span class="tag">${m.name}</span>`)
.join('') ?? ''
}</div>`
: ''
}
</div>`;

Loading…
取消
儲存