feature/recipe-patch-improvements (#382)

* automated docs update

* recipe rating component

* recipe partial updates - closes #25

* use Vue.delete to update store

* format

* arrow functions

* fix tests

* format

* initial context menu

* localize

* add confirmation dialog

* context menu

* fix bare exception

* update line length

* format all file with prettier

* update changelog

* download as json

* update python dependencies

* update javascript dependencies

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-05-01 20:46:02 -08:00
committed by GitHub
parent c196445e61
commit be378cb20c
121 changed files with 18942 additions and 4765 deletions

View File

@@ -14,11 +14,7 @@
</v-app-bar>
<v-form ref="newGroup" @submit.prevent="submitForm">
<v-card-text>
<v-text-field
autofocus
v-model="page.name"
:label="$t('settings.page-name')"
></v-text-field>
<v-text-field autofocus v-model="page.name" :label="$t('settings.page-name')"></v-text-field>
<CategoryTagSelector
v-model="page.categories"
ref="categoryFormSelector"
@@ -88,7 +84,7 @@ export default {
} else {
response = await api.siteSettings.updatePage(this.page);
}
if (response) {
this.pageDialog = false;
this.page.categories = [];
@@ -99,5 +95,4 @@ export default {
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@@ -3,22 +3,15 @@
<CreatePageDialog ref="createDialog" @refresh-page="getPages" />
<v-card-text>
<h2 class="mt-1 mb-1 ">
{{$t('settings.custom-pages')}}
{{ $t("settings.custom-pages") }}
<span>
<v-btn color="success" @click="newPage" small class="ml-3">
{{$t('general.create')}}
{{ $t("general.create") }}
</v-btn>
</span>
</h2>
<draggable class="row mt-1" v-model="customPages">
<v-col
:sm="6"
:md="6"
:lg="4"
:xl="3"
v-for="(item, index) in customPages"
:key="item + item.id"
>
<v-col :sm="6" :md="6" :lg="4" :xl="3" v-for="(item, index) in customPages" :key="item + item.id">
<v-card>
<v-card-text class="mb-0 pb-0">
<h3>{{ item.name }}</h3>
@@ -41,11 +34,11 @@
<v-card-actions>
<v-btn text small color="error" @click="deletePage(item.id)">
{{$t('general.delete')}}
{{ $t("general.delete") }}
</v-btn>
<v-spacer> </v-spacer>
<v-btn small text color="success" @click="editPage(index)">
{{$t('general.edit')}}
{{ $t("general.edit") }}
</v-btn>
</v-card-actions>
</v-card>
@@ -55,7 +48,7 @@
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="success" @click="savePages">
{{$t('general.save')}}
{{ $t("general.save") }}
</v-btn>
</v-card-actions>
</v-card>
@@ -76,8 +69,8 @@ export default {
customPages: [],
newPageData: {
create: true,
title: this.$t('settings.new-page'),
buttonText: this.$t('general.create'),
title: this.$t("settings.new-page"),
buttonText: this.$t("general.create"),
data: {
name: "",
categories: [],
@@ -86,8 +79,8 @@ export default {
},
editPageData: {
create: false,
title: this.$t('settings.edit-page'),
buttonText: this.$t('general.update'),
title: this.$t("settings.edit-page"),
buttonText: this.$t("general.update"),
data: {},
},
};
@@ -112,7 +105,6 @@ export default {
if (await api.siteSettings.updateAllPages(this.customPages)) {
this.getPages();
}
},
editPage(index) {
this.editPageData.data = this.customPages[index];
@@ -126,5 +118,4 @@ export default {
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@@ -4,10 +4,7 @@
<h2 class="mt-1 mb-1">{{ $t("settings.homepage.home-page") }}</h2>
<v-row align="center" justify="center" dense class="mb-n7 pb-n5">
<v-col cols="12" sm="3" md="2">
<v-switch
v-model="settings.showRecent"
:label="$t('settings.homepage.show-recent')"
></v-switch>
<v-switch v-model="settings.showRecent" :label="$t('settings.homepage.show-recent')"></v-switch>
</v-col>
<v-col cols="12" sm="5" md="5">
<v-slider
@@ -49,10 +46,7 @@
minHeight: `150px`,
}"
>
<v-list-item
v-for="(item, index) in settings.categories"
:key="`${item.name}-${index}`"
>
<v-list-item v-for="(item, index) in settings.categories" :key="`${item.name}-${index}`">
<v-list-item-icon>
<v-icon>mdi-menu</v-icon>
</v-list-item-icon>
@@ -92,10 +86,7 @@
minHeight: `150px`,
}"
>
<v-list-item
v-for="(item, index) in allCategories"
:key="`${item.name}-${index}`"
>
<v-list-item v-for="(item, index) in allCategories" :key="`${item.name}-${index}`">
<v-list-item-icon>
<v-icon>mdi-menu</v-icon>
</v-list-item-icon>
@@ -103,9 +94,7 @@
<v-list-item-content>
<v-list-item-title v-text="item.name"></v-list-item-title>
</v-list-item-content>
<v-list-item-icon
@click="deleteCategoryfromDatabase(item.slug)"
>
<v-list-item-icon @click="deleteCategoryfromDatabase(item.slug)">
<v-icon>mdi-delete</v-icon>
</v-list-item-icon>
</v-list-item>
@@ -214,7 +203,7 @@ export default {
this.settings.language = val;
},
deleteCategoryfromDatabase(category) {
api.categories.delete(category);
api.categories.delete(category);
},
async getOptions() {
this.settings = await api.siteSettings.get();
@@ -225,11 +214,10 @@ export default {
async saveSettings() {
if (await api.siteSettings.update(this.settings)) {
this.getOptions();
}
}
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -31,5 +31,4 @@ export default {
};
</script>
<style>
</style>
<style></style>