forked from vikunja/frontend
Add setting for default list
This commit is contained in:
parent
3d375ddf56
commit
894cf6c3f8
|
@ -65,7 +65,8 @@
|
|||
"weekStart": "Week starts on",
|
||||
"weekStartSunday": "Sunday",
|
||||
"weekStartMonday": "Monday",
|
||||
"language": "Language"
|
||||
"language": "Language",
|
||||
"defaultList": "Default List"
|
||||
},
|
||||
"totp": {
|
||||
"title": "Two Factor Authentication",
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
v-model="settings.name"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
{{ $t('user.settings.general.defaultList') }}
|
||||
</label>
|
||||
<list-search @selected="changeList"/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" v-model="settings.emailRemindersEnabled"/>
|
||||
|
@ -275,7 +281,6 @@ import TotpModel from '../../models/totp'
|
|||
import TotpService from '../../services/totp'
|
||||
import UserSettingsService from '../../services/userSettings'
|
||||
import UserSettingsModel from '../../models/userSettings'
|
||||
import ListService from '../../services/list'
|
||||
import ListModel from '../../models/list'
|
||||
import {playSoundWhenDoneKey} from '@/helpers/playPop'
|
||||
import {availableLanguages, saveLanguage, getCurrentLanguage} from '@/i18n/setup'
|
||||
|
@ -284,6 +289,7 @@ import {mapState} from 'vuex'
|
|||
|
||||
import AvatarSettings from '../../components/user/avatar-settings'
|
||||
import copy from 'copy-to-clipboard'
|
||||
import ListSearch from '@/components/tasks/partials/listSearch'
|
||||
|
||||
export default {
|
||||
name: 'Settings',
|
||||
|
@ -309,11 +315,11 @@ export default {
|
|||
settings: UserSettingsModel,
|
||||
userSettingsService: UserSettingsService,
|
||||
|
||||
listService: ListService,
|
||||
defaultList: ListModel,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ListSearch,
|
||||
AvatarSettings,
|
||||
},
|
||||
created() {
|
||||
|
@ -331,8 +337,7 @@ export default {
|
|||
|
||||
this.playSoundWhenDone = localStorage.getItem(playSoundWhenDoneKey) === 'true' || localStorage.getItem(playSoundWhenDoneKey) === null
|
||||
|
||||
this.listService = new ListService()
|
||||
this.defaultList = new ListModel()
|
||||
this.defaultList = null
|
||||
|
||||
this.totpStatus()
|
||||
this.getListById()
|
||||
|
@ -452,10 +457,7 @@ export default {
|
|||
this.settings.defaultListId = list.id
|
||||
},
|
||||
getListById() {
|
||||
this.listService.get({id: this.settings.defaultListId})
|
||||
.then(response => {
|
||||
this.defaultList = response
|
||||
})
|
||||
this.defaultList = this.$store.getters['lists/getListById'](this.settings.defaultListId)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue