Skip to content

Commit ed00942

Browse files
committed
indent files in a sketch file
1 parent 7b786d1 commit ed00942

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

app/src/ui/changes/changed-file.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const RestrictedFileExtensions = ['.cmd', '.exe', '.bat', '.sh']
1414
interface IChangedFileProps {
1515
readonly path: string
1616
readonly status: AppFileStatus
17+
readonly parts?: Array<string>
1718
readonly oldPath?: string
1819
readonly include: boolean | null
1920
readonly onIncludeChanged: (path: string, include: boolean) => void
@@ -34,6 +35,8 @@ interface IChangedFileProps {
3435
readonly onIgnore: (pattern: string) => void
3536
}
3637

38+
const Space = () => <span style={{ marginLeft: 20 }} />
39+
3740
/** a changed file in the working directory for a given repository */
3841
export class ChangedFile extends React.Component<IChangedFileProps, {}> {
3942
private handleCheckboxChange = (event: React.FormEvent<HTMLInputElement>) => {
@@ -69,6 +72,7 @@ export class ChangedFile extends React.Component<IChangedFileProps, {}> {
6972

7073
return (
7174
<div className="file" onContextMenu={this.onContextMenu}>
75+
{(this.props.parts || []).map((p, i) => <Space key={i} />)}
7276
<Checkbox
7377
// The checkbox doesn't need to be tab reachable since we emulate
7478
// checkbox behavior on the list item itself, ie hitting space bar

app/src/ui/changes/changes-list.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ export class ChangesList extends React.Component<
199199
<ChangedFile
200200
path={file.path}
201201
status={file.status}
202+
parts={file.parts}
202203
oldPath={file.oldPath}
203204
include={includeAll}
204205
key={file.id}

0 commit comments

Comments
 (0)