浏览代码

feat(AdvancedTable): Station mode and theme dropdown filters

Owen Diffey 3 年之前
父节点
当前提交
f9ad73c5ae
共有 2 个文件被更改,包括 23 次插入3 次删除
  1. 3 1
      frontend/src/components/AdvancedTable.vue
  2. 20 2
      frontend/src/pages/Admin/tabs/Stations.vue

+ 3 - 1
frontend/src/components/AdvancedTable.vue

@@ -114,7 +114,9 @@
 								<div
 									v-if="
 										filter.filterType.name &&
-										filter.filterType.name === 'exact' &&
+										(filter.filterType.name === 'exact' ||
+											filter.filterType.name ===
+												'boolean') &&
 										filter.filter.dropdown
 									"
 									class="control is-expanded select"

+ 20 - 2
frontend/src/pages/Admin/tabs/Stations.vue

@@ -320,6 +320,17 @@ export default {
 					filterTypes: ["contains", "exact", "regex"],
 					defaultFilterType: "contains"
 				},
+				{
+					name: "stationMode",
+					displayName: "Station Mode",
+					property: "partyMode",
+					filterTypes: ["boolean"],
+					defaultFilterType: "boolean",
+					dropdown: [
+						[true, "Party"],
+						[false, "Playlist"]
+					]
+				},
 				{
 					name: "playMode",
 					displayName: "Play Mode",
@@ -335,8 +346,15 @@ export default {
 					name: "theme",
 					displayName: "Theme",
 					property: "theme",
-					filterTypes: ["contains", "exact", "regex"],
-					defaultFilterType: "contains"
+					filterTypes: ["exact", "regex"],
+					defaultFilterType: "exact",
+					dropdown: [
+						["blue", "Blue"],
+						["purple", "Purple"],
+						["teal", "Teal"],
+						["orange", "Orange"],
+						["red", "Red"]
+					]
 				}
 			],
 			events: {