From dd5d1b9cbaba1b4f9c88507accc96e0a3fb490f6 Mon Sep 17 00:00:00 2001 From: Elijah Mock <28277163+ekcom@users.noreply.github.com> Date: Sat, 6 Jan 2024 21:49:29 +0000 Subject: [PATCH 01/10] Add helpers to activate and deactivate warning --- frontend/composables/use-navigation-warning.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 frontend/composables/use-navigation-warning.ts diff --git a/frontend/composables/use-navigation-warning.ts b/frontend/composables/use-navigation-warning.ts new file mode 100644 index 000000000000..f07d842ae0d6 --- /dev/null +++ b/frontend/composables/use-navigation-warning.ts @@ -0,0 +1,7 @@ +export const activateNavigationWarning = () => { + window.onbeforeunload = () => true; +} + +export const deactivateNavigationWarning = () => { + window.onbeforeunload = null; +} From 265313919c0dddfb19dc6deda4293920a4163d3a Mon Sep 17 00:00:00 2001 From: Elijah Mock <28277163+ekcom@users.noreply.github.com> Date: Sat, 6 Jan 2024 21:51:35 +0000 Subject: [PATCH 02/10] Vue-ify and add documentation --- .../composables/use-navigation-warning.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/frontend/composables/use-navigation-warning.ts b/frontend/composables/use-navigation-warning.ts index f07d842ae0d6..2dff77d39a8a 100644 --- a/frontend/composables/use-navigation-warning.ts +++ b/frontend/composables/use-navigation-warning.ts @@ -1,7 +1,22 @@ -export const activateNavigationWarning = () => { +export function useNavigationWarning() { + return { activateNavigationWarning, deactivateNavigationWarning }; +} + +/** + * Displays a warning before the user navigates to another page + * e.g., by clicking a link (which isn't internal and rendered without page load), + * reloading the page, + * or closing the tab. + */ +const activateNavigationWarning = () => { + console.log("ACTIVATE"); window.onbeforeunload = () => true; } -export const deactivateNavigationWarning = () => { +/** + * Disables the warning when navigating to a page + */ +const deactivateNavigationWarning = () => { + console.log("deACTIVATE"); window.onbeforeunload = null; } From 33870dc845d33c063d4e1102aedcb7f6fa7da159 Mon Sep 17 00:00:00 2001 From: Elijah Mock <28277163+ekcom@users.noreply.github.com> Date: Sat, 6 Jan 2024 21:52:56 +0000 Subject: [PATCH 03/10] Set up navigation warning while editing recipe --- frontend/composables/recipe-page/shared-state.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/composables/recipe-page/shared-state.ts b/frontend/composables/recipe-page/shared-state.ts index bbc040dfb368..5e981fcdb891 100644 --- a/frontend/composables/recipe-page/shared-state.ts +++ b/frontend/composables/recipe-page/shared-state.ts @@ -1,5 +1,6 @@ import { computed, ComputedRef, ref, Ref, useContext } from "@nuxtjs/composition-api"; import { UserOut } from "~/lib/api/types/user"; +import { useNavigationWarning } from "~/composables/use-navigation-warning"; export enum PageMode { EDIT = "EDIT", @@ -65,6 +66,8 @@ function pageRefs(slug: string) { } function pageState({ slugRef, pageModeRef, editModeRef, imageKey }: PageRefs): PageState { + const { activateNavigationWarning, deactivateNavigationWarning } = useNavigationWarning(); + const toggleEditMode = () => { if (editModeRef.value === EditorMode.FORM) { editModeRef.value = EditorMode.JSON; @@ -88,8 +91,13 @@ function pageState({ slugRef, pageModeRef, editModeRef, imageKey }: PageRefs): P const setMode = (toMode: PageMode) => { const fromMode = pageModeRef.value; - if (fromMode === PageMode.EDIT && toMode === PageMode.VIEW) { - setEditMode(EditorMode.FORM); + if (fromMode === PageMode.EDIT) { + if (toMode === PageMode.VIEW) { + setEditMode(EditorMode.FORM); + } + deactivateNavigationWarning(); + } else if (toMode === PageMode.EDIT) { + activateNavigationWarning(); } pageModeRef.value = toMode; From f77649abc8d0325ae83d5ef5036ce140723e89b6 Mon Sep 17 00:00:00 2001 From: Elijah Mock <28277163+ekcom@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:18:55 +0000 Subject: [PATCH 04/10] Disarm on internal site navigation --- frontend/components/Domain/Recipe/RecipePage/RecipePage.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue index 13ced2946022..91d521723dbc 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePage.vue @@ -112,6 +112,7 @@ import { useUserApi } from "~/composables/api"; import { uuid4, deepCopy } from "~/composables/use-utils"; import RecipeDialogBulkAdd from "~/components/Domain/Recipe/RecipeDialogBulkAdd.vue"; import RecipeNotes from "~/components/Domain/Recipe/RecipeNotes.vue"; +import { useNavigationWarning } from "~/composables/use-navigation-warning"; const EDITOR_OPTIONS = { mode: "code", @@ -151,6 +152,7 @@ export default defineComponent({ const api = useUserApi(); const { pageMode, editMode, setMode, isEditForm, isEditJSON, isCookMode, isEditMode, toggleCookMode } = usePageState(props.recipe.slug); + const { deactivateNavigationWarning } = useNavigationWarning(); /** ============================================================= * Recipe Snapshot on Mount @@ -175,6 +177,7 @@ export default defineComponent({ await api.recipes.updateOne(props.recipe.slug, props.recipe); } } + deactivateNavigationWarning(); }); /** ============================================================= From 70ce34d6c9b6c6588f0df5fd74c27e3607808334 Mon Sep 17 00:00:00 2001 From: Elijah Mock <28277163+ekcom@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:22:10 +0000 Subject: [PATCH 05/10] Remove logging --- frontend/composables/use-navigation-warning.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/composables/use-navigation-warning.ts b/frontend/composables/use-navigation-warning.ts index 2dff77d39a8a..85cf0b85e69b 100644 --- a/frontend/composables/use-navigation-warning.ts +++ b/frontend/composables/use-navigation-warning.ts @@ -9,7 +9,6 @@ export function useNavigationWarning() { * or closing the tab. */ const activateNavigationWarning = () => { - console.log("ACTIVATE"); window.onbeforeunload = () => true; } @@ -17,6 +16,5 @@ const activateNavigationWarning = () => { * Disables the warning when navigating to a page */ const deactivateNavigationWarning = () => { - console.log("deACTIVATE"); window.onbeforeunload = null; } From 9e1edbacb6e820cbf828be0e585cb11bccacb2c2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 19:59:39 +0000 Subject: [PATCH 06/10] chore(deps): update dependency coverage to v7.4.2 --- poetry.lock | 106 ++++++++++++++++++++++++++-------------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/poetry.lock b/poetry.lock index 034d05ce6eb9..0226f119f97a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -387,63 +387,63 @@ files = [ [[package]] name = "coverage" -version = "7.4.1" +version = "7.4.2" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:077d366e724f24fc02dbfe9d946534357fda71af9764ff99d73c3c596001bbd7"}, - {file = "coverage-7.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0193657651f5399d433c92f8ae264aff31fc1d066deee4b831549526433f3f61"}, - {file = "coverage-7.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d17bbc946f52ca67adf72a5ee783cd7cd3477f8f8796f59b4974a9b59cacc9ee"}, - {file = "coverage-7.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3277f5fa7483c927fe3a7b017b39351610265308f5267ac6d4c2b64cc1d8d25"}, - {file = "coverage-7.4.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6dceb61d40cbfcf45f51e59933c784a50846dc03211054bd76b421a713dcdf19"}, - {file = "coverage-7.4.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6008adeca04a445ea6ef31b2cbaf1d01d02986047606f7da266629afee982630"}, - {file = "coverage-7.4.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c61f66d93d712f6e03369b6a7769233bfda880b12f417eefdd4f16d1deb2fc4c"}, - {file = "coverage-7.4.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b9bb62fac84d5f2ff523304e59e5c439955fb3b7f44e3d7b2085184db74d733b"}, - {file = "coverage-7.4.1-cp310-cp310-win32.whl", hash = "sha256:f86f368e1c7ce897bf2457b9eb61169a44e2ef797099fb5728482b8d69f3f016"}, - {file = "coverage-7.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:869b5046d41abfea3e381dd143407b0d29b8282a904a19cb908fa24d090cc018"}, - {file = "coverage-7.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b8ffb498a83d7e0305968289441914154fb0ef5d8b3157df02a90c6695978295"}, - {file = "coverage-7.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3cacfaefe6089d477264001f90f55b7881ba615953414999c46cc9713ff93c8c"}, - {file = "coverage-7.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d6850e6e36e332d5511a48a251790ddc545e16e8beaf046c03985c69ccb2676"}, - {file = "coverage-7.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18e961aa13b6d47f758cc5879383d27b5b3f3dcd9ce8cdbfdc2571fe86feb4dd"}, - {file = "coverage-7.4.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfd1e1b9f0898817babf840b77ce9fe655ecbe8b1b327983df485b30df8cc011"}, - {file = "coverage-7.4.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6b00e21f86598b6330f0019b40fb397e705135040dbedc2ca9a93c7441178e74"}, - {file = "coverage-7.4.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:536d609c6963c50055bab766d9951b6c394759190d03311f3e9fcf194ca909e1"}, - {file = "coverage-7.4.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7ac8f8eb153724f84885a1374999b7e45734bf93a87d8df1e7ce2146860edef6"}, - {file = "coverage-7.4.1-cp311-cp311-win32.whl", hash = "sha256:f3771b23bb3675a06f5d885c3630b1d01ea6cac9e84a01aaf5508706dba546c5"}, - {file = "coverage-7.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:9d2f9d4cc2a53b38cabc2d6d80f7f9b7e3da26b2f53d48f05876fef7956b6968"}, - {file = "coverage-7.4.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f68ef3660677e6624c8cace943e4765545f8191313a07288a53d3da188bd8581"}, - {file = "coverage-7.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:23b27b8a698e749b61809fb637eb98ebf0e505710ec46a8aa6f1be7dc0dc43a6"}, - {file = "coverage-7.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e3424c554391dc9ef4a92ad28665756566a28fecf47308f91841f6c49288e66"}, - {file = "coverage-7.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e0860a348bf7004c812c8368d1fc7f77fe8e4c095d661a579196a9533778e156"}, - {file = "coverage-7.4.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe558371c1bdf3b8fa03e097c523fb9645b8730399c14fe7721ee9c9e2a545d3"}, - {file = "coverage-7.4.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3468cc8720402af37b6c6e7e2a9cdb9f6c16c728638a2ebc768ba1ef6f26c3a1"}, - {file = "coverage-7.4.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:02f2edb575d62172aa28fe00efe821ae31f25dc3d589055b3fb64d51e52e4ab1"}, - {file = "coverage-7.4.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ca6e61dc52f601d1d224526360cdeab0d0712ec104a2ce6cc5ccef6ed9a233bc"}, - {file = "coverage-7.4.1-cp312-cp312-win32.whl", hash = "sha256:ca7b26a5e456a843b9b6683eada193fc1f65c761b3a473941efe5a291f604c74"}, - {file = "coverage-7.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:85ccc5fa54c2ed64bd91ed3b4a627b9cce04646a659512a051fa82a92c04a448"}, - {file = "coverage-7.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8bdb0285a0202888d19ec6b6d23d5990410decb932b709f2b0dfe216d031d218"}, - {file = "coverage-7.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:918440dea04521f499721c039863ef95433314b1db00ff826a02580c1f503e45"}, - {file = "coverage-7.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:379d4c7abad5afbe9d88cc31ea8ca262296480a86af945b08214eb1a556a3e4d"}, - {file = "coverage-7.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b094116f0b6155e36a304ff912f89bbb5067157aff5f94060ff20bbabdc8da06"}, - {file = "coverage-7.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2f5968608b1fe2a1d00d01ad1017ee27efd99b3437e08b83ded9b7af3f6f766"}, - {file = "coverage-7.4.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:10e88e7f41e6197ea0429ae18f21ff521d4f4490aa33048f6c6f94c6045a6a75"}, - {file = "coverage-7.4.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a4a3907011d39dbc3e37bdc5df0a8c93853c369039b59efa33a7b6669de04c60"}, - {file = "coverage-7.4.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6d224f0c4c9c98290a6990259073f496fcec1b5cc613eecbd22786d398ded3ad"}, - {file = "coverage-7.4.1-cp38-cp38-win32.whl", hash = "sha256:23f5881362dcb0e1a92b84b3c2809bdc90db892332daab81ad8f642d8ed55042"}, - {file = "coverage-7.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:a07f61fc452c43cd5328b392e52555f7d1952400a1ad09086c4a8addccbd138d"}, - {file = "coverage-7.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8e738a492b6221f8dcf281b67129510835461132b03024830ac0e554311a5c54"}, - {file = "coverage-7.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46342fed0fff72efcda77040b14728049200cbba1279e0bf1188f1f2078c1d70"}, - {file = "coverage-7.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9641e21670c68c7e57d2053ddf6c443e4f0a6e18e547e86af3fad0795414a628"}, - {file = "coverage-7.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aeb2c2688ed93b027eb0d26aa188ada34acb22dceea256d76390eea135083950"}, - {file = "coverage-7.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d12c923757de24e4e2110cf8832d83a886a4cf215c6e61ed506006872b43a6d1"}, - {file = "coverage-7.4.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0491275c3b9971cdbd28a4595c2cb5838f08036bca31765bad5e17edf900b2c7"}, - {file = "coverage-7.4.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:8dfc5e195bbef80aabd81596ef52a1277ee7143fe419efc3c4d8ba2754671756"}, - {file = "coverage-7.4.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1a78b656a4d12b0490ca72651fe4d9f5e07e3c6461063a9b6265ee45eb2bdd35"}, - {file = "coverage-7.4.1-cp39-cp39-win32.whl", hash = "sha256:f90515974b39f4dea2f27c0959688621b46d96d5a626cf9c53dbc653a895c05c"}, - {file = "coverage-7.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:64e723ca82a84053dd7bfcc986bdb34af8d9da83c521c19d6b472bc6880e191a"}, - {file = "coverage-7.4.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:32a8d985462e37cfdab611a6f95b09d7c091d07668fdc26e47a725ee575fe166"}, - {file = "coverage-7.4.1.tar.gz", hash = "sha256:1ed4b95480952b1a26d863e546fa5094564aa0065e1e5f0d4d0041f293251d04"}, + {file = "coverage-7.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bf54c3e089179d9d23900e3efc86d46e4431188d9a657f345410eecdd0151f50"}, + {file = "coverage-7.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fe6e43c8b510719b48af7db9631b5fbac910ade4bd90e6378c85ac5ac706382c"}, + {file = "coverage-7.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b98c89db1b150d851a7840142d60d01d07677a18f0f46836e691c38134ed18b"}, + {file = "coverage-7.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c5f9683be6a5b19cd776ee4e2f2ffb411424819c69afab6b2db3a0a364ec6642"}, + {file = "coverage-7.4.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78cdcbf7b9cb83fe047ee09298e25b1cd1636824067166dc97ad0543b079d22f"}, + {file = "coverage-7.4.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2599972b21911111114100d362aea9e70a88b258400672626efa2b9e2179609c"}, + {file = "coverage-7.4.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ef00d31b7569ed3cb2036f26565f1984b9fc08541731ce01012b02a4c238bf03"}, + {file = "coverage-7.4.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:20a875bfd8c282985c4720c32aa05056f77a68e6d8bbc5fe8632c5860ee0b49b"}, + {file = "coverage-7.4.2-cp310-cp310-win32.whl", hash = "sha256:b3f2b1eb229f23c82898eedfc3296137cf1f16bb145ceab3edfd17cbde273fb7"}, + {file = "coverage-7.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:7df95fdd1432a5d2675ce630fef5f239939e2b3610fe2f2b5bf21fa505256fa3"}, + {file = "coverage-7.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a8ddbd158e069dded57738ea69b9744525181e99974c899b39f75b2b29a624e2"}, + {file = "coverage-7.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81a5fb41b0d24447a47543b749adc34d45a2cf77b48ca74e5bf3de60a7bd9edc"}, + {file = "coverage-7.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2412e98e70f16243be41d20836abd5f3f32edef07cbf8f407f1b6e1ceae783ac"}, + {file = "coverage-7.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ddb79414c15c6f03f56cc68fa06994f047cf20207c31b5dad3f6bab54a0f66ef"}, + {file = "coverage-7.4.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cf89ab85027427d351f1de918aff4b43f4eb5f33aff6835ed30322a86ac29c9e"}, + {file = "coverage-7.4.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a178b7b1ac0f1530bb28d2e51f88c0bab3e5949835851a60dda80bff6052510c"}, + {file = "coverage-7.4.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:06fe398145a2e91edaf1ab4eee66149c6776c6b25b136f4a86fcbbb09512fd10"}, + {file = "coverage-7.4.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:18cac867950943fe93d6cd56a67eb7dcd2d4a781a40f4c1e25d6f1ed98721a55"}, + {file = "coverage-7.4.2-cp311-cp311-win32.whl", hash = "sha256:f72cdd2586f9a769570d4b5714a3837b3a59a53b096bb954f1811f6a0afad305"}, + {file = "coverage-7.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:d779a48fac416387dd5673fc5b2d6bd903ed903faaa3247dc1865c65eaa5a93e"}, + {file = "coverage-7.4.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:adbdfcda2469d188d79771d5696dc54fab98a16d2ef7e0875013b5f56a251047"}, + {file = "coverage-7.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ac4bab32f396b03ebecfcf2971668da9275b3bb5f81b3b6ba96622f4ef3f6e17"}, + {file = "coverage-7.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:006d220ba2e1a45f1de083d5022d4955abb0aedd78904cd5a779b955b019ec73"}, + {file = "coverage-7.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3733545eb294e5ad274abe131d1e7e7de4ba17a144505c12feca48803fea5f64"}, + {file = "coverage-7.4.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42a9e754aa250fe61f0f99986399cec086d7e7a01dd82fd863a20af34cbce962"}, + {file = "coverage-7.4.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:2ed37e16cf35c8d6e0b430254574b8edd242a367a1b1531bd1adc99c6a5e00fe"}, + {file = "coverage-7.4.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:b953275d4edfab6cc0ed7139fa773dfb89e81fee1569a932f6020ce7c6da0e8f"}, + {file = "coverage-7.4.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:32b4ab7e6c924f945cbae5392832e93e4ceb81483fd6dc4aa8fb1a97b9d3e0e1"}, + {file = "coverage-7.4.2-cp312-cp312-win32.whl", hash = "sha256:f5df76c58977bc35a49515b2fbba84a1d952ff0ec784a4070334dfbec28a2def"}, + {file = "coverage-7.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:34423abbaad70fea9d0164add189eabaea679068ebdf693baa5c02d03e7db244"}, + {file = "coverage-7.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5b11f9c6587668e495cc7365f85c93bed34c3a81f9f08b0920b87a89acc13469"}, + {file = "coverage-7.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:51593a1f05c39332f623d64d910445fdec3d2ac2d96b37ce7f331882d5678ddf"}, + {file = "coverage-7.4.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69f1665165ba2fe7614e2f0c1aed71e14d83510bf67e2ee13df467d1c08bf1e8"}, + {file = "coverage-7.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3c8bbb95a699c80a167478478efe5e09ad31680931ec280bf2087905e3b95ec"}, + {file = "coverage-7.4.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:175f56572f25e1e1201d2b3e07b71ca4d201bf0b9cb8fad3f1dfae6a4188de86"}, + {file = "coverage-7.4.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8562ca91e8c40864942615b1d0b12289d3e745e6b2da901d133f52f2d510a1e3"}, + {file = "coverage-7.4.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:d9a1ef0f173e1a19738f154fb3644f90d0ada56fe6c9b422f992b04266c55d5a"}, + {file = "coverage-7.4.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:f40ac873045db4fd98a6f40387d242bde2708a3f8167bd967ccd43ad46394ba2"}, + {file = "coverage-7.4.2-cp38-cp38-win32.whl", hash = "sha256:d1b750a8409bec61caa7824bfd64a8074b6d2d420433f64c161a8335796c7c6b"}, + {file = "coverage-7.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:b4ae777bebaed89e3a7e80c4a03fac434a98a8abb5251b2a957d38fe3fd30088"}, + {file = "coverage-7.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3ff7f92ae5a456101ca8f48387fd3c56eb96353588e686286f50633a611afc95"}, + {file = "coverage-7.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:861d75402269ffda0b33af94694b8e0703563116b04c681b1832903fac8fd647"}, + {file = "coverage-7.4.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3507427d83fa961cbd73f11140f4a5ce84208d31756f7238d6257b2d3d868405"}, + {file = "coverage-7.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bf711d517e21fb5bc429f5c4308fbc430a8585ff2a43e88540264ae87871e36a"}, + {file = "coverage-7.4.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c00e54f0bd258ab25e7f731ca1d5144b0bf7bec0051abccd2bdcff65fa3262c9"}, + {file = "coverage-7.4.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f8e845d894e39fb53834da826078f6dc1a933b32b1478cf437007367efaf6f6a"}, + {file = "coverage-7.4.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:840456cb1067dc350af9080298c7c2cfdddcedc1cb1e0b30dceecdaf7be1a2d3"}, + {file = "coverage-7.4.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c11ca2df2206a4e3e4c4567f52594637392ed05d7c7fb73b4ea1c658ba560265"}, + {file = "coverage-7.4.2-cp39-cp39-win32.whl", hash = "sha256:3ff5bdb08d8938d336ce4088ca1a1e4b6c8cd3bef8bb3a4c0eb2f37406e49643"}, + {file = "coverage-7.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:ac9e95cefcf044c98d4e2c829cd0669918585755dd9a92e28a1a7012322d0a95"}, + {file = "coverage-7.4.2-pp38.pp39.pp310-none-any.whl", hash = "sha256:f593a4a90118d99014517c2679e04a4ef5aee2d81aa05c26c734d271065efcb6"}, + {file = "coverage-7.4.2.tar.gz", hash = "sha256:1a5ee18e3a8d766075ce9314ed1cb695414bae67df6a4b0805f5137d93d6f1cb"}, ] [package.extras] From 1f8d7c0b214b5e4885e98ee5c54ef50783e241eb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:24:56 -0600 Subject: [PATCH 07/10] fix(deps): update dependency httpx to ^0.27.0 (#3207) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0226f119f97a..bf670dee6e4c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -826,13 +826,13 @@ test = ["Cython (>=0.29.24,<0.30.0)"] [[package]] name = "httpx" -version = "0.26.0" +version = "0.27.0" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.26.0-py3-none-any.whl", hash = "sha256:8915f5a3627c4d47b73e8202457cb28f1266982d1159bd5779d86a80c0eab1cd"}, - {file = "httpx-0.26.0.tar.gz", hash = "sha256:451b55c30d5185ea6b23c2c793abf9bb237d2a7dfb901ced6ff69ad37ec1dfaf"}, + {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, + {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, ] [package.dependencies] @@ -3033,4 +3033,4 @@ pgsql = ["psycopg2-binary"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "b8a0c715906337427ee8f676d2dfbc49be273118818823a19766412766e66a5c" +content-hash = "42c9d2a3a43000b9da07ee1dc7a2c6da5e9699f0599d629de8c20aa05130ef67" diff --git a/pyproject.toml b/pyproject.toml index 0879ec737472..92073dc0d65a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ bcrypt = "^4.0.1" extruct = "^0.16.0" fastapi = "^0.109.0" gunicorn = "^21.0.0" -httpx = "^0.26.0" +httpx = "^0.27.0" lxml = "^5.0.0" orjson = "^3.8.0" psycopg2-binary = { version = "^2.9.1", optional = true } From 32812d6a6c785a9ae38aace535d1986f58c404d1 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:45:53 -0600 Subject: [PATCH 08/10] New Crowdin updates (#3206) * New translations en-us.json (Swedish) * New translations en-us.json (Swedish) --------- Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> --- frontend/lang/messages/sv-SE.json | 14 +++++++------- mealie/lang/messages/sv-SE.json | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/lang/messages/sv-SE.json b/frontend/lang/messages/sv-SE.json index 0e9334840c33..b35cd2e0ec77 100644 --- a/frontend/lang/messages/sv-SE.json +++ b/frontend/lang/messages/sv-SE.json @@ -259,7 +259,7 @@ }, "meal-plan": { "create-a-new-meal-plan": "Skapa en ny måltidsplan", - "update-this-meal-plan": "Update this Meal Plan", + "update-this-meal-plan": "Uppdatera denna måltidsplan", "dinner-this-week": "Veckans middagar", "dinner-today": "Middag idag", "dinner-tonight": "Middag ikväll", @@ -474,11 +474,11 @@ "add-to-timeline": "Lägg till i tidslinje", "recipe-added-to-list": "Recept tillagt i listan", "recipes-added-to-list": "Recept tillagt i listan", - "successfully-added-to-list": "Successfully added to list", + "successfully-added-to-list": "Framgångsrikt tillagd till listan", "recipe-added-to-mealplan": "Recept tillagt i måltidsplanen", "failed-to-add-recipes-to-list": "Det gick inte att lägga till recept till listan", "failed-to-add-recipe-to-mealplan": "Det gick inte att lägga till recept i måltidsplanen", - "failed-to-add-to-list": "Failed to add to list", + "failed-to-add-to-list": "Misslyckades att lägga till listan", "yield": "Ger", "quantity": "Antal", "choose-unit": "Välj enhet", @@ -1111,12 +1111,12 @@ "actions-description-irreversible": "oåterkallelig", "logs-action-refresh": "Uppdatera loggar", "logs-page-title": "Mealie loggar", - "logs-tail-lines-label": "Tail Lines" + "logs-tail-lines-label": "Slutrader" }, "mainentance": { "actions-title": "Åtgärder" }, - "ingredients-natural-language-processor": "Ingredients Natural Language Processor", + "ingredients-natural-language-processor": "Ingredienser Naturligt språkprocessor", "ingredients-natural-language-processor-explanation": "Mealie använder villkorliga slumpfält (CRF) för tolkning och bearbetning av ingredienser. Modellen som används för ingredienser är baserad på en uppsättning data på över 100.000 ingredienser från en dataset sammanställd av New York Times. Observera att eftersom modellen endast är utbildad på engelska kan du ha olika resultat när du använder modellen på andra språk. Denna sida är en lekplats för att testa modellen.", "ingredients-natural-language-processor-explanation-2": "Det är inte perfekt, men det ger bra resultat i allmänhet och är en bra utgångspunkt för att manuellt tolka ingredienser i enskilda områden. Alternativt kan du också använda \"Brute\" processor som använder en mönstermatchningsteknik för att identifiera ingredienser.", "nlp": "NLP", @@ -1187,7 +1187,7 @@ "require-all-tools": "Kräv alla verktyg", "cookbook-name": "Namn på kokbok", "cookbook-with-name": "Kokbok {0}", - "create-a-cookbook": "Create a Cookbook", - "cookbook": "Cookbook" + "create-a-cookbook": "Skapa en kokbok", + "cookbook": "Kokbok" } } diff --git a/mealie/lang/messages/sv-SE.json b/mealie/lang/messages/sv-SE.json index 2962dd45046a..3b16d880388a 100644 --- a/mealie/lang/messages/sv-SE.json +++ b/mealie/lang/messages/sv-SE.json @@ -38,7 +38,7 @@ "hour": "timme|timmar", "minute": "minut|minuter", "second": "sekund|sekunder", - "millisecond": "millisecond|milliseconds", - "microsecond": "microsecond|microseconds" + "millisecond": "millisekund millisekunder", + "microsecond": "mikrosekund mikrosekunder" } } From 98c86949792a5ee177ed5713961e1ed234fa453e Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:22:35 -0600 Subject: [PATCH 09/10] New translations en-us.json (Swedish) (#3208) --- frontend/lang/messages/sv-SE.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/lang/messages/sv-SE.json b/frontend/lang/messages/sv-SE.json index b35cd2e0ec77..a45387843198 100644 --- a/frontend/lang/messages/sv-SE.json +++ b/frontend/lang/messages/sv-SE.json @@ -19,7 +19,7 @@ "not-demo": "Inte Demo", "portfolio": "Portfölj", "production": "Produktion", - "support": "Hjälp", + "support": "Support", "version": "Version", "unknown-version": "okänd", "sponsor": "Sponsor" @@ -61,14 +61,14 @@ "notification": "Notifiering", "refresh": "Uppdatera", "scheduled": "Schemalagd", - "something-went-wrong": "Hmmm, något blev fel!", + "something-went-wrong": "Någonting gick fel", "subscribed-events": "Prenumererade händelser", "test-message-sent": "Testmeddelande Skickat", "new-notification": "Ny avisering", "event-notifiers": "Händelseavisering", - "apprise-url-skipped-if-blank": "Meddela URL (hoppa över om tom)", + "apprise-url-skipped-if-blank": "Apprise-URL (hoppa över om tom)", "enable-notifier": "Aktivera avisering", - "what-events": "Vilka händelser bör denna avisering prenumerera på?", + "what-events": "Vilka händelser ska denna avisering prenumerera på?", "user-events": "Användarhändelser", "mealplan-events": "Händelser för måltidsplan", "when-a-user-in-your-group-creates-a-new-mealplan": "När en användare i din grupp skapar en ny måltidsplan", From eeda71e1861b2b902f42ce417ef2bb04d03de78a Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:16:17 -0600 Subject: [PATCH 10/10] New Crowdin updates (#3210) * New translations en-us.json (Polish) * New translations en-us.json (Polish) --- frontend/lang/messages/pl-PL.json | 14 +++++++------- mealie/lang/messages/pl-PL.json | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/lang/messages/pl-PL.json b/frontend/lang/messages/pl-PL.json index 2bec4af57ec3..0f471f0d796c 100644 --- a/frontend/lang/messages/pl-PL.json +++ b/frontend/lang/messages/pl-PL.json @@ -199,8 +199,8 @@ "upload-file": "Prześlij plik", "created-on-date": "Utworzono dnia: {0}", "unsaved-changes": "Masz niezapisane zmiany. Czy chcesz zapisać przed wyjściem? Ok, aby zapisać, Anuluj, żeby odrzucić zmiany.", - "clipboard-copy-failure": "Failed to copy to the clipboard.", - "confirm-delete-generic-items": "Are you sure you want to delete the following items?" + "clipboard-copy-failure": "Nie udało się skopiować do schowka.", + "confirm-delete-generic-items": "Czy na pewno chcesz usunąć następujące elementy?" }, "group": { "are-you-sure-you-want-to-delete-the-group": "Czy na pewno chcesz usunąć {groupName}?", @@ -478,7 +478,7 @@ "recipe-added-to-mealplan": "Przepis dodany do planu posiłków", "failed-to-add-recipes-to-list": "Nie udało się dodać przepisu do listy", "failed-to-add-recipe-to-mealplan": "Nie udało się dodać przepisu do planu posiłków", - "failed-to-add-to-list": "Failed to add to list", + "failed-to-add-to-list": "Nie udało się dodać do listy", "yield": "Wydajność", "quantity": "Ilość", "choose-unit": "Wybierz jednostkę", @@ -537,8 +537,8 @@ "new-recipe-names-must-be-unique": "Nazwa przepisu musi być unikalna", "scrape-recipe": "Scrapuj Przepis", "scrape-recipe-description": "Wczytaj przepis przez URL. Podaj adres URL witryny z przepisem, który chcesz wczytać, a Mealie spróbuje wyodrębnić przepis z tej strony i dodać go do kolekcji.", - "scrape-recipe-have-a-lot-of-recipes": "Have a lot of recipes you want to scrape at once?", - "scrape-recipe-suggest-bulk-importer": "Try out the bulk importer", + "scrape-recipe-have-a-lot-of-recipes": "Masz mnóstwo przepisów, które chcesz zescrapować naraz?", + "scrape-recipe-suggest-bulk-importer": "Wypróbuj importer zbiorczy", "import-original-keywords-as-tags": "Importuj oryginalne słowa kluczowe jako tagi", "stay-in-edit-mode": "Pozostań w trybie edycji", "import-from-zip": "Importuj z pliku Zip", @@ -562,7 +562,7 @@ "upload-image": "Prześlij obraz", "screen-awake": "Pozostaw ekran włączony", "remove-image": "Usuń obraz", - "nextStep": "Next step" + "nextStep": "Następny krok" }, "search": { "advanced-search": "Wyszukiwanie zaawansowane", @@ -935,7 +935,7 @@ "merging-unit-into-unit": "Scalanie {0} do {1}", "create-unit": "Utwórz Jednostkę", "abbreviation": "Skrócona nazwa", - "plural-abbreviation": "Plural Abbreviation", + "plural-abbreviation": "Skrót liczby mnogiej", "description": "Opis", "display-as-fraction": "Wyświetlaj jako ułamek", "use-abbreviation": "Używaj skróconej nazwy", diff --git a/mealie/lang/messages/pl-PL.json b/mealie/lang/messages/pl-PL.json index 6bd2e8866eee..9cf36d557b59 100644 --- a/mealie/lang/messages/pl-PL.json +++ b/mealie/lang/messages/pl-PL.json @@ -33,12 +33,12 @@ "generic-deleted": "{name} został usunięty" }, "datetime": { - "year": "year|years", - "day": "day|days", - "hour": "hour|hours", - "minute": "minute|minutes", - "second": "second|seconds", - "millisecond": "millisecond|milliseconds", - "microsecond": "microsecond|microseconds" + "year": "rok|lat", + "day": "dzień|dni", + "hour": "godzina|godzin", + "minute": "minuta|minut", + "second": "sekunda|sekund", + "millisecond": "milisekunda|milisekund", + "microsecond": "mikrosekunda|mikrosekund" } }