This commit is contained in:
@@ -236,13 +236,15 @@
|
|||||||
if (backendAvailable) {
|
if (backendAvailable) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`/api/play/rpg/save/${slot}`, { method: "DELETE" });
|
const response = await fetch(`/api/play/rpg/save/${slot}`, { method: "DELETE" });
|
||||||
if (response.status === 404) backendAvailable = false;
|
if (response.status === 404) els.status.textContent = "New game started locally. There was no backend save to clear.";
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
backendAvailable = false;
|
backendAvailable = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
audio.setTrack("title");
|
audio.setTrack("title");
|
||||||
els.status.textContent = backendAvailable ? "New game started and local save cleared." : "New game started locally. Backend save endpoint is not available.";
|
if (!els.status.textContent.includes("backend save to clear")) {
|
||||||
|
els.status.textContent = backendAvailable ? "New game started and local save cleared." : "New game started locally. Backend save endpoint is not reachable.";
|
||||||
|
}
|
||||||
renderHud();
|
renderHud();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,8 +284,7 @@
|
|||||||
try {
|
try {
|
||||||
const response = await fetch(`/api/play/rpg/save/${slot}`);
|
const response = await fetch(`/api/play/rpg/save/${slot}`);
|
||||||
if (response.status === 404) {
|
if (response.status === 404) {
|
||||||
backendAvailable = false;
|
els.status.textContent = "No save file exists yet. Press Save after starting a game to create one.";
|
||||||
els.status.textContent = "No local save found. Backend save endpoint is not deployed yet.";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
|
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
|
||||||
|
|
||||||
* Posts:
|
* Posts:
|
||||||
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">09-05-2026 22:50</span>@@
|
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">09-05-2026 23:02</span>@@
|
||||||
- [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
- [[file:career/ha-dr.org][High Availability, Disaster Recovery and Business Continuity]] @@html:<span class="post-date">11-03-2026 17:18</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
||||||
- [[file:career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
- [[file:career/javascript.org][Understands the Javascript language]] @@html:<span class="post-date">11-03-2026 16:52</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
||||||
- [[file:career/restful-api.org][Restful API]] @@html:<span class="post-date">15-02-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
- [[file:career/restful-api.org][Restful API]] @@html:<span class="post-date">15-02-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"><span class="post-tag">learning</span></a>@@ @@html:<a href="/tags/notes.html"><span class="post-tag">notes</span></a>@@
|
||||||
|
|||||||
@@ -55,10 +55,10 @@
|
|||||||
- [[file:tags/notes.org][Tag: notes]]
|
- [[file:tags/notes.org][Tag: notes]]
|
||||||
- [[file:tags/website.org][Tag: website]]
|
- [[file:tags/website.org][Tag: website]]
|
||||||
- [[file:tags/review.org][Tag: review]]
|
- [[file:tags/review.org][Tag: review]]
|
||||||
|
- [[file:tags/update.org][Tag: update]]
|
||||||
- [[file:tags/life.org][Tag: life]]
|
- [[file:tags/life.org][Tag: life]]
|
||||||
- [[file:tags/emacs.org][Tag: emacs]]
|
- [[file:tags/emacs.org][Tag: emacs]]
|
||||||
- [[file:tags/education.org][Tag: education]]
|
- [[file:tags/education.org][Tag: education]]
|
||||||
- [[file:tags/update.org][Tag: update]]
|
|
||||||
- [[file:tags/reading.org][Tag: reading]]
|
- [[file:tags/reading.org][Tag: reading]]
|
||||||
- [[file:tags/maths.org][Tag: maths]]
|
- [[file:tags/maths.org][Tag: maths]]
|
||||||
- [[file:tags/insights.org][Tag: insights]]
|
- [[file:tags/insights.org][Tag: insights]]
|
||||||
|
|||||||
Reference in New Issue
Block a user