+ {preview.diff
+ ? preview.diff.split('\n').map((line, i) => {
+ let cls = 'text-[var(--color-text-secondary)]';
+ if (line.startsWith('+') && !line.startsWith('+++')) cls = 'text-[var(--color-status-success)]';
+ else if (line.startsWith('-') && !line.startsWith('---')) cls = 'text-[var(--color-status-error)]';
+ else if (line.startsWith('@@')) cls = 'text-[var(--color-accent-sky)]';
+ return {line || '\u00A0'};
+ })
+ : preview.newFileContents
+ ? preview.newFileContents.split('\n').map((line, i) => (
+ {line || '\u00A0'}
+ ))
+ : Binary file}
+
+ + {commit.subject} +
++ {commit.shortHash} + · + {commit.authorName} + · + {relativeTime(commit.committedAt)} +
+Working tree clean
+ ) : ( + changedFiles.map((file) => ( +No commit history
+ ) : ( + commits.map((commit) => ( +
+ {preview.diff
+ ? preview.diff.split('\n').map((line, i) => )
+ : preview.newFileContents
+ ? preview.newFileContents.split('\n').map((line, i) => (
+ {line || '\u00A0'}
+ ))
+ : preview.isBinary
+ ? Binary file
+ : Loading…}
+
+ + Changes committed{pushAfterCommit ? ' and pushed' : ''} +
++ Working tree is clean — nothing to commit. +
+ ) : ( + files.map((file) => ( +
+ {file.preview.diff
+ ? file.preview.diff.split('\n').map((line, i) => )
+ : file.preview.newFileContents
+ ? file.preview.newFileContents.split('\n').map((line, i) => (
+ {line || '\u00A0'}
+ ))
+ : file.preview.isBinary
+ ? Binary file
+ : null}
+
+