Add file diff view to staging page, fix title
Rename 'Changes' to 'Staging' in the page title and heading. File names in both modified and staged file lists are now clickable links that show the diff for that file. The diff view shows both unstaged (index vs working tree) and staged (HEAD vs index) differences. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<title th:text="'Changes - ' + ${name}">Changes</title>
|
||||
<title th:text="'Staging - ' + ${name}">Staging</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Changes</h2>
|
||||
<h2>Staging</h2>
|
||||
|
||||
<h3>Modified Files (unstaged)</h3>
|
||||
<form method="post" th:action="@{/repo/{name}/stage(name=${name})}" th:if="${!#lists.isEmpty(modifiedFiles)}">
|
||||
@@ -15,7 +15,7 @@
|
||||
</tr>
|
||||
<tr th:each="file : ${modifiedFiles}">
|
||||
<td><input type="checkbox" name="files" th:value="${file}"></td>
|
||||
<td th:text="${file}"></td>
|
||||
<td><a th:href="@{'/repo/' + ${name} + '/diff/' + ${file}}" th:text="${file}"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
@@ -32,7 +32,7 @@
|
||||
</tr>
|
||||
<tr th:each="file : ${stagedFiles}">
|
||||
<td><input type="checkbox" name="files" th:value="${file}"></td>
|
||||
<td th:text="${file}"></td>
|
||||
<td><a th:href="@{'/repo/' + ${name} + '/diff/' + ${file}}" th:text="${file}"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user