diff --git a/manifest.json b/manifest.json index ae58489..a1cd518 100644 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/package.json b/package.json index 7b8ed91..9b2afe1 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/note.ts b/src/note.ts index 3c89cf4..651c408 100644 --- a/src/note.ts +++ b/src/note.ts @@ -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; + } } }) } diff --git a/versions.json b/versions.json index b59da65..1458902 100644 --- a/versions.json +++ b/versions.json @@ -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" }