diff --git a/docs/docs/assets/img/MealieDiagram.png b/docs/docs/assets/img/MealieDiagram.png deleted file mode 100644 index fb1f4942f..000000000 Binary files a/docs/docs/assets/img/MealieDiagram.png and /dev/null differ diff --git a/docs/docs/assets/img/add-notification.webp b/docs/docs/assets/img/add-notification.webp new file mode 100644 index 000000000..64e6314be Binary files /dev/null and b/docs/docs/assets/img/add-notification.webp differ diff --git a/docs/docs/assets/img/add-user.png b/docs/docs/assets/img/add-user.png deleted file mode 100644 index 02cd1517f..000000000 Binary files a/docs/docs/assets/img/add-user.png and /dev/null differ diff --git a/docs/docs/assets/img/add-user.webp b/docs/docs/assets/img/add-user.webp new file mode 100644 index 000000000..cd2a27bac Binary files /dev/null and b/docs/docs/assets/img/add-user.webp differ diff --git a/docs/docs/assets/img/admin-backup.png b/docs/docs/assets/img/admin-backup.png deleted file mode 100644 index b1f4850e4..000000000 Binary files a/docs/docs/assets/img/admin-backup.png and /dev/null differ diff --git a/docs/docs/assets/img/admin-backup.webp b/docs/docs/assets/img/admin-backup.webp new file mode 100644 index 000000000..8ce626002 Binary files /dev/null and b/docs/docs/assets/img/admin-backup.webp differ diff --git a/docs/docs/assets/img/admin-theme.png b/docs/docs/assets/img/admin-theme.png deleted file mode 100644 index ac843547e..000000000 Binary files a/docs/docs/assets/img/admin-theme.png and /dev/null differ diff --git a/docs/docs/assets/img/app_diagram.drawio.svg b/docs/docs/assets/img/app_diagram.drawio.svg deleted file mode 100644 index 30e458ba5..000000000 --- a/docs/docs/assets/img/app_diagram.drawio.svg +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - -
-
-
-

- User Groups -

-

- User groups, or "family" groups are a collection of users that are associated together. Users belonging to groups will have access to their associated mealplans and associated pages. This is currently the only feature of groups. -

-
-
-
-
- - User Groups... - -
-
- - - - - - -
-
-
-

- Admins -

-

- Mealie admins are super users that have access to all user data (excluding passwords). Perform administrative tasks like adding users, resetting user passwords, backing up the database, migrating data, and managing site settings. Administrators can also access restricted recipes that are marked hidden or uneditable by the user. -

-
-
-
-
- - Admins... - -
-
- - - - - - -
-
-
-

- Users -

-

- A single user created by an Admin that has basic privlages to edit their profile, create and edit recipes they own. Edit recipes that are not hidden and are marked editable. -

-
-
-
-
- - Users... - -
-
- - - - - - -
-
-
-

- Database Relationships -

-

- The basic relationship and ownership is diagramed below. In short users are owners of recipes and groups are the owners of meal-plans. By default all users will be added to the "default" group. If a recipe is added through a migration or through a backup where no user exists ownership will be set to the default Admin. -

