wip: desktop work
This commit is contained in:
parent
36b48a44ac
commit
ffc889b99e
9 changed files with 174 additions and 175 deletions
|
|
@ -16,16 +16,6 @@ export function DiffChanges(props: { diff: FileDiff | FileDiff[]; variant?: "def
|
|||
)
|
||||
const total = createMemo(() => (additions() ?? 0) + (deletions() ?? 0))
|
||||
|
||||
const countLines = (text: string) => {
|
||||
if (!text) return 0
|
||||
return text.split("\n").length
|
||||
}
|
||||
|
||||
const totalBeforeLines = createMemo(() => {
|
||||
if (!Array.isArray(props.diff)) return countLines(props.diff.before || "")
|
||||
return props.diff.reduce((acc, diff) => acc + countLines(diff.before || ""), 0)
|
||||
})
|
||||
|
||||
const blockCounts = createMemo(() => {
|
||||
const TOTAL_BLOCKS = 5
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
overflow: auto;
|
||||
scrollbar-width: none;
|
||||
color: var(--text-base);
|
||||
text-wrap: pretty;
|
||||
|
||||
/* text-14-regular */
|
||||
font-family: var(--font-family-sans);
|
||||
|
|
@ -34,4 +35,10 @@
|
|||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 16px;
|
||||
border-color: var(--border-weaker-base);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue