Add ahead/behind indicator and push/pull buttons

This commit is contained in:
2026-02-27 19:22:03 +01:00
parent a27c9fba00
commit 52fe455c76
4 changed files with 38 additions and 4 deletions

View File

@@ -6,6 +6,17 @@
<body>
<h2>Staging</h2>
<p>Branch: <b th:text="${branch}"></b></p>
<p th:if="${commitsAhead != null}">
<span th:text="${commitsAhead}"></span> ahead, <span th:text="${commitsBehind}"></span> behind
<form method="post" th:action="@{/repo/{name}/push(name=${name})}">
<input type="hidden" name="redirectTo" value="changes">
<input type="submit" value="Push">
</form>
<form method="post" th:action="@{/repo/{name}/pull(name=${name})}">
<input type="hidden" name="redirectTo" value="changes">
<input type="submit" value="Pull">
</form>
</p>
<h3>Modified Files (unstaged)</h3>
<form method="post" th:action="@{/repo/{name}/stage(name=${name})}" th:if="${!#lists.isEmpty(modifiedFiles)}">