mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-27 03:34:58 +01:00
wip: desktop work
This commit is contained in:
@@ -97,24 +97,24 @@ export function Diff<T>(props: DiffProps<T>) {
|
|||||||
//
|
//
|
||||||
// 'simple':
|
// 'simple':
|
||||||
// Just a subtle bar separator between each hunk
|
// Just a subtle bar separator between each hunk
|
||||||
// hunkSeparators: "line-info",
|
hunkSeparators: "line-info",
|
||||||
hunkSeparators(hunkData: HunkData) {
|
// hunkSeparators(hunkData: HunkData) {
|
||||||
const fragment = document.createDocumentFragment()
|
// const fragment = document.createDocumentFragment()
|
||||||
const numCol = document.createElement("div")
|
// const numCol = document.createElement("div")
|
||||||
numCol.textContent = `${hunkData.lines}`
|
// numCol.textContent = `${hunkData.lines}`
|
||||||
numCol.style.position = "sticky"
|
// numCol.style.position = "sticky"
|
||||||
numCol.style.left = "0"
|
// numCol.style.left = "0"
|
||||||
numCol.style.backgroundColor = "var(--pjs-bg)"
|
// numCol.style.backgroundColor = "var(--pjs-bg)"
|
||||||
numCol.style.zIndex = "2"
|
// numCol.style.zIndex = "2"
|
||||||
fragment.appendChild(numCol)
|
// fragment.appendChild(numCol)
|
||||||
const contentCol = document.createElement("div")
|
// const contentCol = document.createElement("div")
|
||||||
contentCol.textContent = "unmodified lines"
|
// contentCol.textContent = "unmodified lines"
|
||||||
contentCol.style.position = "sticky"
|
// contentCol.style.position = "sticky"
|
||||||
contentCol.style.width = "var(--pjs-column-content-width)"
|
// contentCol.style.width = "var(--pjs-column-content-width)"
|
||||||
contentCol.style.left = "var(--pjs-column-number-width)"
|
// contentCol.style.left = "var(--pjs-column-number-width)"
|
||||||
fragment.appendChild(contentCol)
|
// fragment.appendChild(contentCol)
|
||||||
return fragment
|
// return fragment
|
||||||
},
|
// },
|
||||||
// On lines that have both additions and deletions, we can run a
|
// On lines that have both additions and deletions, we can run a
|
||||||
// separate diff check to mark parts of the lines that change.
|
// separate diff check to mark parts of the lines that change.
|
||||||
// 'none':
|
// 'none':
|
||||||
|
|||||||
Reference in New Issue
Block a user