-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Updates to the calendar now properly refresh linked Agenda views
- Loading branch information
1 parent
5bbe3bf
commit e838c7a
Showing
7 changed files
with
71 additions
and
30 deletions.
There are no files selected for viewing
32 changes: 13 additions & 19 deletions
32
src/calendar/agenda/Agenda.svelte → src/agenda/Agenda.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script lang="ts"> | ||
import type Calendarium from "src/main"; | ||
import { writable } from "svelte/store"; | ||
import { type CalendarStore } from "src/stores/calendar.store"; | ||
import { setTypedContext } from "../calendar/view.utils"; | ||
import Agenda from "./Agenda.svelte"; | ||
export let store: CalendarStore | null; | ||
export let plugin: Calendarium; | ||
export let parent: string; | ||
setTypedContext("plugin", plugin); | ||
setTypedContext("parent", parent); | ||
$: { | ||
if (store) { | ||
setTypedContext("store", writable(store)); | ||
} | ||
} | ||
</script> | ||
|
||
{#if !store} | ||
<p>No calendars created! Create one in settings to get started.</p> | ||
{:else} | ||
{#key store} | ||
<Agenda /> | ||
{/key} | ||
{/if} | ||
|
||
<style scoped> | ||
.calendar-container { | ||
padding: 0 8px 20px 8px; | ||
background: inherit; | ||
display: flex; | ||
flex-flow: column; | ||
overflow: auto; | ||
height: 100%; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters