mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +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
|
// Append Bonus
|
||||||
if (money > 0 && Boolean(bonus)) {
|
if (money > 0 && Boolean(bonus)) {
|
||||||
if (bonus < 0.01) bonus = 0.01;
|
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;
|
delete this.user._tmp.streakBonus;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
)
|
)
|
||||||
b-modal#task-modal(
|
b-modal#task-modal(
|
||||||
size="sm",
|
size="sm",
|
||||||
@hidden="cancel()",
|
@hidden="onClose()",
|
||||||
)
|
)
|
||||||
.task-modal-header(
|
.task-modal-header(
|
||||||
slot="modal-header",
|
slot="modal-header",
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
label(v-once) {{ $t('checklist') }}
|
label(v-once) {{ $t('checklist') }}
|
||||||
br
|
br
|
||||||
.inline-edit-input-group.checklist-group.input-group(v-for="(item, $index) in task.checklist")
|
.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)")
|
span.input-group-btn(@click="removeChecklistItem($index)")
|
||||||
.svg-icon.destroy-icon(v-html="icons.destroy")
|
.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")
|
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');
|
this.$root.$emit('hide::modal', 'task-modal');
|
||||||
},
|
},
|
||||||
cancel () {
|
cancel () {
|
||||||
|
this.$root.$emit('hide::modal', 'task-modal');
|
||||||
|
},
|
||||||
|
onClose () {
|
||||||
this.showTagsSelect = false;
|
this.showTagsSelect = false;
|
||||||
|
this.newChecklistItem = '';
|
||||||
this.$emit('cancel');
|
this.$emit('cancel');
|
||||||
},
|
},
|
||||||
updateRequiresApproval (newValue) {
|
updateRequiresApproval (newValue) {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ b-modal#profile(title="Profile", size='lg', :hide-footer="true")
|
|||||||
.col-6
|
.col-6
|
||||||
h2 Quests Completed
|
h2 Quests Completed
|
||||||
div(v-for='(value, key) in user.achievements.quests')
|
div(v-for='(value, key) in user.achievements.quests')
|
||||||
span {{ content.quests[k].text() }}
|
span {{ content.quests[key].text() }}
|
||||||
span {{ value }}
|
span {{ value }}
|
||||||
.standard-page(v-show='selectedPage === "stats"')
|
.standard-page(v-show='selectedPage === "stats"')
|
||||||
.row
|
.row
|
||||||
|
|||||||
@@ -98,12 +98,12 @@ export async function create (store, createdTask) {
|
|||||||
|
|
||||||
sanitizeChecklist(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);
|
const response = await axios.post('/api/v3/tasks/user', createdTask);
|
||||||
|
|
||||||
let newTask = response.data.data;
|
Object.assign(list[0], response.data.data);
|
||||||
list.unshift(newTask);
|
|
||||||
store.state.user.data.tasksOrder[type].unshift(newTask._id);
|
|
||||||
Object.assign(list[0], newTask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function save (store, editedTask) {
|
export async function save (store, editedTask) {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ module.exports = function taskDefaults (task = {}) {
|
|||||||
challenge: {
|
challenge: {
|
||||||
shortName: 'None',
|
shortName: 'None',
|
||||||
},
|
},
|
||||||
|
group: {},
|
||||||
yesterDaily: true,
|
yesterDaily: true,
|
||||||
reminders: [],
|
reminders: [],
|
||||||
attribute: 'str',
|
attribute: 'str',
|
||||||
|
|||||||
Reference in New Issue
Block a user