Switch to BiomeJS (#306)

This commit is contained in:
Gregory Schier
2025-11-23 08:38:13 -08:00
committed by GitHub
parent 2bac610efe
commit ec3e2e16a9
332 changed files with 3007 additions and 4097 deletions

View File

@@ -24,8 +24,8 @@ import { Separator } from '../core/Separator';
import { SplitLayout } from '../core/SplitLayout';
import { HStack } from '../core/Stacks';
import { EmptyStateText } from '../EmptyStateText';
import { handlePushResult } from './git-util';
import { gitCallbacks } from './callbacks';
import { handlePushResult } from './git-util';
interface Props {
syncDir: string;
@@ -281,10 +281,10 @@ function TreeNodeChildren({
/>
</div>
{node.children.map((childNode, i) => {
{node.children.map((childNode) => {
return (
<TreeNodeChildren
key={childNode.status.relaPath + i}
key={childNode.status.relaPath + childNode.status.status + childNode.status.staged}
node={childNode}
depth={depth + 1}
onCheck={onCheck}
@@ -353,11 +353,11 @@ function nodeCheckedStatus(root: CommitTreeNode): CheckboxProps['checked'] {
if (numVisited === numChecked + numCurrent) {
return true;
} else if (numChecked === 0) {
return false;
} else {
return 'indeterminate';
}
if (numChecked === 0) {
return false;
}
return 'indeterminate';
}
function setCheckedAndChildren(

View File

@@ -19,9 +19,9 @@ import { Icon } from '../core/Icon';
import { InlineCode } from '../core/InlineCode';
import { BranchSelectionDialog } from './BranchSelectionDialog';
import { gitCallbacks } from './callbacks';
import { handlePullResult } from './git-util';
import { GitCommitDialog } from './GitCommitDialog';
import { GitRemotesDialog } from './GitRemotesDialog';
import { handlePullResult } from './git-util';
import { HistoryDialog } from './HistoryDialog';
export function GitDropdown() {

View File

@@ -36,8 +36,8 @@ export function GitRemotesDialog({ dir }: Props) {
</TableRow>
</TableHead>
<TableBody>
{remotes.data?.map((r, i) => (
<TableRow key={i}>
{remotes.data?.map((r) => (
<TableRow key={r.name + r.url}>
<TableCell>{r.name}</TableCell>
<TableCell>{r.url}</TableCell>
<TableCell>
@@ -57,7 +57,7 @@ export function GitRemotesDialog({ dir }: Props) {
);
}
GitRemotesDialog.show = function (dir: string) {
GitRemotesDialog.show = (dir: string) => {
showDialog({
id: 'git-remotes',
title: 'Manage Remotes',

View File

@@ -25,10 +25,14 @@ export function HistoryDialog({ log }: Props) {
</TableRow>
</TableHead>
<TableBody>
{log.map((l, i) => (
<TableRow key={i}>
<TruncatedWideTableCell>{l.message || <em className="text-text-subtle">No message</em>}</TruncatedWideTableCell>
<TableCell><span title={`Email: ${l.author.email}`}>{l.author.name || 'Unknown'}</span></TableCell>
{log.map((l) => (
<TableRow key={l.author + (l.message ?? 'n/a') + l.when}>
<TruncatedWideTableCell>
{l.message || <em className="text-text-subtle">No message</em>}
</TruncatedWideTableCell>
<TableCell>
<span title={`Email: ${l.author.email}`}>{l.author.name || 'Unknown'}</span>
</TableCell>
<TableCell className="text-text-subtle">
<span title={l.when}>{formatDistanceToNowStrict(l.when)} ago</span>
</TableCell>