mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-19 20:28:53 +00:00
Allow default tasks to not have notes
This commit is contained in:
parent
097e1ff70b
commit
ed43bec8cd
2 changed files with 8 additions and 6 deletions
|
|
@ -1877,9 +1877,9 @@ _.each api.subscriptionBlocks, (b,k)->b.key = k
|
|||
repeat = {m:true,t:true,w:true,th:true,f:true,s:true,su:true}
|
||||
api.userDefaults =
|
||||
habits: [
|
||||
{type: 'habit', text: t('defaultHabit1Text'), notes: t('defaultTaskNotes'), value: 0, up: true, down: false, attribute: 'per' }
|
||||
{type: 'habit', text: t('defaultHabit2Text'), notes: t('defaultTaskNotes'), value: 0, up: false, down: true, attribute: 'str'}
|
||||
{type: 'habit', text: t('defaultHabit3Text'), notes: t('defaultTaskNotes'), value: 0, up: true, down: true, attribute: 'str'}
|
||||
{type: 'habit', text: t('defaultHabit1Text'), value: 0, up: true, down: false, attribute: 'per' }
|
||||
{type: 'habit', text: t('defaultHabit2Text'), value: 0, up: false, down: true, attribute: 'str'}
|
||||
{type: 'habit', text: t('defaultHabit3Text'), value: 0, up: true, down: true, attribute: 'str'}
|
||||
]
|
||||
|
||||
dailys: [
|
||||
|
|
@ -1898,7 +1898,7 @@ api.userDefaults =
|
|||
]
|
||||
|
||||
rewards: [
|
||||
{type: 'reward', text: t('defaultReward1Text'), notes: t('defaultTaskNotes'), value: 10 }
|
||||
{type: 'reward', text: t('defaultReward1Text'), value: 10 }
|
||||
# {type: 'reward', text: t('defaultReward2Text'), notes: t('defaultReward2Notes'), value: 10 }
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ var UserSchema = new Schema({
|
|||
rewards: {type:[TaskSchemas.RewardSchema]},
|
||||
|
||||
extra: Schema.Types.Mixed,
|
||||
|
||||
|
||||
pushDevices: {type: [{
|
||||
regId: {type: String},
|
||||
type: {type: String}
|
||||
|
|
@ -459,7 +459,9 @@ UserSchema.pre('save', function(next) {
|
|||
newTask.name = newTask.name(self.preferences.language);
|
||||
}else{
|
||||
newTask.text = newTask.text(self.preferences.language);
|
||||
newTask.notes = newTask.notes(self.preferences.language);
|
||||
if(newTask.notes) {
|
||||
newTask.notes = newTask.notes(self.preferences.language);
|
||||
}
|
||||
|
||||
if(newTask.checklist){
|
||||
newTask.checklist = _.map(newTask.checklist, function(checklistItem){
|
||||
|
|
|
|||
Loading…
Reference in a new issue