1
0

feat(natural language): make natural language prefixes configurable (#795)

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/795
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
This commit is contained in:
konrad
2021-09-29 18:30:55 +00:00
parent 3b58756285
commit d47b13647e
7 changed files with 192 additions and 89 deletions

View File

@ -0,0 +1,14 @@
import {PrefixMode} from '@/modules/parseTaskText'
const key = 'quickAddMagicMode'
export const setQuickAddMagicMode = (mode: PrefixMode) => {
localStorage.setItem(key, mode)
}
export const getQuickAddMagicMode = (): PrefixMode => {
const mode = localStorage.getItem(key)
// @ts-ignore
return PrefixMode[mode] || PrefixMode.Disabled
}