Browse Source

wip: desktop work

Adam 3 tháng trước cách đây
mục cha
commit
d03b79e61e
1 tập tin đã thay đổi với 18 bổ sung18 xóa
  1. 18 18
      packages/desktop/src/components/diff.tsx

+ 18 - 18
packages/desktop/src/components/diff.tsx

@@ -97,24 +97,24 @@ export function Diff<T>(props: DiffProps<T>) {
       //
       // 'simple':
       // Just a subtle bar separator between each hunk
-      // hunkSeparators: "line-info",
-      hunkSeparators(hunkData: HunkData) {
-        const fragment = document.createDocumentFragment()
-        const numCol = document.createElement("div")
-        numCol.textContent = `${hunkData.lines}`
-        numCol.style.position = "sticky"
-        numCol.style.left = "0"
-        numCol.style.backgroundColor = "var(--pjs-bg)"
-        numCol.style.zIndex = "2"
-        fragment.appendChild(numCol)
-        const contentCol = document.createElement("div")
-        contentCol.textContent = "unmodified lines"
-        contentCol.style.position = "sticky"
-        contentCol.style.width = "var(--pjs-column-content-width)"
-        contentCol.style.left = "var(--pjs-column-number-width)"
-        fragment.appendChild(contentCol)
-        return fragment
-      },
+      hunkSeparators: "line-info",
+      // hunkSeparators(hunkData: HunkData) {
+      //   const fragment = document.createDocumentFragment()
+      //   const numCol = document.createElement("div")
+      //   numCol.textContent = `${hunkData.lines}`
+      //   numCol.style.position = "sticky"
+      //   numCol.style.left = "0"
+      //   numCol.style.backgroundColor = "var(--pjs-bg)"
+      //   numCol.style.zIndex = "2"
+      //   fragment.appendChild(numCol)
+      //   const contentCol = document.createElement("div")
+      //   contentCol.textContent = "unmodified lines"
+      //   contentCol.style.position = "sticky"
+      //   contentCol.style.width = "var(--pjs-column-content-width)"
+      //   contentCol.style.left = "var(--pjs-column-number-width)"
+      //   fragment.appendChild(contentCol)
+      //   return fragment
+      // },
       // On lines that have both additions and deletions, we can run a
       // separate diff check to mark parts of the lines that change.
       // 'none':