aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Editor/Quest/Task/TaskConfiguration.vue
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2024-02-15 17:23:22 +0000
committerLeonardo Bishop <me@leonardobishop.com>2024-02-15 17:23:22 +0000
commit0f2240c87a5c0a22e2db97e4d2b82a52401be668 (patch)
treed223cd64fb588b6668d55cd9e2dff889d62f81bb /src/components/Editor/Quest/Task/TaskConfiguration.vue
parent1f555cf695079d6cc85581a480f375210b0c045c (diff)
Add modals
Diffstat (limited to 'src/components/Editor/Quest/Task/TaskConfiguration.vue')
-rw-r--r--src/components/Editor/Quest/Task/TaskConfiguration.vue18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/components/Editor/Quest/Task/TaskConfiguration.vue b/src/components/Editor/Quest/Task/TaskConfiguration.vue
index c31a87d..7006f18 100644
--- a/src/components/Editor/Quest/Task/TaskConfiguration.vue
+++ b/src/components/Editor/Quest/Task/TaskConfiguration.vue
@@ -1,8 +1,9 @@
<script setup lang="ts">
import { useSessionStore, type EditorQuest } from '@/stores/session';
-import { computed } from 'vue';
+import { computed, ref } from 'vue';
import Button from '@/components/Control/Button.vue';
import TaskConfigurationRow from '@/components/Editor/Quest/Task/TaskConfigurationRow.vue';
+import ChangeTaskModal from './Modal/ChangeTaskModal.vue';
const props = defineProps<{
taskId: string;
@@ -62,6 +63,8 @@ const deleteValue = (fieldName: string) => {
delete sessionStore.getQuestById(props.quest.id)!.tasks[props.taskId].config[fieldName];
};
+const showChangeModal = ref(false);
+
</script>
<template>
@@ -75,10 +78,11 @@ const deleteValue = (fieldName: string) => {
({{ taskType }})
</code>
</p>
- <div id="task-controls">
+ <div id="task-controls" class="control-group">
<Button
:icon="['fas', 'fa-pen']"
:label="'Change'"
+ @click="showChangeModal = true"
></Button>
<Button
:icon="['fas', 'fa-trash']"
@@ -122,6 +126,11 @@ const deleteValue = (fieldName: string) => {
</div>
</div>
</div>
+
+ <ChangeTaskModal
+ v-model="showChangeModal"
+ :taskId="props.taskId"
+ />
</template>
<style scoped>
@@ -163,11 +172,6 @@ const deleteValue = (fieldName: string) => {
color: var(--color-text-mute);
}
}
-
- #task-controls {
- display: flex;
- gap: 1rem;
- }
}
}