feat quick-add-magic script setup (#1926)
Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/1926 Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de> Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
This commit is contained in:
parent
6737bb37b4
commit
1bf378608e
1 changed files with 7 additions and 19 deletions
|
@ -85,26 +85,14 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script setup lang="ts">
|
||||
import {getQuickAddMagicMode} from '@/helpers/quickAddMagicMode'
|
||||
import {PREFIXES} from '@/modules/parseTaskText'
|
||||
import { defineComponent } from 'vue'
|
||||
import {ref, computed} from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'quick-add-magic',
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
mode: getQuickAddMagicMode(),
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
available() {
|
||||
return this.mode !== 'disabled'
|
||||
},
|
||||
prefixes() {
|
||||
return PREFIXES[this.mode]
|
||||
},
|
||||
},
|
||||
})
|
||||
const visible = ref(false)
|
||||
const mode = ref(getQuickAddMagicMode())
|
||||
|
||||
const available = computed(() => mode.value !== 'disabled')
|
||||
const prefixes = computed(() =>PREFIXES[mode.value])
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue