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
|
|
|
|
|
|
|
<div id="issues">
|
|
|
|
<h3>Current issue(s)</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
const requestHeaders = new Headers({'accept': 'application/json'});
|
|
|
|
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>
|