diff options
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/editor/category/[id].vue | 6 | ||||
| -rw-r--r-- | pages/editor/config.vue | 6 | ||||
| -rw-r--r-- | pages/editor/index.vue | 6 | ||||
| -rw-r--r-- | pages/editor/item/[id].vue | 9 | ||||
| -rw-r--r-- | pages/editor/quest/[id].vue | 45 | ||||
| -rw-r--r-- | pages/import.vue | 19 | ||||
| -rw-r--r-- | pages/index.vue | 39 |
7 files changed, 81 insertions, 49 deletions
diff --git a/pages/editor/category/[id].vue b/pages/editor/category/[id].vue index cf79f61..5558c53 100644 --- a/pages/editor/category/[id].vue +++ b/pages/editor/category/[id].vue @@ -2,8 +2,8 @@ import { useSessionStore } from '@/stores/session'; definePageMeta({ - layout: 'editor' -}) + layout: 'editor', +}); const sessionStore = useSessionStore(); const route = useRoute(); @@ -44,4 +44,4 @@ const categoryName = sessionStore.getCategoryById(categoryId)?.display.name; header { border-bottom: 1px solid var(--color-border); } -</style>
\ No newline at end of file +</style> diff --git a/pages/editor/config.vue b/pages/editor/config.vue index 4dfc679..515cac9 100644 --- a/pages/editor/config.vue +++ b/pages/editor/config.vue @@ -1,7 +1,7 @@ <script setup lang="ts"> definePageMeta({ - layout: 'editor' -}) + layout: 'editor', +}); </script> <template> @@ -14,4 +14,4 @@ definePageMeta({ #title { text-align: center; } -</style>
\ No newline at end of file +</style> diff --git a/pages/editor/index.vue b/pages/editor/index.vue index 4e9815a..55c75f3 100644 --- a/pages/editor/index.vue +++ b/pages/editor/index.vue @@ -1,7 +1,7 @@ <script setup lang="ts"> definePageMeta({ - layout: 'editor' -}) + layout: 'editor', +}); </script> <template> @@ -22,4 +22,4 @@ definePageMeta({ font-size: 1.5rem; } } -</style>
\ No newline at end of file +</style> diff --git a/pages/editor/item/[id].vue b/pages/editor/item/[id].vue index 451a76d..d6656ab 100644 --- a/pages/editor/item/[id].vue +++ b/pages/editor/item/[id].vue @@ -2,8 +2,8 @@ import { useSessionStore } from '@/stores/session'; definePageMeta({ - layout: 'editor' -}) + layout: 'editor', +}); const sessionStore = useSessionStore(); const route = useRoute(); @@ -24,8 +24,7 @@ const item = sessionStore.getItemById(itemId); </span> </PageHeader> - <div id="options-container"> - </div> + <div id="options-container"></div> </template> <style scoped> @@ -41,4 +40,4 @@ const item = sessionStore.getItemById(itemId); header { border-bottom: 1px solid var(--color-border); } -</style>
\ No newline at end of file +</style> diff --git a/pages/editor/quest/[id].vue b/pages/editor/quest/[id].vue index 34dafa8..8886dc5 100644 --- a/pages/editor/quest/[id].vue +++ b/pages/editor/quest/[id].vue @@ -4,8 +4,8 @@ import { computed, ref } from 'vue'; import type EditorQuestModalYaml from '~/components/editor/quest/modal/EditorQuestModalYaml.vue'; definePageMeta({ - layout: 'editor' -}) + layout: 'editor', +}); const sessionStore = useSessionStore(); const route = useRoute(); @@ -13,7 +13,6 @@ const route = useRoute(); const questId = route.params.id as string; const quest = sessionStore.getQuestById(questId); - const categoryFromSelectedQuest = computed(() => { const quest = sessionStore.getQuestById(questId); if (quest) { @@ -48,7 +47,7 @@ const duplicateQuest = (oldId: string, newId: string) => { const showYaml = () => { yamlModal.value?.open(); -} +}; </script> <template> @@ -65,9 +64,17 @@ const showYaml = () => { </span> <span id="controls" class="control-group"> <Button :icon="['fas', 'fa-code']" :label="'YAML'" @click="showYaml"></Button> - <Button :icon="['fas', 'fa-copy']" :label="'Duplicate'" @click="showDuplicateModal = true"></Button> + <Button + :icon="['fas', 'fa-copy']" + :label="'Duplicate'" + @click="showDuplicateModal = true" + ></Button> <Button :icon="['fas', 'fa-pen']" :label="'Rename'" @click="showRenameModal = true"></Button> - <Button :icon="['fas', 'fa-trash']" :label="'Delete'" @click="showDeleteModal = true"></Button> + <Button + :icon="['fas', 'fa-trash']" + :label="'Delete'" + @click="showDeleteModal = true" + ></Button> <Button type="solid" :disabled="true" :icon="['fas', 'fa-save']" :label="'Save'"></Button> </span> </PageHeader> @@ -78,12 +85,24 @@ const showYaml = () => { </div> <EditorQuestModalYaml ref="yamlModal" :key="`yaml-quest-${questId}`" :questId="questId" /> - <EditorQuestModalDelete v-model="showDeleteModal" :key="`delete-quest-${questId}`" :questId="questId" - @delete="() => questId && deleteQuest(questId)" /> - <EditorQuestModalRename v-model="showRenameModal" :key="`rename-quest-${questId}`" :questId="questId" - @update="(newId: any) => questId && renameQuest(questId, newId)" /> - <EditorQuestModalDuplicate v-model="showDuplicateModal" :key="`duplicate-quest-${questId}`" :questId="questId" - @duplicate="(newId: any) => questId && duplicateQuest(questId, newId)" /> + <EditorQuestModalDelete + v-model="showDeleteModal" + :key="`delete-quest-${questId}`" + :questId="questId" + @delete="() => questId && deleteQuest(questId)" + /> + <EditorQuestModalRename + v-model="showRenameModal" + :key="`rename-quest-${questId}`" + :questId="questId" + @update="(newId: any) => questId && renameQuest(questId, newId)" + /> + <EditorQuestModalDuplicate + v-model="showDuplicateModal" + :key="`duplicate-quest-${questId}`" + :questId="questId" + @duplicate="(newId: any) => questId && duplicateQuest(questId, newId)" + /> </template> <style scoped> @@ -99,4 +118,4 @@ const showYaml = () => { header { border-bottom: 1px solid var(--color-border); } -</style>
\ No newline at end of file +</style> diff --git a/pages/import.vue b/pages/import.vue index 7397358..3cadb3d 100644 --- a/pages/import.vue +++ b/pages/import.vue @@ -2,8 +2,8 @@ import LoaderDiscardSessionModal from '~/components/loader/LoaderDiscardSessionModal.vue'; definePageMeta({ - layout: 'default' -}) + layout: 'default', +}); const session = useSessionStore(); @@ -64,8 +64,17 @@ const discardSessionModal = ref<InstanceType<typeof LoaderDiscardSessionModal> | </div> <div id="button-group"> - <Button :icon="['fas', 'arrow-left']" label="Return to Session" @click="navigateToEditorPane(null)" /> - <Button accent="danger" :icon="['fas', 'trash']" label="Discard" @click="discardSessionModal?.open" /> + <Button + :icon="['fas', 'arrow-left']" + label="Return to Session" + @click="navigateToEditorPane(null)" + /> + <Button + accent="danger" + :icon="['fas', 'trash']" + label="Discard" + @click="discardSessionModal?.open" + /> </div> </div> </div> @@ -144,4 +153,4 @@ const discardSessionModal = ref<InstanceType<typeof LoaderDiscardSessionModal> | hr { width: 100%; } -</style>
\ No newline at end of file +</style> diff --git a/pages/index.vue b/pages/index.vue index a64706a..d4a9b6d 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,7 +1,7 @@ <script setup lang="ts"> definePageMeta({ - layout: 'default' -}) + layout: 'default', +}); </script> <template> @@ -9,30 +9,35 @@ definePageMeta({ <div id="welcome"> <img id="welcome-image" src="@/assets/quests-logo.png" alt="Quests logo" /> <b id="title">Welcome to the Quests Web Editor</b> - <p>This is a work in progress build of the web editor for <a href="https://github.com/LMBishop/Quests">Quests</a>. - It is <b>not</b> ready for use. + <p> + This is a work in progress build of the web editor for + <a href="https://github.com/LMBishop/Quests">Quests</a>. It is <b>not</b> ready for use. </p> - <p>If you would like to try this out, use the buttons in the top right corner to start a session.</p> - <b id="subtitle">Cannot import from filesystem</b> <p> - If you cannot import from filesystem, then that means you are using a browser which does not implement the - <a href="https://wicg.github.io/file-system-access/">File System Access API</a>. At the time of writing, - only Chromium based browsers (Google Chrome, Microsoft Edge, Brave, etc.) implement this. This means if you - use Firefox or Safari, you must switch browser to use this feature. + If you would like to try this out, use the buttons in the top right corner to start a + session. </p> + <b id="subtitle">Cannot import from filesystem</b> <p> - You can instead load the test data instead by clicking the "Demo" button. + If you cannot import from filesystem, then that means you are using a browser which does not + implement the + <a href="https://wicg.github.io/file-system-access/">File System Access API</a>. At the time + of writing, only Chromium based browsers (Google Chrome, Microsoft Edge, Brave, etc.) + implement this. This means if you use Firefox or Safari, you must switch browser to use this + feature. </p> + <p>You can instead load the test data instead by clicking the "Demo" button.</p> <b id="subtitle">Light / dark theme</b> <p> - Note that the light theme of this website is a work in progress. Please use the dark theme. The colour scheme - will automatically adjust based on your browsers preferences. + Note that the light theme of this website is a work in progress. Please use the dark theme. + The colour scheme will automatically adjust based on your browsers preferences. </p> <b id="subtitle">Source code</b> <p> - Just like Quests itself, the source code is <a href="https://github.com/LMBishop/quests-web-editor">available - on GitHub</a>. - Due to the volatile state of this project, if you would like to get involved please get in touch with me first. + Just like Quests itself, the source code is + <a href="https://github.com/LMBishop/quests-web-editor">available on GitHub</a>. Due to the + volatile state of this project, if you would like to get involved please get in touch with + me first. </p> </div> </div> @@ -74,4 +79,4 @@ definePageMeta({ font-weight: bold; } } -</style>
\ No newline at end of file +</style> |
