56
56
class =" relative flex-1 px-4 py-2 overflow-y-auto border-2 rounded-md dark:border-gray-500 max-h-screen--nav line-number-gutter min-h-80"
57
57
>
58
58
<RTStickyCopyButton :clickHandler =" copyTextToClipboard" />
59
- <div v-for =" (lineDiff, index) in lhsDiff" :key =" index" >
59
+ <div
60
+ v-for =" (lineDiff, index) in lhsDiff"
61
+ :key =" index"
62
+ v-bind:class =" {
63
+ 'bg-red-100 dark:bg-yellow-700': lineDiff.includes('isModified'),
64
+ }"
65
+ >
60
66
<p class =" break-all whitespace-pre-wrap" v-html =" lineDiff" ></p >
61
67
</div >
62
68
</div >
63
69
<div
64
70
class =" relative flex-1 px-4 py-2 overflow-y-auto border-2 rounded-md dark:border-gray-500 min-h-80 line-number-gutter max-h-screen--nav"
65
71
>
66
72
<RTStickyCopyButton :clickHandler =" copyTextToClipboard" />
67
- <div v-for =" (lineDiff, index) in rhsDiff" :key =" index" >
73
+ <div
74
+ v-for =" (lineDiff, index) in rhsDiff"
75
+ :key =" index"
76
+ v-bind:class =" {
77
+ 'bg-green-100 dark:bg-green-700': lineDiff.includes('isModified'),
78
+ }"
79
+ >
68
80
<p class =" break-all whitespace-pre-wrap" v-html =" lineDiff" ></p >
69
81
</div >
70
82
</div >
@@ -87,7 +99,7 @@ export default {
87
99
const hunkState = item[0 ]
88
100
if (hunkState === - 1 || hunkState === 0 ) {
89
101
const className =
90
- hunkState === - 1 ? ' bg-red-300 dark:bg-yellow-800 ' : ' '
102
+ hunkState === - 1 ? ' isModified bg-red-300 dark:bg-yellow-900 ' : ' '
91
103
return ` <span class="break-all inline p-0 m-0 ${ className} ">${ item[1 ]} </span>`
92
104
}
93
105
return false
@@ -100,7 +112,7 @@ export default {
100
112
const hunkState = item[0 ]
101
113
if (hunkState === 1 || hunkState === 0 ) {
102
114
const className =
103
- hunkState === 1 ? ' bg-green-300 dark:bg-green-800 ' : ' '
115
+ hunkState === 1 ? ' isModified bg-green-300 dark:bg-green-900 ' : ' '
104
116
return ` <span class="break-all inline p-0 m-0 ${ className} ">${ item[1 ]} </span>`
105
117
}
106
118
return false
0 commit comments