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()
|
2023-10-30 11:08:22 +01:00
|
|
|
let applist = document.querySelector("#app-list");
|
2023-10-14 01:43:36 +02:00
|
|
|
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
|
|
|
}
|