Intervals
+Learn about repeating reminders
++ Read +
+ +diff --git a/postman/src/sender.rs b/postman/src/sender.rs index 2007519..138d3c7 100644 --- a/postman/src/sender.rs +++ b/postman/src/sender.rs @@ -294,6 +294,7 @@ ON reminders.channel_id = channels.id WHERE reminders.`utc_time` < NOW() +LIMIT 25 "#, ) .fetch_all(pool) diff --git a/web/src/lib.rs b/web/src/lib.rs index dbce207..10fdb41 100644 --- a/web/src/lib.rs +++ b/web/src/lib.rs @@ -126,6 +126,9 @@ pub async fn initialize( routes::help_timers, routes::help_todo_lists, routes::help_macros, + routes::help_intervals, + routes::help_dashboard, + routes::help_iemanager, ], ) .mount("/login", routes![routes::login::discord_login, routes::login::discord_callback]) diff --git a/web/src/routes/mod.rs b/web/src/routes/mod.rs index d60fab1..29c9352 100644 --- a/web/src/routes/mod.rs +++ b/web/src/routes/mod.rs @@ -86,3 +86,21 @@ pub async fn help_macros() -> Template { let map: HashMap<&str, String> = HashMap::new(); Template::render("support/macros", &map) } + +#[get("/intervals")] +pub async fn help_intervals() -> Template { + let map: HashMap<&str, String> = HashMap::new(); + Template::render("support/intervals", &map) +} + +#[get("/dashboard")] +pub async fn help_dashboard() -> Template { + let map: HashMap<&str, String> = HashMap::new(); + Template::render("support/dashboard", &map) +} + +#[get("/iemanager")] +pub async fn help_iemanager() -> Template { + let map: HashMap<&str, String> = HashMap::new(); + Template::render("support/iemanager", &map) +} diff --git a/web/static/img/support/delete_reminder/cancel-1.png b/web/static/img/support/delete_reminder/cancel-1.png new file mode 100644 index 0000000..0075f31 Binary files /dev/null and b/web/static/img/support/delete_reminder/cancel-1.png differ diff --git a/web/static/img/support/delete_reminder/cancel-2.png b/web/static/img/support/delete_reminder/cancel-2.png new file mode 100644 index 0000000..9c0757b Binary files /dev/null and b/web/static/img/support/delete_reminder/cancel-2.png differ diff --git a/web/static/js/main.js b/web/static/js/main.js index 43b2d8d..3da6c63 100644 --- a/web/static/js/main.js +++ b/web/static/js/main.js @@ -18,6 +18,7 @@ let roles = []; let templates = {}; let globalPatreon = false; +let guildPatreon = false; function guildId() { return document.querySelector(".guildList a.is-active").dataset["guild"]; @@ -78,6 +79,18 @@ function reset_guild_pane() { .forEach((opt) => opt.remove()); } +async function fetch_patreon(guild_id) { + fetch(`/dashboard/api/guild/${guild_id}/patreon`) + .then((response) => response.json()) + .then((data) => { + if (data.error) { + show_error(data.error); + } else { + return data.patreon; + } + }); +} + function fetch_roles(guild_id) { fetch(`/dashboard/api/guild/${guild_id}/roles`) .then((response) => response.json()) @@ -370,6 +383,10 @@ function deserialize_reminder(reminder, frame, mode) { document.addEventListener("guildSwitched", async (e) => { $loader.classList.remove("is-hidden"); + document + .querySelectorAll(".patreon-only") + .forEach((el) => el.classList.add("is-locked")); + let $anchor = document.querySelector( `.switch-pane[data-guild="${e.detail.guild_id}"]` ); @@ -378,6 +395,11 @@ document.addEventListener("guildSwitched", async (e) => { reset_guild_pane(); $anchor.classList.add("is-active"); + if (globalPatreon || (await fetch_patreon(e.detail.guild_id))) { + document + .querySelectorAll(".patreon-only") + .forEach((el) => el.classList.remove("is-locked")); + } fetch_roles(e.detail.guild_id); fetch_templates(e.detail.guild_id); await fetch_channels(e.detail.guild_id); diff --git a/web/templates/help.html.tera b/web/templates/help.html.tera index 72f20d0..b65b40d 100644 --- a/web/templates/help.html.tera +++ b/web/templates/help.html.tera @@ -93,6 +93,65 @@ +
Intervals
+Learn about repeating reminders
++ Read +
+ +Dashboard
+Learn to use the interactive web dashboard
++ Read +
+ +Import/Export
+Learn how to import and export data from the dashboard
++ Read +
+ +Need more help?
++ Feel free to come and ask us! +
+Deleting reminders you've just created
+
+ If you made a mistake, you can quickly delete a reminder you made by pressing "Cancel"
+
+
Export your data
+
+ You can create reminders with the /remind
command.
+
+ Fill out the "time" and "content" fields. If you wish, press on "Optional" to view other options
+ for the reminder.
+
Fixed intervals
+
+ The main type of interval is the fixed interval. Fixed intervals are ideal for hourly, daily, or
+ reminders repeating at any other fixed amount of time.
+
+ You can create fixed interval reminders via the dashboard or via the /remind
command.
+ When you have filled out the "time" and "content" on the command, press tab. Select the
+ "interval" option. Then, write the interval you wish to use: for example, "1 day" for daily (starting
+ at the time specified in "time").
+
Daylight savings
+
+ If you live in a region that uses daylight savings (DST), then your interval reminders may become
+ offset by an hour due to clock changes.
+
+ Reminder Bot offers a quick solution to this via the /offset
command. This command
+ moves all existing reminders on a server by a certain amount of time. You can use offset to move
+ your reminders forward or backward by an hour when daylight savings happens.
+
Monthly/yearly intervals
++ Monthly or yearly intervals are configured the same as fixed intervals. Instead of a fixed time + interval, these reminders repeat on a certain day each month or each year. This makes them ideal + for marking certain dates. +
+Interval expiration
++ An expiration time can also be specified, both via commands and dashboard, for repeating reminders. + This is optional, and if omitted, the reminder will repeat indefinitely. +
+Selecting your timezone automatically
- A new feature we offer is the ability to configure Reminder Bot's timezone from your browser. To do
+ You can also configure Reminder Bot's timezone from your browser. To do
this, go to our dashboard, press 'Timezone' in the bottom left (desktop) or at the bottom of the
navigation menu (mobile). Then, choose 'Set Bot Timezone' to set Reminder Bot to use your browser's
timezone.
diff --git a/web/templates/terms.html.tera b/web/templates/terms.html.tera
index 9847d8f..9eee18f 100644
--- a/web/templates/terms.html.tera
+++ b/web/templates/terms.html.tera
@@ -23,8 +23,8 @@
Reminder Bot or the Discord server.
- The Terms of Service may be updated at any time, and should be considered a guideline for appropriate
- behaviour.
+ The Terms of Service may be updated at any time. Notice will be provided via the Discord server. You
+ should consider the Terms of Service to be a guideline for appropriate behaviour.