1
0

fix(labels): allow link shares to add existing labels to a task

Resolves https://github.com/go-vikunja/vikunja/issues/252
This commit is contained in:
kolaente
2024-04-21 15:12:27 +02:00
parent 1074a8d916
commit 574c7f218e
7 changed files with 45 additions and 40 deletions

View File

@ -34,6 +34,7 @@ import {useBaseStore} from '@/stores/base'
import Logo from '@/components/home/Logo.vue'
import PoweredByLink from './PoweredByLink.vue'
import {useProjectStore} from '@/stores/projects'
import {useLabelStore} from '@/stores/labels'
const baseStore = useBaseStore()
const currentProject = computed(() => baseStore.currentProject)
@ -42,6 +43,9 @@ const logoVisible = computed(() => baseStore.logoVisible)
const projectStore = useProjectStore()
projectStore.loadAllProjects()
const labelStore = useLabelStore()
labelStore.loadAllLabels()
</script>
<style lang="scss" scoped>

View File

@ -160,7 +160,6 @@ export const useLabelStore = defineStore('label', () => {
deleteLabel,
updateLabel,
createLabel,
}
})

View File

@ -309,6 +309,7 @@
v-model="task.labels"
:disabled="!canWrite"
:task-id="taskId"
:creatable="!authStore.isLinkShareAuth"
/>
</div>
@ -653,6 +654,7 @@ const projectStore = useProjectStore()
const attachmentStore = useAttachmentStore()
const taskStore = useTaskStore()
const kanbanStore = useKanbanStore()
const authStore = useAuthStore()
const task = ref<ITask>(new TaskModel())
const taskTitle = computed(() => task.value.title)
@ -877,7 +879,7 @@ function toggleTaskDone() {
done: !task.value.done,
}
if (newTask.done && useAuthStore().settings.frontendSettings.playSoundWhenDone) {
if (newTask.done && authStore.settings.frontendSettings.playSoundWhenDone) {
playPopSound()
}