Skip to content

Commit

Permalink
Add extension id
Browse files Browse the repository at this point in the history
  • Loading branch information
javalikescript committed Jan 8, 2024
1 parent e61187e commit 0e87e7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/web-base/www/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<article class="cards">
<div class="card" v-for="thing in things">
<div class="bar">
<p>{{ thing.title }}</p>
<p>{{ thing.title + (thing.extensionId in extensionsById ? (' (' + extensionsById[thing.extensionId].name + ')') : '') }}</p>
<label class="switch" title="Enable"><input type="checkbox" v-model="thing.toAdd" /><span class="slider"></span></label>
</div>
<p>{{ thing.description }}</p>
Expand Down
4 changes: 4 additions & 0 deletions extensions/web-base/www/app/things.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ new Vue({
new Vue({
el: '#addThings',
data: {
extensionsById: {},
things: []
},
methods: {
Expand All @@ -223,6 +224,9 @@ new Vue({
self.things.push(thing);
}
//console.log('things', self.things);
return app.getExtensionsById();
}).then(function(extensionsById) {
self.extensionsById = extensionsById;
});
},
onAddAll: function() {
Expand Down

0 comments on commit 0e87e7b

Please sign in to comment.