diff --git a/cookbook/migrations/0142_alter_userpreference_search_style.py b/cookbook/migrations/0142_alter_userpreference_search_style.py new file mode 100644 index 000000000..706c040a2 --- /dev/null +++ b/cookbook/migrations/0142_alter_userpreference_search_style.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.5 on 2021-07-29 14:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cookbook', '0141_auto_20210713_1042'), + ] + + operations = [ + migrations.AlterField( + model_name='userpreference', + name='search_style', + field=models.CharField(choices=[('SMALL', 'Small'), ('LARGE', 'Large'), ('NEW', 'New')], default='NEW', max_length=64), + ), + ] diff --git a/cookbook/models.py b/cookbook/models.py index d81811281..091321a71 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -143,7 +143,7 @@ class UserPreference(models.Model, PermissionModelMixin): choices=PAGES, max_length=64, default=SEARCH ) search_style = models.CharField( - choices=SEARCH_STYLE, max_length=64, default=LARGE + choices=SEARCH_STYLE, max_length=64, default=NEW ) show_recent = models.BooleanField(default=True) plan_share = models.ManyToManyField( diff --git a/cookbook/templates/recipes_table.html b/cookbook/templates/recipes_table.html index 0a31e29a9..370f8c960 100644 --- a/cookbook/templates/recipes_table.html +++ b/cookbook/templates/recipes_table.html @@ -28,7 +28,7 @@
-
+
{{ row.cells.name }} diff --git a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue index 62bf82455..061bc179a 100644 --- a/vue/src/apps/RecipeSearchView/RecipeSearchView.vue +++ b/vue/src/apps/RecipeSearchView/RecipeSearchView.vue @@ -133,7 +133,7 @@ :initial_selection="settings.search_keywords" search_function="listKeywords" label="label" style="flex-grow: 1; flex-shrink: 1; flex-basis: 0" - v-bind:placeholder="$t('Keywords')"> + v-bind:placeholder="$t('Keywords')" :limit="50"> + v-bind:placeholder="$t('Ingredients')" :limit="20"> + v-bind:placeholder="$t('Books')" :limit="50"> { + apiClient[this.search_function]({query: {query: query, limit: this.limit}}).then(result => { this.objects = result.data }) },