mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-13 01:25:45 +00:00
feature: The mega dashboards & entities commit.
This commit is contained in:
@@ -187,11 +187,11 @@ function marshalDashboardStructureToHtml (json) {
|
||||
}
|
||||
|
||||
function marshalLink (item, fieldset) {
|
||||
let btn = window.actionButtons[item.link]
|
||||
let btn = window.actionButtons[item.title]
|
||||
|
||||
if (typeof btn === 'undefined') {
|
||||
btn = document.createElement('button')
|
||||
btn.innerText = 'Action not found: ' + item.link
|
||||
btn.innerText = 'Action not found: ' + item.title
|
||||
btn.classList.add('error')
|
||||
}
|
||||
|
||||
@@ -208,6 +208,9 @@ function marshalContainerContents (json, section, fieldset, parentDashboard) {
|
||||
marshalDirectoryButton(item, fieldset)
|
||||
marshalDirectory(item, section)
|
||||
break
|
||||
case 'display':
|
||||
marshalDisplay(item, fieldset)
|
||||
break
|
||||
case 'link':
|
||||
marshalLink(item, fieldset)
|
||||
break
|
||||
@@ -335,6 +338,13 @@ function createDirectoryBreadcrumb (title, link) {
|
||||
return a
|
||||
}
|
||||
|
||||
function marshalDisplay (item, fieldset) {
|
||||
const display = document.createElement('div')
|
||||
display.innerHTML = item.title
|
||||
|
||||
fieldset.appendChild(display)
|
||||
}
|
||||
|
||||
function marshalDirectoryButton (item, fieldset) {
|
||||
const directoryButton = document.createElement('button')
|
||||
directoryButton.innerHTML = '<span class = "icon">📁</span> ' + item.title
|
||||
|
||||
Reference in New Issue
Block a user