mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-25 03:00:20 -04:00
V1.0.1 (#30)
* Update README.md * Update README.md * Fixed problem with docker volume mount location * Updated docker compose with new volume mount location * Fixed folder creation for db file * Added support for cross-timezone clients * Fixed database test Co-authored-by: Noted <57927413+ItsNoted@users.noreply.github.com>
This commit is contained in:
@@ -401,7 +401,7 @@ def api_reminders_list():
|
||||
Description: Add a reminder
|
||||
Parameters (body (content-type: application/json)):
|
||||
title (required): the title of the reminder
|
||||
time (required): the epoch timestamp that the reminder should be sent at
|
||||
time (required): the UTC epoch timestamp that the reminder should be sent at
|
||||
notification_service (required): the id of the notification service to use to send the notification
|
||||
text: the body of the reminder
|
||||
repeat_quantity ('year', 'month', 'week', 'day', 'hours', 'minutes'): The quantity of the repeat_interval
|
||||
@@ -481,7 +481,7 @@ def api_get_reminder(r_id: int):
|
||||
Description: Edit the reminder
|
||||
Parameters (body (content-type: application/json)):
|
||||
title: The new title of the entry.
|
||||
time: The new epoch timestamp the the reminder should be send.
|
||||
time: The new UTC epoch timestamp the the reminder should be send.
|
||||
notification_service: The new id of the notification service to use to send the reminder.
|
||||
text: The new body of the reminder.
|
||||
repeat_quantity ('year', 'month', 'week', 'day', 'hours', 'minutes'): The quantity of the repeat_interval
|
||||
|
||||
@@ -20,7 +20,7 @@ function addReminder() {
|
||||
|
||||
const data = {
|
||||
'title': inputs.title.value,
|
||||
'time': new Date(inputs.time.value).getTime() / 1000,
|
||||
'time': (new Date(inputs.time.value) / 1000) + (new Date(inputs.time.value).getTimezoneOffset() * 60),
|
||||
'notification_service': inputs.notification_service.value,
|
||||
'text': inputs.text.value
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ function editReminder() {
|
||||
const id = document.getElementById('edit-form').dataset.id;
|
||||
const data = {
|
||||
'title': edit_inputs.title.value,
|
||||
'time': new Date(edit_inputs.time.value).getTime() / 1000,
|
||||
'time': (new Date(edit_inputs.time.value) / 1000) + (new Date(edit_inputs.time.value).getTimezoneOffset() * 60),
|
||||
'notification_service': edit_inputs.notification_service.value,
|
||||
'text': edit_inputs.text.value,
|
||||
'repeat_quantity': null,
|
||||
@@ -67,9 +67,10 @@ function showEdit(id) {
|
||||
.then(json => {
|
||||
edit_inputs.title.value = json.result.title;
|
||||
|
||||
edit_inputs.time.value = new Date(
|
||||
var trigger_date = new Date(
|
||||
(json.result.time + new Date(json.result.time * 1000).getTimezoneOffset() * -60) * 1000
|
||||
).toISOString().slice(0, 16);
|
||||
);
|
||||
edit_inputs.time.value = trigger_date.toLocaleString('en-CA').slice(0,10) + 'T' + trigger_date.toTimeString().slice(0,5);
|
||||
edit_inputs.notification_service.value = json.result.notification_service;
|
||||
|
||||
if (json.result['repeat_interval'] === null) {
|
||||
|
||||
@@ -13,7 +13,8 @@ function fillTable(result) {
|
||||
entry.appendChild(title);
|
||||
|
||||
const time = document.createElement('p');
|
||||
var d = new Date(reminder.time * 1000);
|
||||
var offset = new Date(reminder.time * 1000).getTimezoneOffset() * -60;
|
||||
var d = new Date((reminder.time + offset) * 1000);
|
||||
var formatted_date = d.toLocaleString('en-CA').slice(0,10) + ' ' + d.toTimeString().slice(0,5);
|
||||
if (reminder.repeat_interval !== null) {
|
||||
if (reminder.repeat_interval === 1) {
|
||||
|
||||
Reference in New Issue
Block a user