diff --git a/app/components/full-calendar.hbs b/app/components/full-calendar.hbs index 35bf4c1..e005429 100644 --- a/app/components/full-calendar.hbs +++ b/app/components/full-calendar.hbs @@ -1,10 +1,21 @@ -{{#if this.clickedDate}} +{{#if this.clickedDateInfo}} +{{/if}} +{{#if this.clickedEventInfo}} + {{/if}}
+ {{yield}} +
\ No newline at end of file diff --git a/app/components/popover.js b/app/components/popover.js new file mode 100644 index 0000000..8d1a298 --- /dev/null +++ b/app/components/popover.js @@ -0,0 +1,40 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { computePosition, shift, offset } from '@floating-ui/dom'; +import { tracked } from '@glimmer/tracking'; +import { service } from '@ember/service'; + +export default class TimeLogPopoverComponent extends Component { + @service localStorage; + + elementRef = null; + + @action + onInsert(el) { + this.elementRef = el; + } + + @action + onToggle(value) { + this.localStorage.useAdvancedLogPopover = value; + } + + @action + moveToScreenPos() { + computePosition(this.args.anchorElement, this.elementRef, { + placement: 'right-start', + middleware: [ + offset({ + mainAxis: 8, + crossAxis: -8, + }), + shift({ padding: 5 }), + ], + }).then(({ x, y }) => { + Object.assign(this.elementRef.style, { + left: `${x}px`, + top: `${y}px`, + }); + }); + } +} diff --git a/app/components/time-edit-popover.hbs b/app/components/time-edit-popover.hbs new file mode 100644 index 0000000..a8e0b03 --- /dev/null +++ b/app/components/time-edit-popover.hbs @@ -0,0 +1,13 @@ + +
+ +
+
\ No newline at end of file diff --git a/app/components/time-log-popover.hbs b/app/components/time-log-popover.hbs index 7370edc..561539d 100644 --- a/app/components/time-log-popover.hbs +++ b/app/components/time-log-popover.hbs @@ -1,14 +1,6 @@ -