honey/js/UI/Drawer/Drawer.js

27 lines
527 B
JavaScript
Raw Normal View History

2023-10-14 01:43:36 +02:00
import App from "../../App";
export default class Drawer {
2023-10-23 23:32:25 +02:00
constructor() {
2023-10-14 01:43:36 +02:00
this.app = new App()
this.config = this.app.config
this.init()
}
init() {
this.importApps()
}
importApps() {
let apps = this.config.getServices()
let applist = document.getElementById("app-list");
for (let app of apps) {
applist.innerHTML += `<a class="box" href="${app.href}">
<img src="${app.icon}">
<div>
<div class="name">${app.name}</div>
<div class="desc">${app.desc}</div>
</div>
</a>`
}
}
2023-10-23 23:32:25 +02:00
}