side_menu_doc/docs/support.md

83 lines
2.1 KiB
Markdown
Raw Normal View History

2023-02-12 12:49:27 +01:00
---
hide:
- navigation
- toc
---
# Support
Bugs and feature requests should be reported with an issue on https://gitnet.fr/deblan/side_menu/issues.
You can also join the official room on Matrix: [#custommenu:neutralnetwork.org](https://matrix.to/#/#custommenu:neutralnetwork.org).
2023-02-12 16:30:22 +01:00
2023-02-23 08:29:14 +01:00
| Version | Security | Bug | New feature |
| :--: | :--: | :--: | :--: |
| 3.x | {{ icon.check }} | {{ icon.check }} | {{ icon.check }} |
| 2.x | {{ icon.check }} | {{ icon.check }} | {{ icon.uncheck }} |
| 1.x | {{ icon.uncheck }} | {{ icon.uncheck }} | {{ icon.uncheck }} |
2023-02-12 16:30:22 +01:00
<div id="issues">
<h3>Current issue(s)</h3>
</div>
<script>
const issues = document.querySelector('#issues')
const createAdmonition = (type, prefix, item) => {
const element = document.createElement('div')
element.innerHTML = `
<div class="admonition ${type}">
2023-02-12 16:42:21 +01:00
<p class="admonition-title">
<a href="${item.html_url}" target="_blank">${prefix} #${item.number}</a>
</p>
<p>${item.title}</p>
2023-02-12 16:30:22 +01:00
</div>
`
return element
}
const createEnhancement = (item) => {
return createAdmonition('example', 'Feature', item)
}
const createBug = (item) => {
return createAdmonition('bug', 'Bug', item)
}
const createQuestion = (item) => {
return createAdmonition('question', 'Issue', item)
}
fetch('https://gitnet.fr/api/v1/repos/deblan/side_menu/issues?state=open', {
headers: new Headers({'accept': 'application/json'})
})
.then((response) => {
return response.json()
})
.then((json) => {
if (json.length === 0) {
issues.style.display = 'none'
}
json.forEach((item) => {
let isBug = false
let isEnhancement = false
item.labels.forEach((label) => {
if (label.name === 'bug') {
isBug = true
} else if (label.name === 'enhancement') {
isEnhancement = true
}
})
if (isBug) {
issues.appendChild(createBug(item))
} else if (isEnhancement) {
issues.appendChild(createEnhancement(item))
} else {
issues.appendChild(createQuestion(item))
}
})
})
</script>