Fix #114 - missing YAML values
This commit is contained in:
Alan Grainger 2024-08-02 15:32:11 +02:00
parent cc6d72bd6e
commit a0defc92d2
4 changed files with 13 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{
"id": "share-note",
"name": "Share Note",
"version": "0.8.13",
"version": "0.8.14",
"minAppVersion": "0.15.0",
"description": "Instantly share a note, with the full theme and content exactly like you see in Reading View. Data is shared encrypted by default, and only you and the person you send it to have the key.",
"author": "Alan Grainger",

View file

@ -1,6 +1,6 @@
{
"name": "share-note",
"version": "0.8.13",
"version": "0.8.14",
"description": "Instantly share a note, with the full theme and content exactly like you see in Reading View. Data is shared encrypted by default, and only you and the person you send it to have the key.",
"main": "main.js",
"scripts": {

View file

@ -157,10 +157,18 @@ export default class Note {
.forEach(propertyContainerEl => {
const propertyName = propertyContainerEl.getAttribute('data-property-key')
if (propertyName) {
console.log(propertyContainerEl)
const nameEl = propertyContainerEl.querySelector('input.metadata-property-key-input')
nameEl?.setAttribute('value', propertyName)
const valueEl = propertyContainerEl.querySelector('div.metadata-property-value > input')
valueEl?.setAttribute('value', this.meta?.frontmatter?.[propertyName] || '')
const value = this.meta?.frontmatter?.[propertyName] || ''
valueEl?.setAttribute('value', value)
// Special cases for different element types
switch (valueEl?.getAttribute('type')) {
case 'checkbox':
if (value) valueEl.setAttribute('checked', 'checked')
break;
}
}
})
}

View file

@ -44,5 +44,6 @@
"0.8.10": "0.15.0",
"0.8.11": "0.15.0",
"0.8.12": "0.15.0",
"0.8.13": "0.15.0"
"0.8.13": "0.15.0",
"0.8.14": "0.15.0"
}