From 6b4b2a8f87b969fd8749ac0a66c7705ba74f1e44 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sun, 28 Jan 2024 08:42:42 +0100 Subject: [PATCH] removed use_plural space attribute and left over settings --- cookbook/forms.py | 2 +- .../migrations/0209_remove_space_use_plural.py | 17 +++++++++++++++++ cookbook/models.py | 1 - vue/src/components/CookbookSlider.vue | 8 ++------ vue/src/components/GenericHorizontalCard.vue | 4 +--- vue/src/components/IngredientsCard.vue | 2 -- vue/src/components/Modals/ShoppingModal.vue | 1 - vue/src/components/RecipeCard.vue | 1 - vue/src/components/StepComponent.vue | 5 ----- 9 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 cookbook/migrations/0209_remove_space_use_plural.py diff --git a/cookbook/forms.py b/cookbook/forms.py index dd62aa0b..4226af9c 100644 --- a/cookbook/forms.py +++ b/cookbook/forms.py @@ -450,7 +450,7 @@ class SpacePreferenceForm(forms.ModelForm): class Meta: model = Space - fields = ('food_inherit', 'reset_food_inherit', 'use_plural') + fields = ('food_inherit', 'reset_food_inherit',) help_texts = { 'food_inherit': _('Fields on food that should be inherited by default.'), diff --git a/cookbook/migrations/0209_remove_space_use_plural.py b/cookbook/migrations/0209_remove_space_use_plural.py new file mode 100644 index 00000000..37a4b6fc --- /dev/null +++ b/cookbook/migrations/0209_remove_space_use_plural.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.7 on 2024-01-28 07:42 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('cookbook', '0208_space_app_name_userpreference_max_owned_spaces'), + ] + + operations = [ + migrations.RemoveField( + model_name='space', + name='use_plural', + ), + ] diff --git a/cookbook/models.py b/cookbook/models.py index 8cb239ae..9954133d 100644 --- a/cookbook/models.py +++ b/cookbook/models.py @@ -303,7 +303,6 @@ class Space(ExportModelOperationsMixin('space'), models.Model): max_recipes = models.IntegerField(default=0) max_file_storage_mb = models.IntegerField(default=0, help_text=_('Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload.')) max_users = models.IntegerField(default=0) - use_plural = models.BooleanField(default=True) allow_sharing = models.BooleanField(default=True) no_sharing_limit = models.BooleanField(default=False) demo = models.BooleanField(default=False) diff --git a/vue/src/components/CookbookSlider.vue b/vue/src/components/CookbookSlider.vue index f2ccbb9a..71be6846 100644 --- a/vue/src/components/CookbookSlider.vue +++ b/vue/src/components/CookbookSlider.vue @@ -20,7 +20,7 @@ - +
@@ -57,10 +57,7 @@ export default { } }, mounted(){ - let apiClient = new ApiApiFactory() - apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => { - this.use_plural = r.data.use_plural - }) + }, data() { return { @@ -69,7 +66,6 @@ export default { bounce_left: false, bounce_right: false, cookbook_editing: false, - use_plural: false, } }, methods: { diff --git a/vue/src/components/GenericHorizontalCard.vue b/vue/src/components/GenericHorizontalCard.vue index ed43a1a2..f65b2edc 100644 --- a/vue/src/components/GenericHorizontalCard.vue +++ b/vue/src/components/GenericHorizontalCard.vue @@ -76,8 +76,7 @@
@@ -160,7 +159,6 @@ export default { recipe_count: { type: String, default: "numrecipe" }, recipes: { type: String, default: "recipes" }, show_context_menu: { type: Boolean, default: true }, - use_plural: { type: Boolean, default: false}, }, data() { return { diff --git a/vue/src/components/IngredientsCard.vue b/vue/src/components/IngredientsCard.vue index 6ab4c9ed..0b2cb69f 100644 --- a/vue/src/components/IngredientsCard.vue +++ b/vue/src/components/IngredientsCard.vue @@ -24,7 +24,6 @@ @@ -147,10 +146,6 @@ export default { type: Boolean, default: false, }, - use_plural: { - type: Boolean, - default: false, - }, }, computed: { step_time: function() {