From 4c50f296fc6cd6de7b72230e0ad64ff3e354c22e Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Thu, 29 Jan 2026 04:02:13 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Refactor=20components=20to=20use?= =?UTF-8?q?=20modular=20structure=20and=20computed=20properties=20for=20im?= =?UTF-8?q?proved=20maintainability=20and=20reusability=20in=20Gamemaster?= =?UTF-8?q?=20Explorer=20and=20FilterPanel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/gamemaster/FilterPanel.vue | 9 +- .../src/views/GamemasterExplorer.vue | 229 +++--------------- 2 files changed, 35 insertions(+), 203 deletions(-) diff --git a/code/websites/pokedex.online/src/components/gamemaster/FilterPanel.vue b/code/websites/pokedex.online/src/components/gamemaster/FilterPanel.vue index cad0885..1bcd00f 100644 --- a/code/websites/pokedex.online/src/components/gamemaster/FilterPanel.vue +++ b/code/websites/pokedex.online/src/components/gamemaster/FilterPanel.vue @@ -64,9 +64,16 @@ const props = defineProps({ data: { type: Array, default: () => [] + }, + filterState: { + type: Object, + default: null } }); +const internalFilterState = useJsonFilter(); +const activeFilterState = computed(() => props.filterState || internalFilterState); + const { filterProperty, filterValue, @@ -79,7 +86,7 @@ const { setFilter, clearFilters, getUniqueValues -} = useJsonFilter(); +} = activeFilterState.value; const hasData = computed( () => Array.isArray(props.data) && props.data.length > 0 diff --git a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue index 3086ced..875ac61 100644 --- a/code/websites/pokedex.online/src/views/GamemasterExplorer.vue +++ b/code/websites/pokedex.online/src/views/GamemasterExplorer.vue @@ -90,120 +90,17 @@ -
- - - {{ fileLines.length.toLocaleString() }} lines -
+ - - + -
- - - - -
+
@@ -220,100 +117,28 @@
-
- - - - - - -
-
- {{ - line.lineNumber - }} -
{{ line.content }}
-
-
- - -
- ⚠️ File exceeds 10,000 lines. Showing first 10,000 lines only. Use - search or filters to find specific content. -
-
+ :display-lines="displayLines" + :file-content="fileContent" + :selected-file="selectedFile" + :file-too-large="fileTooLarge" + :preferences="preferences" + :search-results="searchResults" + :current-result-index="currentResultIndex" + :highlight-config="highlightConfig" + :line-height="lineHeight" + :selection-state="selectionState" + /> -
- - - - - -
+