diff --git a/src/components/modals/ReminderManager.vue b/src/components/modals/ReminderManager.vue
new file mode 100644
index 0000000..3317d5d
--- /dev/null
+++ b/src/components/modals/ReminderManager.vue
@@ -0,0 +1,167 @@
+
+
+
+
+
diff --git a/src/store/dashboardStore.ts b/src/store/dashboardStore.ts
index 2525ff4..c023033 100644
--- a/src/store/dashboardStore.ts
+++ b/src/store/dashboardStore.ts
@@ -1,7 +1,7 @@
import { ref, computed, watch } from "vue";
import { invoke } from "@tauri-apps/api/core";
import { DBEvent } from "../types";
-import { currentDate, getTagColor, getTagName, formatMinutes, parseISODate, toISODate, viewMode, refreshSignal } from "./index";
+import { currentDate, getTagColor, getTagName, formatMinutes, parseISODate, toISODate, viewMode, refreshSignal, dbPath } from "./index";
// Re-export for easier access in Dashboard component
export { getTagColor, getTagName, formatMinutes };
@@ -20,6 +20,7 @@ export const dashboardEvents = ref
([]);
export const dailyAverageMode = ref<'natural' | 'recorded'>('natural');
export const loadDashboardEvents = async () => {
+ if (!dbPath.value) return; // Wait until DB path is initialized
dashboardEvents.value = await invoke("get_events_range", { startDate: dashboardStartDate.value, endDate: dashboardEndDate.value });
};
diff --git a/src/store/index.ts b/src/store/index.ts
index 69a036a..4eb3978 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -1,6 +1,6 @@
import { ref, computed } from "vue";
import { invoke } from "@tauri-apps/api/core";
-import { Tag, DBEvent, TimelineItem, Toast } from "../types";
+import { Tag, DBEvent, TimelineItem, Toast, Reminder } from "../types";
export const TIME_OFFSET_MINUTES = 180;
export const TOTAL_MINUTES = 1440;
@@ -39,6 +39,7 @@ export const theme = ref("system");
// --- Global UI State ---
export const isPaused = ref(false);
export const currentDate = ref(getLogicDateStr()); // Initialize with logic date
+export const currentLogicalMinute = ref(-1); // Exported to keep track of current minute globally
export const viewMode = ref<'preview' | 'dashboard'>('dashboard');
export const isFullscreen = ref(false);
export const previewSrc = ref("");
@@ -48,6 +49,7 @@ export const lockedImage = ref(null);
// --- Data State ---
export const tags = ref([]);
export const dayEvents = ref([]);
+export const reminders = ref([]);
export const timelineImages = ref([]);
export const refreshSignal = ref(0); // Counter to trigger dashboard refreshes
@@ -107,3 +109,6 @@ export const loadEvents = async () => {
dayEvents.value = await invoke("get_events", { date: currentDate.value });
refreshSignal.value++; // Increment to signal other stores to refresh
};
+export const loadReminders = async () => {
+ reminders.value = await invoke("get_reminders", { date: currentDate.value });
+};
diff --git a/src/types/index.ts b/src/types/index.ts
index 6db3670..8c99357 100644
--- a/src/types/index.ts
+++ b/src/types/index.ts
@@ -15,6 +15,14 @@ export interface DBEvent {
content: string;
}
+export interface Reminder {
+ id: number;
+ date: string;
+ minute: number;
+ content: string;
+ is_completed: boolean;
+}
+
export interface TimelineItem {
time: string;
path: string;