From 6cce9ba6465870bc57cc7ae38d17946ef3bab692 Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Thu, 29 Jan 2026 04:00:47 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20support=20for=20external=20se?= =?UTF-8?q?lection=20state=20in=20ActionToolbar=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/gamemaster/ActionToolbar.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/code/websites/pokedex.online/src/components/gamemaster/ActionToolbar.vue b/code/websites/pokedex.online/src/components/gamemaster/ActionToolbar.vue index d8a4d78..ff59ba5 100644 --- a/code/websites/pokedex.online/src/components/gamemaster/ActionToolbar.vue +++ b/code/websites/pokedex.online/src/components/gamemaster/ActionToolbar.vue @@ -36,6 +36,10 @@ const props = defineProps({ selectedFile: { type: String, default: '' + }, + selectionState: { + type: Object, + default: null } }); @@ -43,6 +47,13 @@ const displayLines = toRef(props, 'displayLines'); const fileContent = toRef(props, 'fileContent'); const selectedFile = toRef(props, 'selectedFile'); +const internalSelectionState = useLineSelection( + displayLines, + fileContent, + selectedFile +); +const activeSelectionState = props.selectionState || internalSelectionState; + const { selectionCount, copySelected, @@ -50,7 +61,7 @@ const { exportSelected, exportAll, shareUrl -} = useLineSelection(displayLines, fileContent, selectedFile); +} = activeSelectionState;