-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Інтерфейс: можливість відображення Release Notes
it's squashed commits that include the following changes: small syntax fix fix typo update css styles add Markdown parser to format changelog fix syntax (add #endif) sligthly update comments move firmware update section to separate block change HTLM lang from en to uk ISO 639-1 Language Codes define Ukrainian as uk, so, it should be uk or uk-UA depends language or language-country format Initial support of Release notes for Flasher update versions for fetchReleaseNotes button in flasher use single jaam_v2.js file fix version (update flasher version to 4.2 Beta 87) fix anishathalye/proof-html action for case with single js file fix string with link to jaam_v2.js
- Loading branch information
Showing
8 changed files
with
100 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,3 +85,4 @@ | |
with: | ||
name: updater.bin | ||
path: ${{ github.workspace }}/updater.bin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
async function fetchReleaseNotes(version) { | ||
// Get the version from the input parameter if provided, otherwise from the HTML element's data attribute | ||
const releaseNotesElement = document.getElementById("release-notes"); | ||
version = version || releaseNotesElement.getAttribute("data-version"); | ||
|
||
// Construct the API URL dynamically using the version | ||
const apiUrl = `https://api.github.com/repos/J-A-A-M/ukraine_alarm_map/releases/tags/${version}`; | ||
|
||
try { | ||
const response = await fetch(apiUrl); | ||
|
||
if (!response.ok) { | ||
throw new Error(`Failed to fetch release notes: ${response.statusText}`); | ||
} | ||
|
||
const data = await response.json(); | ||
const releaseNotes = data.body; | ||
|
||
// Format the release notes using the https://github.com/markedjs/marked library and display them in the element | ||
releaseNotesElement.innerHTML = marked.parse(releaseNotes); | ||
|
||
} catch (error) { | ||
releaseNotesElement.textContent = `Error: ${error.message}`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters