mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
chore: deprecate show diff in text
This commit is contained in:
parent
d0be9cedb2
commit
850ea5a64a
3 changed files with 1 additions and 13 deletions
|
|
@ -4,7 +4,6 @@ import { isNotFalsy } from 'utils/general'
|
|||
import { Icon } from '../../Icon'
|
||||
import { SearchMode } from '../../searchModes'
|
||||
import { DiffStatGraph } from './../DiffStatGraph'
|
||||
import { DiffStatText } from './../DiffStatText'
|
||||
|
||||
export type NodeRenderer = (node: TreeNode) => React.ReactNode
|
||||
|
||||
|
|
@ -26,12 +25,11 @@ export function useRenderFileStatus() {
|
|||
className={'node-item-diff'}
|
||||
title={`${diff.status}, ${diff.changes} changes: +${diff.additions} & -${diff.deletions}`}
|
||||
>
|
||||
{showDiffInText ? <DiffStatText diff={diff} /> : <DiffStatGraph diff={diff} />}
|
||||
<DiffStatGraph diff={diff} />
|
||||
</span>
|
||||
)
|
||||
)
|
||||
}
|
||||
const { showDiffInText } = useConfigs().value
|
||||
return React.useMemo(() => renderFileStatus, [])
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,13 +90,6 @@ export function FileTreeSettings(props: React.PropsWithChildren<Props>) {
|
|||
tooltip: 'Show number of comments next to file names in Pull Requests.',
|
||||
}}
|
||||
/>
|
||||
<SimpleToggleField
|
||||
field={{
|
||||
key: 'showDiffInText',
|
||||
label: 'Show PR file diff in text',
|
||||
tooltip: 'Glance diff in a more precise way.',
|
||||
}}
|
||||
/>
|
||||
<SimpleToggleField
|
||||
field={{
|
||||
key: 'compactFileTree',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ export type Config = {
|
|||
codeFolding: boolean
|
||||
compactFileTree: boolean
|
||||
restoreExpandedFolders: boolean
|
||||
showDiffInText: boolean
|
||||
}
|
||||
|
||||
enum configKeys {
|
||||
|
|
@ -39,7 +38,6 @@ enum configKeys {
|
|||
codeFolding = 'codeFolding',
|
||||
compactFileTree = 'compactFileTree',
|
||||
restoreExpandedFolders = 'restoreExpandedFolders',
|
||||
showDiffInText = 'showDiffInText',
|
||||
}
|
||||
|
||||
// do NOT use platform name
|
||||
|
|
@ -62,7 +60,6 @@ export const defaultConfigs: Config = {
|
|||
codeFolding: true,
|
||||
compactFileTree: false,
|
||||
restoreExpandedFolders: true,
|
||||
showDiffInText: false,
|
||||
}
|
||||
|
||||
const configKeyArray = Object.values(configKeys)
|
||||
|
|
|
|||
Loading…
Reference in a new issue