mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-11 17:46:41 -05:00
Switch to BiomeJS (#306)
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user