webui: display file copy status (vs modify/rename) in diff view
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s8e76980f4dd17de3k
diff --git a/webui/src/web-components/sketch-diff2-view.ts b/webui/src/web-components/sketch-diff2-view.ts
index 650826c..59f59df 100644
--- a/webui/src/web-components/sketch-diff2-view.ts
+++ b/webui/src/web-components/sketch-diff2-view.ts
@@ -371,6 +371,11 @@
color: #0c5460;
}
+ .file-status.copied {
+ background-color: #e2e3ff;
+ color: #383d41;
+ }
+
.file-changes {
margin-left: 8px;
font-size: 12px;
@@ -873,10 +878,14 @@
case "D":
return "deleted";
case "R":
+ case "C":
default:
if (status.toUpperCase().startsWith("R")) {
return "renamed";
}
+ if (status.toUpperCase().startsWith("C")) {
+ return "copied";
+ }
return "modified";
}
}
@@ -893,10 +902,14 @@
case "D":
return "Deleted";
case "R":
+ case "C":
default:
if (status.toUpperCase().startsWith("R")) {
return "Renamed";
}
+ if (status.toUpperCase().startsWith("C")) {
+ return "Copied";
+ }
return "Modified";
}
}