-
-
-
-
- - Database Relationships... - -
-
- - - - - - Recipe - - - - - - owners: list[Users] - - - - editable: boolean - - - - hidden: boolean - - - - - - - - User - - - - - - admin: boolean - - - - group: list[Group] - - - - recipes: list[Recipe] - - - - - - - - MealPlan - - - - - - group: Group - - - - - - - - Group - - - - - - users: list[Users] - - - - mealplans list[MealPlan] - - - - - -
-
-
- User.group is backfilled by a Groups object -
-
-
-
- - User.group is bac... - -
-
- - - - - - - - - - - - -
-
-
- User.recipes is backfilled by Recipe objects -
-
-
-
- - User.recipes is b... - -
-
- - - -
-
-
- Group.mealplan is backfilled by MealPlan objects -
-
-
-
- - Group.mealplan is... - -
-
-
- - - - - Viewer does not support full SVG 1.1 - - - -
\ No newline at end of file diff --git a/docs/docs/assets/img/app_diagram.png b/docs/docs/assets/img/app_diagram.png deleted file mode 100644 index 7f3356257..000000000 Binary files a/docs/docs/assets/img/app_diagram.png and /dev/null differ diff --git a/docs/docs/assets/img/mealie-diagram.webp b/docs/docs/assets/img/mealie-diagram.webp new file mode 100644 index 000000000..29392d399 Binary files /dev/null and b/docs/docs/assets/img/mealie-diagram.webp differ diff --git a/docs/docs/assets/img/sign-up-links.png b/docs/docs/assets/img/sign-up-links.png deleted file mode 100644 index e8e171979..000000000 Binary files a/docs/docs/assets/img/sign-up-links.png and /dev/null differ diff --git a/docs/docs/assets/img/sign-up-links.webp b/docs/docs/assets/img/sign-up-links.webp new file mode 100644 index 000000000..ec5d4760c Binary files /dev/null and b/docs/docs/assets/img/sign-up-links.webp differ diff --git a/docs/docs/assets/img/site-settings.png b/docs/docs/assets/img/site-settings.png deleted file mode 100644 index a52974068..000000000 Binary files a/docs/docs/assets/img/site-settings.png and /dev/null differ diff --git a/docs/docs/assets/img/site-settings.webp b/docs/docs/assets/img/site-settings.webp new file mode 100644 index 000000000..4e0763a7b Binary files /dev/null and b/docs/docs/assets/img/site-settings.webp differ diff --git a/docs/docs/getting-started/notifications.md b/docs/docs/getting-started/notifications.md new file mode 100644 index 000000000..976b1f67b --- /dev/null +++ b/docs/docs/getting-started/notifications.md @@ -0,0 +1,59 @@ +# Getting External Notifications + +## Apprise + +Using the [Apprise](https://github.com/caronc/apprise/) library Mealie is able to provided notification services for nearly every popular service. Some of our favorites are... + +- [Gotify](https://github.com/caronc/apprise/wiki/Notify_gotify) +- [Discord](https://github.com/caronc/apprise/wiki/Notify_discord) +- [Home Assistant](https://github.com/caronc/apprise/wiki/Notify_homeassistant) +- [Matrix](https://github.com/caronc/apprise/wiki/Notify_matrix) +- [Pushover](https://github.com/caronc/apprise/wiki/Notify_pushover) + +But there are some many to choose from! Take a look at their wiki for information on how to create their URL formats and that you can use to create a notification integration in Mealie. + + +## Subscribe Events +There are several categories of events that mealie logs that can be broadcast with the notifications feature. You can also see a feed of your events in the Admin Dashboard + +- General Events + - Application Startup +- Recipe Events + - Create Recipe + - Delete Recipe +- Database Events + - Export/Import + - Database Initialization +- Scheduled Events + - MealPlan Webhooks Sent +- Group Events + - Create/Delete Groups +- User Events + - User Creation + - User Sign-up + - Sign-up Token Creation + - Invalid login attempts + +In most cases the events will also provide details on which user performed the action. Now you'll know when your grandma deletes your favorite recipe! + +!!! info + This is a new feature and we are still working through all the possibilities of events. if you have an idea for an event let us know! + + +## Creating a New Notification + +New events can be created and viewed in admin Toolbox `/admin/toolbox?tab=event-notifications`. Select the "+ Notification" button and you'll be provided with a dialog. Complete the form using the URL for the service you'd like to connect to. Before saving be sure to use the test feature. + +!!! tip + The feedback provided from the test feature is only an indicated of if the URL you provided is valid, not if the message was successfully sent. Be sure to check the notification feed for the test message. + +![Add Notification Image](../../assets/img/add-notification.webp) + + +## Examples + +### Discord +![Discord]() + +### Gotify +![Gotify]() \ No newline at end of file diff --git a/docs/docs/getting-started/organizing-recipes.md b/docs/docs/getting-started/organizing-recipes.md index 639190f61..4a8b9a6fe 100644 --- a/docs/docs/getting-started/organizing-recipes.md +++ b/docs/docs/getting-started/organizing-recipes.md @@ -19,4 +19,4 @@ Below are some general guidelines that were considered when creating the organiz In the diagram below you will see what we came up with using the new custom pages feature. The large circles indicate pages, and the rectangles indicate categories. We've grouped several 'like' categories with each other as a way to quickly find similar items. -![Mealie Diagram](../../assets/img/MealieDiagram.png) \ No newline at end of file +![Mealie Diagram](../../assets/img/mealie-diagram.webp) \ No newline at end of file diff --git a/docs/docs/overrides/api.html b/docs/docs/overrides/api.html index 3455949e0..1b051eda4 100644 --- a/docs/docs/overrides/api.html +++ b/docs/docs/overrides/api.html @@ -14,7 +14,7 @@
diff --git a/docs/docs/site-administration/site-settings.md b/docs/docs/site-administration/site-settings.md index 5aff8f446..2ada08ea5 100644 --- a/docs/docs/site-administration/site-settings.md +++ b/docs/docs/site-administration/site-settings.md @@ -10,7 +10,7 @@ Your sites settings panel can only be accessed by administrators. This where you | Card Per Section | The amount of cards displayed in each section on the home page | | Home Page Sections | Category sections to include on the home page | -![Site Settings Image](../assets/img/site-settings.png) +![Site Settings Image](../assets/img/site-settings.webp) diff --git a/docs/docs/site-administration/user-management.md b/docs/docs/site-administration/user-management.md index cc73712b4..b3145d1f7 100644 --- a/docs/docs/site-administration/user-management.md +++ b/docs/docs/site-administration/user-management.md @@ -56,7 +56,7 @@ There are two ways to create users in Mealie. ### Manually Creating a User In the Manage Users section you are able to create a user by providing the necessary information in the pop-up dialog. -![Create User Image](../assets/img/add-user.png){: align=right style="height:50%;width:50%"} +![Create User Image](../assets/img/add-user.webp){: align=right style="height:50%;width:50%"} - User Name - Email @@ -69,7 +69,7 @@ When creating users manually, their password will be set from the default assign ### Sign Up Links You can generate sign-up links in the Manage Users section. Select the "create link" button and provide the name of the link and if the user will be an administrator. Once a link is created it will populate in the table where you'll be able to see all active links, delete a link, and copy the link as needed. -![Sign Up Links Image](../assets/img/sign-up-links.png) +![Sign Up Links Image](../assets/img/sign-up-links.webp) !!! tip When a link is used it is automatically removed from the database. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 90b2c8719..b47bcc4f0 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -55,6 +55,7 @@ nav: - Working With Recipes: "getting-started/recipes.md" - Organizing Recipes: "getting-started/organizing-recipes.md" - Planning Meals: "getting-started/meal-planner.md" + - External Notifications: "getting-started/notifications.md" - iOS Shortcuts: "getting-started/ios.md" - Site Administration: - User Settings: "site-administration/user-settings.md" diff --git a/frontend/public/static/discord.svg b/frontend/public/static/discord.svg new file mode 100644 index 000000000..65c9fccff --- /dev/null +++ b/frontend/public/static/discord.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/static/gotify.png b/frontend/public/static/gotify.png new file mode 100644 index 000000000..541044cef Binary files /dev/null and b/frontend/public/static/gotify.png differ diff --git a/frontend/public/static/home-assistant.png b/frontend/public/static/home-assistant.png new file mode 100644 index 000000000..3a690e9f8 Binary files /dev/null and b/frontend/public/static/home-assistant.png differ diff --git a/frontend/public/static/matrix.png b/frontend/public/static/matrix.png new file mode 100644 index 000000000..56eb45ee6 Binary files /dev/null and b/frontend/public/static/matrix.png differ diff --git a/frontend/public/static/pushover.svg b/frontend/public/static/pushover.svg new file mode 100644 index 000000000..08956d819 --- /dev/null +++ b/frontend/public/static/pushover.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/frontend/src/api/about.js b/frontend/src/api/about.js index f04322939..1cfa13f23 100644 --- a/frontend/src/api/about.js +++ b/frontend/src/api/about.js @@ -1,5 +1,6 @@ import { baseURL } from "./api-utils"; import { apiReq } from "./api-utils"; +import i18n from "@/i18n.js"; const prefix = baseURL + "about"; @@ -12,6 +13,10 @@ const aboutURLs = { statistics: `${prefix}/statistics`, events: `${prefix}/events`, event: id => `${prefix}/events/${id}`, + + allNotifications: `${prefix}/events/notifications`, + testNotifications: `${prefix}/events/notifications/test`, + notification: id => `${prefix}/events/notifications/${id}`, }; export const aboutAPI = { @@ -27,6 +32,39 @@ export const aboutAPI = { const resposne = await apiReq.delete(aboutURLs.events); return resposne.data; }, + + async allEventNotifications() { + const response = await apiReq.get(aboutURLs.allNotifications); + return response.data; + }, + + async createNotification(data) { + const response = await apiReq.post(aboutURLs.allNotifications, data); + return response.data; + }, + + async deleteNotification(id) { + const response = await apiReq.delete(aboutURLs.notification(id)); + return response.data; + }, + async testNotificationByID(id) { + const response = await apiReq.post( + aboutURLs.testNotifications, + { id: id }, + () => i18n.t("events.something-went-wrong"), + () => i18n.t("events.test-message-sent") + ); + return response.data; + }, + async testNotificationByURL(url) { + const response = await apiReq.post( + aboutURLs.testNotifications, + { test_url: url }, + () => i18n.t("events.something-went-wrong"), + () => i18n.t("events.test-message-sent") + ); + return response.data; + }, // async getAppInfo() { // const response = await apiReq.get(aboutURLs.version); // return response.data; diff --git a/frontend/src/api/users.js b/frontend/src/api/users.js index 1ded3c6e9..68e42c4ae 100644 --- a/frontend/src/api/users.js +++ b/frontend/src/api/users.js @@ -71,7 +71,7 @@ export const userAPI = { }, delete(id) { - return apiReq.delete(usersURLs.userID(id), null, deleteErrorText, function() { + return apiReq.delete(usersURLs.userID(id), null, deleteErrorText, () => { return i18n.t("user.user-deleted"); }); }, diff --git a/frontend/src/components/UI/Dialogs/BaseDialog.vue b/frontend/src/components/UI/Dialogs/BaseDialog.vue index e4a80296e..e83d4d584 100644 --- a/frontend/src/components/UI/Dialogs/BaseDialog.vue +++ b/frontend/src/components/UI/Dialogs/BaseDialog.vue @@ -2,7 +2,7 @@
- + {{ titleIcon }} @@ -11,7 +11,9 @@ - + + + @@ -22,13 +24,15 @@ {{ $t("general.delete") }} - + {{ submitText }} - +
+ +
@@ -59,6 +63,9 @@ export default { submitText: { default: () => i18n.t("general.create"), }, + keepOpen: { + default: false, + }, }, data() { return { @@ -68,7 +75,7 @@ export default { }, computed: { determineClose() { - return this.submitted && !this.loading; + return this.submitted && !this.loading && !this.keepOpen; }, }, watch: { @@ -82,6 +89,7 @@ export default { }, methods: { submitEvent() { + console.log("Submit"); this.$emit("submit"); this.submitted = true; }, diff --git a/frontend/src/components/UI/GlobalSnackbar.vue b/frontend/src/components/UI/GlobalSnackbar.vue index 437d20a46..777c82b2f 100644 --- a/frontend/src/components/UI/GlobalSnackbar.vue +++ b/frontend/src/components/UI/GlobalSnackbar.vue @@ -1,6 +1,10 @@