mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
Client Fixes (#8985)
* fix typos * tasks created immediately * fix page scroll when cancelling task edit * fix cheklist editing + misc fixes to tasks modal * remove console.log
This commit is contained in:
@@ -183,7 +183,7 @@ export default {
|
||||
// Append Bonus
|
||||
if (money > 0 && Boolean(bonus)) {
|
||||
if (bonus < 0.01) bonus = 0.01;
|
||||
this.text(`+ ${Notification.coins(bonus)} ${this.$t('streakCoins')}`);
|
||||
this.text(`+ ${this.coins(bonus)} ${this.$t('streakCoins')}`);
|
||||
delete this.user._tmp.streakBonus;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
)
|
||||
b-modal#task-modal(
|
||||
size="sm",
|
||||
@hidden="cancel()",
|
||||
@hidden="onClose()",
|
||||
)
|
||||
.task-modal-header(
|
||||
slot="modal-header",
|
||||
@@ -31,7 +31,7 @@
|
||||
label(v-once) {{ $t('checklist') }}
|
||||
br
|
||||
.inline-edit-input-group.checklist-group.input-group(v-for="(item, $index) in task.checklist")
|
||||
input.inline-edit-input.checklist-item.form-control(type="text", :value="item.text")
|
||||
input.inline-edit-input.checklist-item.form-control(type="text", v-model="item.text")
|
||||
span.input-group-btn(@click="removeChecklistItem($index)")
|
||||
.svg-icon.destroy-icon(v-html="icons.destroy")
|
||||
input.inline-edit-input.checklist-item.form-control(type="text", :placeholder="$t('newChecklistItem')", @keydown.enter="addChecklistItem($event)", v-model="newChecklistItem")
|
||||
@@ -551,7 +551,11 @@ export default {
|
||||
this.$root.$emit('hide::modal', 'task-modal');
|
||||
},
|
||||
cancel () {
|
||||
this.$root.$emit('hide::modal', 'task-modal');
|
||||
},
|
||||
onClose () {
|
||||
this.showTagsSelect = false;
|
||||
this.newChecklistItem = '';
|
||||
this.$emit('cancel');
|
||||
},
|
||||
updateRequiresApproval (newValue) {
|
||||
|
||||
@@ -91,7 +91,7 @@ b-modal#profile(title="Profile", size='lg', :hide-footer="true")
|
||||
.col-6
|
||||
h2 Quests Completed
|
||||
div(v-for='(value, key) in user.achievements.quests')
|
||||
span {{ content.quests[k].text() }}
|
||||
span {{ content.quests[key].text() }}
|
||||
span {{ value }}
|
||||
.standard-page(v-show='selectedPage === "stats"')
|
||||
.row
|
||||
|
||||
@@ -98,12 +98,12 @@ export async function create (store, createdTask) {
|
||||
|
||||
sanitizeChecklist(createdTask);
|
||||
|
||||
list.unshift(createdTask);
|
||||
store.state.user.data.tasksOrder[type].unshift(createdTask._id);
|
||||
|
||||
const response = await axios.post('/api/v3/tasks/user', createdTask);
|
||||
|
||||
let newTask = response.data.data;
|
||||
list.unshift(newTask);
|
||||
store.state.user.data.tasksOrder[type].unshift(newTask._id);
|
||||
Object.assign(list[0], newTask);
|
||||
Object.assign(list[0], response.data.data);
|
||||
}
|
||||
|
||||
export async function save (store, editedTask) {
|
||||
|
||||
@@ -25,6 +25,7 @@ module.exports = function taskDefaults (task = {}) {
|
||||
challenge: {
|
||||
shortName: 'None',
|
||||
},
|
||||
group: {},
|
||||
yesterDaily: true,
|
||||
reminders: [],
|
||||
attribute: 'str',
|
||||
|
||||
Reference in New Issue
Block a user