Skip to content

Commit

Permalink
Merge branch 'mealie-next' into postgres-fuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
jecorn authored May 10, 2023
2 parents 96d8e76 + 5d87b7e commit 3196943
Show file tree
Hide file tree
Showing 56 changed files with 1,651 additions and 937 deletions.
2 changes: 1 addition & 1 deletion frontend/components/Domain/Recipe/RecipeCardSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default defineComponent({
const queryFilter = computed(() => {
const orderBy = props.query?.orderBy || preferences.value.orderBy;
return preferences.value.filterNull && orderBy ? `${orderBy} <> null` : null;
return preferences.value.filterNull && orderBy ? `${orderBy} IS NOT NULL` : null;
});
async function fetchRecipes(pageCount = 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div v-if="user.id" class="pb-2 d-flex justify-center flex-wrap">
<RecipeLastMade
v-model="recipe.lastMade"
:recipe-slug="recipe.slug"
:recipe="recipe"
class="d-flex justify-center flex-wrap"
:class="true ? undefined : 'force-bottom'"
/>
Expand Down
44 changes: 24 additions & 20 deletions frontend/components/Domain/Recipe/RecipeTimeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</template>

<script lang="ts">
import { defineComponent, ref, useAsync, useContext } from "@nuxtjs/composition-api";
import { defineComponent, onMounted, ref, useAsync, useContext } from "@nuxtjs/composition-api";
import { useThrottleFn, whenever } from "@vueuse/core";
import RecipeTimelineItem from "./RecipeTimelineItem.vue"
import { useTimelinePreferences } from "~/composables/use-users/preferences";
Expand Down Expand Up @@ -104,25 +104,6 @@ export default defineComponent({
}
};
document.onscroll = () => {
// if the inner element is scrollable, let its scroll event handle the infiniteScroll
const timelineContainerElement = document.getElementById("timeline-container");
if (timelineContainerElement) {
const { clientHeight, scrollHeight } = timelineContainerElement
// if scrollHeight == clientHeight, the element is not scrollable, so we need to look at the global position
// if scrollHeight > clientHeight, it is scrollable and we don't need to do anything here
if (scrollHeight > clientHeight) {
return;
}
}
const bottomOfWindow = document.documentElement.scrollTop + window.innerHeight >= document.documentElement.offsetHeight - (window.innerHeight*screenBuffer);
if (bottomOfWindow) {
infiniteScroll();
}
};
whenever(
() => props.value,
() => {
Expand Down Expand Up @@ -251,6 +232,29 @@ export default defineComponent({
// preload events
initializeTimelineEvents();
onMounted(
() => {
document.onscroll = () => {
// if the inner element is scrollable, let its scroll event handle the infiniteScroll
const timelineContainerElement = document.getElementById("timeline-container");
if (timelineContainerElement) {
const { clientHeight, scrollHeight } = timelineContainerElement
// if scrollHeight == clientHeight, the element is not scrollable, so we need to look at the global position
// if scrollHeight > clientHeight, it is scrollable and we don't need to do anything here
if (scrollHeight > clientHeight) {
return;
}
}
const bottomOfWindow = document.documentElement.scrollTop + window.innerHeight >= document.documentElement.offsetHeight - (window.innerHeight*screenBuffer);
if (bottomOfWindow) {
infiniteScroll();
}
};
}
)
return {
deleteTimelineEvent,
loading,
Expand Down
2 changes: 2 additions & 0 deletions frontend/lang/messages/af-ZA.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"json": "JSON",
"keyword": "Keyword",
"link-copied": "Link Copied",
"loading-events": "Loading Events",
"loading-recipes": "Loading Recipes",
"message": "Message",
"monday": "Monday",
Expand Down Expand Up @@ -477,6 +478,7 @@
"edit-timeline-event": "Edit Timeline Event",
"timeline": "Timeline",
"timeline-is-empty": "Nothing on the timeline yet. Try making this recipe!",
"group-global-timeline": "{groupName} Global Timeline",
"open-timeline": "Open Timeline",
"made-this": "I Made This",
"how-did-it-turn-out": "How did it turn out?",
Expand Down
2 changes: 2 additions & 0 deletions frontend/lang/messages/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"json": "JSON",
"keyword": "Keyword",
"link-copied": "Link Copied",
"loading-events": "Loading Events",
"loading-recipes": "Loading Recipes",
"message": "Message",
"monday": "Monday",
Expand Down Expand Up @@ -477,6 +478,7 @@
"edit-timeline-event": "Edit Timeline Event",
"timeline": "Timeline",
"timeline-is-empty": "Nothing on the timeline yet. Try making this recipe!",
"group-global-timeline": "{groupName} Global Timeline",
"open-timeline": "Open Timeline",
"made-this": "I Made This",
"how-did-it-turn-out": "How did it turn out?",
Expand Down
2 changes: 2 additions & 0 deletions frontend/lang/messages/bg-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"json": "JSON",
"keyword": "Keyword",
"link-copied": "Link Copied",
"loading-events": "Loading Events",
"loading-recipes": "Loading Recipes",
"message": "Message",
"monday": "Monday",
Expand Down Expand Up @@ -477,6 +478,7 @@
"edit-timeline-event": "Edit Timeline Event",
"timeline": "Timeline",
"timeline-is-empty": "Nothing on the timeline yet. Try making this recipe!",
"group-global-timeline": "{groupName} Global Timeline",
"open-timeline": "Open Timeline",
"made-this": "I Made This",
"how-did-it-turn-out": "How did it turn out?",
Expand Down
2 changes: 2 additions & 0 deletions frontend/lang/messages/ca-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"json": "JSON",
"keyword": "Paraula clau",
"link-copied": "S'ha copiat l'enllaç",
"loading-events": "Loading Events",
"loading-recipes": "Carregant les receptes",
"message": "Missatge",
"monday": "Dilluns",
Expand Down Expand Up @@ -477,6 +478,7 @@
"edit-timeline-event": "Edita l'esdeveniment de la cronologia",
"timeline": "Cronologia",
"timeline-is-empty": "Nothing on the timeline yet. Try making this recipe!",
"group-global-timeline": "{groupName} Global Timeline",
"open-timeline": "Open Timeline",
"made-this": "I Made This",
"how-did-it-turn-out": "How did it turn out?",
Expand Down
Loading

0 comments on commit 3196943

Please sign in to comment.