www: wiki: Add recovery download button
Change-Id: Ic461abfdce5d86d1300d1424a49d6f48fba9346f
diff --git a/public/assets/app.css b/public/assets/app.css
index 5664b9e..825619b 100644
--- a/public/assets/app.css
+++ b/public/assets/app.css
@@ -344,7 +344,7 @@
}
.button {
- padding: 10px 20px;
+ padding: 10px 30px;
background-color: var(--button-bg);
color: var(--button-color);
font-weight: 600;
diff --git a/src/Entity/LeafOta.php b/src/Entity/LeafOta.php
index 322be8d..71b8aea 100644
--- a/src/Entity/LeafOta.php
+++ b/src/Entity/LeafOta.php
@@ -163,4 +163,10 @@
return $this;
}
+
+ public function getRecoveryUrl(): ?string {
+ $url = $this->getUrl();
+
+ return str_replace('.zip', '-recovery.img', $url);
+ }
}
diff --git a/templates/wiki/device.html.twig b/templates/wiki/device.html.twig
index 7f1a670..30786fe 100644
--- a/templates/wiki/device.html.twig
+++ b/templates/wiki/device.html.twig
@@ -43,8 +43,11 @@
<td>{{ build.size|human_readable_format }}</td>
</tr>
<tr>
- <td colspan="2" class="center">
- <a href="{{ build.url }}" class="button">Download</a>
+ <td>
+ <a href="{{ build.url }}" class="button">Full build</a>
+ </td>
+ <td>
+ <a href="{{ build.recoveryUrl }}" class="button">Recovery</a>
</td>
</tr>
</tbody>