+ {viewError !== null &&
{viewError} }
- {snapshot === null && status.loading &&
{t('loading')} }
- {snapshot === null && !status.loading && status.error &&
{t('error')} }
- {snapshot !== null && !isRepo &&
{t('notRepo')} }
- {snapshot?.truncated === true &&
{t('statusTruncated')} }
+ {snapshot === null && status.loading &&
{t('loading')} }
+ {snapshot === null && !status.loading && status.error &&
{t('error')} }
+ {snapshot !== null && !isRepo &&
{t('notRepo')} }
+ {snapshot?.truncated === true &&
{t('statusTruncated')} }
- {clean &&
{t('changesClean')} }
+ {clean &&
{t('changesClean')} }
- {isRepo && !clean && (
- <>
- {/* Each group is its own block so its sticky header is released (and
- replaced) exactly when the group scrolls away. */}
-
- 0
- ? (
- }
- onClick={() => { stageAll(false) }}
- />
- )
- : undefined}
- >
- {unstagedEntries.length}
-
- {renderTree(unstagedTree, false)}
-
-
- 0
- ? (
- }
- onClick={() => { stageAll(true) }}
- />
- )
- : undefined}
- >
- {stagedEntries.length}
-
- {renderTree(stagedTree, true)}
-
- >
- )}
+ {isRepo && !clean && (
+ <>
+ {/* Each group is its own block so its sticky header is released (and
+ replaced) exactly when the group scrolls away. */}
+
+ 0
+ ? (
+ }
+ onClick={() => { stageAll(false) }}
+ />
+ )
+ : undefined}
+ >
+ {unstagedEntries.length}
+
+ {renderTree(unstagedTree, false)}
+
+
+ 0
+ ? (
+ }
+ onClick={() => { stageAll(true) }}
+ />
+ )
+ : undefined}
+ >
+ {stagedEntries.length}
+
+ {renderTree(stagedTree, true)}
+
+ >
+ )}
+ {isRepo && (
+ <>
+
0 ? logEntries.length : undefined} />
+ {logEntries.length === 0 && logFailed && {t('historyLoadError')} }
+ {logEntries.length === 0 && !logFailed && logEnded && {t('changesNoHistory')} }
+ {logEntries.map(entry => (
+ { onPreview(commitRefOf(entry)) }}
+ onKeyDown={(event) => {
+ if (event.key === 'Enter' || event.key === ' ') {
+ event.preventDefault()
+ onPreview(commitRefOf(entry))
+ }
+ }}
+ onContextMenu={(event) => { openHistoryMenu(event, entry) }}
+ >
+
+ {entry.hash}
+ {entry.subject}
+
+
+ {refNames(entry.refs).map(ref => (
+ {ref}
+ ))}
+ {entry.author} · {relativeTime(entry.date)}
+
+
+ ))}
+ {!logEnded && (
+ { void loadMoreLog() }}
+ >
+ {logLoadingMore ? t('loading') : t('loadMore')}
+
+ )}
+ >
+ )}
+
+
+ {/* The commit bar is OUTSIDE the scroll body: it is the tab's persistent
+ action surface, so the message being written never scrolls away
+ (#194). */}
{isRepo && (
-