mirror of
https://github.com/jvsteiner/send-note.git
synced 2026-07-22 11:20:26 +00:00
parent
cc6d72bd6e
commit
a0defc92d2
4 changed files with 13 additions and 4 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
10
src/note.ts
10
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;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue