Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add 'No Shopping Lists Found' message #4661

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/lang/messages/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,8 @@
"you-are-offline-description": "Not all features are available while offline. You can still add, modify, and remove items, but you will not be able to sync your changes to the server until you are back online.",
"are-you-sure-you-want-to-check-all-items": "Are you sure you want to check all items?",
"are-you-sure-you-want-to-uncheck-all-items": "Are you sure you want to uncheck all items?",
"are-you-sure-you-want-to-delete-checked-items": "Are you sure you want to delete all checked items?"
"are-you-sure-you-want-to-delete-checked-items": "Are you sure you want to delete all checked items?",
"no-shopping-list-found": "No Shopping Lists Found."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks better without the period, since it's standalone text. Also want to make sure the key matches the text

Suggested change
"no-shopping-list-found": "No Shopping Lists Found."
"no-shopping-lists-found": "No Shopping Lists Found"

},
"sidebar": {
"all-recipes": "All Recipes",
Expand Down
6 changes: 6 additions & 0 deletions frontend/pages/shopping-lists/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
<BaseButton create @click="createDialog = true" />
</v-container>

<v-container v-if="shoppingListChoices.length === 0">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nitpick, no need to change, but for the sake of learning FYI this also works:

<v-container v-if="!shoppingListChoices.length">

It's preference, but this way is more typical

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that's great feedback, I will change it. I'm new to Vue so every bit of "for the sake of learning" is helpful, thank you.

<BasePageTitle>
<template #title>{{ $t('shopping-list.no-shopping-list-found') }}</template>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<template #title>{{ $t('shopping-list.no-shopping-list-found') }}</template>
<template #title>{{ $t('shopping-list.no-shopping-lists-found') }}</template>

</BasePageTitle>
</v-container>

<section>
<v-card
v-for="list in shoppingListChoices"
Expand Down
Loading