Added timezone to user

This commit is contained in:
Magnus Åhall 2024-04-03 17:37:32 +02:00
parent f9f083367e
commit 49fd943110
4 changed files with 122 additions and 35 deletions

View file

@ -59,6 +59,7 @@ export class NodeUI extends Component {
case 'node':
if (node.ID == 0) {
page = html`
<div style="cursor: pointer; color: #000; text-align: center;" onclick=${()=>this.page.value = 'schedule-events'}>Schedule events</div>
${children.length > 0 ? html`<div class="child-nodes">${children}</div><div id="notes-version">Notes version ${window._VERSION}</div>` : html``}
`
} else {
@ -97,10 +98,14 @@ export class NodeUI extends Component {
case 'search':
page = html`<${Search} nodeui=${this} />`
break
case 'schedule-events':
page = html`<${ScheduleEventList} nodeui=${this} />`
break
}
let menu = ()=> (this.menu.value ? html`<${Menu} nodeui=${this} />` : null)
let checklist = ()=>
let menu = () => (this.menu.value ? html`<${Menu} nodeui=${this} />` : null)
let checklist = () =>
html`
<div class="checklist" onclick=${evt => { evt.stopPropagation(); this.toggleChecklist() }}>
<img src="/images/${window._VERSION}/${this.showChecklist() ? 'checklist-on.svg' : 'checklist-off.svg'}" />
@ -307,7 +312,7 @@ export class NodeUI extends Component {
this.node.value.ShowChecklist.value = !this.node.value.ShowChecklist.value
}//}}}
toggleMarkdown() {//{{{
this.node.value.RenderMarkdown.value = !this.node.value.RenderMarkdown.value
this.node.value.RenderMarkdown.value = !this.node.value.RenderMarkdown.value
}//}}}
}
@ -618,7 +623,7 @@ export class Node {
initChecklist(checklistData) {//{{{
if (checklistData === undefined || checklistData === null)
return
this.ChecklistGroups = checklistData.map(groupData=>{
this.ChecklistGroups = checklistData.map(groupData => {
return new ChecklistGroup(groupData)
})
}//}}}
@ -778,7 +783,7 @@ class NodeProperties extends Component {
<div style="margin-bottom: 16px">These properties are only for this note.</div>
<div class="checks">
<input type="checkbox" id="render-markdown" checked=${nodeui.node.value.Markdown} onchange=${evt=>nodeui.node.value.Markdown = evt.target.checked} />
<input type="checkbox" id="render-markdown" checked=${nodeui.node.value.Markdown} onchange=${evt => nodeui.node.value.Markdown = evt.target.checked} />
<label for="render-markdown">Markdown view</label>
</div>
@ -959,4 +964,20 @@ class ProfileSettings extends Component {
}//}}}
}
class ScheduleEventList extends Component {
constructor() {
super()
this.retrieveFutureEvents()
}
render() {
}
retrieveFutureEvents() {
_app.current.request('/schedule/list')
.then(foo=>{
console.log(foo)
})
}
}
// vim: foldmethod=marker