From aceef6edd8bd1663249e9d06fc1d4a063add4689 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Sun, 10 Mar 2024 17:17:01 +0000 Subject: Add more options to sidebar --- components/editor/Sidebar.vue | 81 ++++++++++++++++++++++++-- components/editor/SidebarMainConfiguration.vue | 57 ++++++++++++++++++ components/editor/task/ConfigurationRow.vue | 2 +- components/editor/task/modal/Create.vue | 2 + 4 files changed, 137 insertions(+), 5 deletions(-) create mode 100644 components/editor/SidebarMainConfiguration.vue (limited to 'components') diff --git a/components/editor/Sidebar.vue b/components/editor/Sidebar.vue index a46cdbe..20168df 100644 --- a/components/editor/Sidebar.vue +++ b/components/editor/Sidebar.vue @@ -5,14 +5,39 @@ import { storeToRefs } from 'pinia'; const sessionStore = useSessionStore(); const { session } = storeToRefs(sessionStore); + +const currentType = ref('quests' as 'quests' | 'items'); + +const setSelectedType = (type: 'quests' | 'items') => { + currentType.value = type; +} @@ -24,5 +49,53 @@ const { session } = storeToRefs(sessionStore); max-height: calc(100vh - 73px); background-color: var(--color-background); user-select: none; + position: relative; + + #selector { + display: flex; + height: 30px; + align-items: center; + cursor: pointer; + + .option { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + transition: background-color 0.3s; + + &.selected { + background-color: var(--color-background); + + span { + font-weight: 700; + } + } + + &:not(.selected) { + background-color: var(--color-background-mute); + color: var(--color-text-mute); + transition: color 0.3s; + + &:hover { + color: var(--color-text) + } + } + } + } + + #quests { + max-height: calc(100vh - 73px - 46px); + overflow-y: scroll; + } + + #configuration-container { + height: 46px; + border-top: 1px solid var(--color-border); + position: absolute; + bottom: 0; + width: 100% + } } \ No newline at end of file diff --git a/components/editor/SidebarMainConfiguration.vue b/components/editor/SidebarMainConfiguration.vue new file mode 100644 index 0000000..c4727c6 --- /dev/null +++ b/components/editor/SidebarMainConfiguration.vue @@ -0,0 +1,57 @@ + + + + + \ No newline at end of file diff --git a/components/editor/task/ConfigurationRow.vue b/components/editor/task/ConfigurationRow.vue index fa512b6..8194dcd 100644 --- a/components/editor/task/ConfigurationRow.vue +++ b/components/editor/task/ConfigurationRow.vue @@ -60,7 +60,7 @@ const addValue = (searchQuery: any) => {
- +

{{ props.configKey }}

diff --git a/components/editor/task/modal/Create.vue b/components/editor/task/modal/Create.vue index e3867b6..30e4cca 100644 --- a/components/editor/task/modal/Create.vue +++ b/components/editor/task/modal/Create.vue @@ -55,6 +55,8 @@ const newTypeDescription = computed(() => session.getTaskDefinitionByTaskType(ne + +
-- cgit v1.2.3-70-g09d2