diff --git a/frontend/src/api/category.js b/frontend/src/api/category.js
index b08a14e59..8c2219e58 100644
--- a/frontend/src/api/category.js
+++ b/frontend/src/api/category.js
@@ -6,6 +6,7 @@ const prefix = baseURL + "categories";
const categoryURLs = {
getAll: `${prefix}`,
+ getEmpty: `${prefix}/empty`,
getCategory: category => `${prefix}/${category}`,
deleteCategory: category => `${prefix}/${category}`,
updateCategory: category => `${prefix}/${category}`,
@@ -16,6 +17,10 @@ export const categoryAPI = {
let response = await apiReq.get(categoryURLs.getAll);
return response.data;
},
+ async getEmpty() {
+ let response = await apiReq.get(categoryURLs.getEmpty);
+ return response.data;
+ },
async create(name) {
let response = await apiReq.post(categoryURLs.getAll, { name: name });
store.dispatch("requestCategories");
@@ -34,9 +39,11 @@ export const categoryAPI = {
}
return response.data;
},
- async delete(category) {
+ async delete(category, overrideRequest = false) {
let response = await apiReq.delete(categoryURLs.deleteCategory(category));
- store.dispatch("requestCategories");
+ if (!overrideRequest) {
+ store.dispatch("requestCategories");
+ }
return response.data;
},
};
@@ -45,6 +52,7 @@ const tagPrefix = baseURL + "tags";
const tagURLs = {
getAll: `${tagPrefix}`,
+ getEmpty: `${tagPrefix}/empty`,
getTag: tag => `${tagPrefix}/${tag}`,
deleteTag: tag => `${tagPrefix}/${tag}`,
updateTag: tag => `${tagPrefix}/${tag}`,
@@ -55,6 +63,10 @@ export const tagAPI = {
let response = await apiReq.get(tagURLs.getAll);
return response.data;
},
+ async getEmpty() {
+ let response = await apiReq.get(tagURLs.getEmpty);
+ return response.data;
+ },
async create(name) {
let response = await apiReq.post(tagURLs.getAll, { name: name });
store.dispatch("requestTags");
@@ -73,9 +85,11 @@ export const tagAPI = {
return response.data;
},
- async delete(tag) {
+ async delete(tag, overrideRequest = false) {
let response = await apiReq.delete(tagURLs.deleteTag(tag));
- store.dispatch("requestTags");
+ if (!overrideRequest) {
+ store.dispatch("requestTags");
+ }
return response.data;
},
};
diff --git a/frontend/src/components/UI/CardSection.vue b/frontend/src/components/UI/CardSection.vue
index d29a9178e..dd6efb0f3 100644
--- a/frontend/src/components/UI/CardSection.vue
+++ b/frontend/src/components/UI/CardSection.vue
@@ -60,10 +60,10 @@
@@ -79,14 +79,16 @@
-
+
+
+
@@ -109,6 +111,12 @@ export default {
hardLimit: {
default: 99999,
},
+ mobileCards: {
+ default: false,
+ },
+ singleColumn: {
+ defualt: false,
+ },
recipes: Array,
},
data() {
@@ -117,8 +125,14 @@ export default {
loading: false,
};
},
+ watch: {
+ recipes() {
+ this.bumpList();
+ },
+ },
computed: {
viewScale() {
+ if (this.mobileCards) return true;
switch (this.$vuetify.breakpoint.name) {
case "xs":
return true;
@@ -128,10 +142,16 @@ export default {
return false;
}
},
+ effectiveHardLimit() {
+ return Math.min(this.hardLimit, this.recipes.length);
+ },
},
methods: {
bumpList() {
- const newCardLimit = Math.min(this.cardLimit + 20, this.hardLimit);
+ const newCardLimit = Math.min(
+ this.cardLimit + 20,
+ this.effectiveHardLimit
+ );
if (this.loading === false && newCardLimit > this.cardLimit) {
this.setLoader();
@@ -141,7 +161,7 @@ export default {
},
async setLoader() {
this.loading = true;
- await new Promise(r => setTimeout(r, 3000));
+ await new Promise(r => setTimeout(r, 1000));
this.loading = false;
},
},
diff --git a/frontend/src/components/UI/Dialogs/BaseDialog.vue b/frontend/src/components/UI/Dialogs/BaseDialog.vue
index c0f9b04ec..eed570388 100644
--- a/frontend/src/components/UI/Dialogs/BaseDialog.vue
+++ b/frontend/src/components/UI/Dialogs/BaseDialog.vue
@@ -1,7 +1,11 @@
-
-
+
+
{{ titleIcon }}
@@ -19,13 +23,15 @@
-
- Cancel
-
-
-
- Submit
-
+
+
+ Cancel
+
+
+
+ Submit
+
+
@@ -48,20 +54,31 @@ export default {
modalWidth: {
default: "500",
},
+ loading: {
+ default: false,
+ },
+ top: {
+ default: false,
+ },
},
data() {
return {
dialog: false,
- loading: false,
};
},
methods: {
open() {
this.dialog = true;
},
+ close() {
+ this.dialog = false;
+ },
},
};
\ No newline at end of file
diff --git a/frontend/src/components/UI/Dialogs/NewCategoryTagDialog.vue b/frontend/src/components/UI/Dialogs/NewCategoryTagDialog.vue
index 8f91292e8..69c0c1588 100644
--- a/frontend/src/components/UI/Dialogs/NewCategoryTagDialog.vue
+++ b/frontend/src/components/UI/Dialogs/NewCategoryTagDialog.vue
@@ -1,8 +1,10 @@
-
- mdi-plus
-
+
+
+ mdi-plus
+
+
@@ -80,6 +82,9 @@ export default {
},
methods: {
+ open() {
+ this.dialog = true;
+ },
async select() {
const newItem = await (async () => {
if (this.tagDialog) {
diff --git a/frontend/src/components/UI/Search/FuseSearchBar.vue b/frontend/src/components/UI/Search/FuseSearchBar.vue
new file mode 100644
index 000000000..08152fbdf
--- /dev/null
+++ b/frontend/src/components/UI/Search/FuseSearchBar.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/BulkAssign.vue b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/BulkAssign.vue
new file mode 100644
index 000000000..209f66ee3
--- /dev/null
+++ b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/BulkAssign.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+ Cancel
+
+
+
+ Assign All
+
+
+
+
+
+
+
+
+
+ Bulk Assign
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/RemoveUnused.vue b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/RemoveUnused.vue
new file mode 100644
index 000000000..608f689d8
--- /dev/null
+++ b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/RemoveUnused.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+ No Unused Items
+
+
+
+ Cancel
+
+
+
+ Delete
+
+
+
+
+
+ Remove Unused
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/index.vue b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/index.vue
index aea670d6e..d32716a72 100644
--- a/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/index.vue
+++ b/frontend/src/pages/Admin/ToolBox/CategoryTagEditor/index.vue
@@ -33,12 +33,44 @@
/>
-
-
-
+
+
+
+
+ New
+
+
+
+
Title Case All
+
+
+
+
+
+
+
+
{{ item.name }}
- Rename
+
+ Edit
+
Delete
@@ -68,15 +100,23 @@