Skip to content
Snippets Groups Projects
Commit 3a561c49 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Make the headings on the welcome page links to the activities

parent 710977f5
No related branches found
No related tags found
No related merge requests found
...@@ -50,12 +50,17 @@ class AppShellWelcome extends ScopedElementsMixin(LitElement) { ...@@ -50,12 +50,17 @@ class AppShellWelcome extends ScopedElementsMixin(LitElement) {
let metadata = app.metadata; let metadata = app.metadata;
let itemTemplates = []; let itemTemplates = [];
const switchActivity = (e, data) => {
e.preventDefault();
app.switchComponent(data.routing_name);
};
for (let [key, data] of Object.entries(metadata)) { for (let [key, data] of Object.entries(metadata)) {
if (data['visible'] && (key !== "welcome")) { if (data['visible'] && (key !== "welcome")) {
itemTemplates.push(html` itemTemplates.push(html`
<div class="item"> <div class="item">
<h2>${data.name[this.lang]}</h2> <h2><a href="#" @click=${(e) => {switchActivity(e, data);}}>${data.name[this.lang]}</a></h2>
<p class="description">${data.description[this.lang]}</p> <p class="description">${data.description[this.lang]}</p>
</div>`); </div>`);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment