mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Client fixes aug 31 (#9010)
* Separated private message model * Added markdown to profile * Add color backgrounds * Added broken challenge flow * Added summary field to getgroups * Fixed group form information loading * Updated autocomplete to use chat * Fixed npc styles * Fixed onload mentions
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
select.form-control(v-model="workingGroup.newLeader")
|
||||
option(v-for='member in members', :value="member._id") {{ member.profile.name }}
|
||||
|
||||
.form-group
|
||||
.form-group(v-if='!this.workingGroup.id')
|
||||
label
|
||||
strong(v-once) {{$t('privacySettings')}} *
|
||||
br
|
||||
@@ -45,7 +45,7 @@
|
||||
span.custom-control-description(v-once) {{ $t('allowGuildInvitationsFromNonMembers') }}
|
||||
// "allowGuildInvitationsFromNonMembers": "Allow Guild invitations from non-members",
|
||||
|
||||
.form-group(v-if='!creatingParty')
|
||||
.form-group(v-if='!isParty')
|
||||
label
|
||||
strong(v-once) {{$t('guildSummary')}} *
|
||||
div.summary-count {{charactersRemaining}} {{ $t('charactersRemaining') }}
|
||||
@@ -56,7 +56,7 @@
|
||||
label
|
||||
strong(v-once) {{$t('groupDescription')}} *
|
||||
a.float-right {{ $t('markdownFormattingHelp') }}
|
||||
b-form-input.description-textarea(type="text", textarea, :placeholder="isParty ? $t('partyDescriptionPlaceholder') : $t('guildDescriptionPlaceholder')", v-model="workingGroup.description")
|
||||
textarea.form-control.description-textarea(type="text", textarea, :placeholder="isParty ? $t('partyDescriptionPlaceholder') : $t('guildDescriptionPlaceholder')", v-model="workingGroup.description")
|
||||
|
||||
.form-group(v-if='creatingParty && !workingGroup.id')
|
||||
span
|
||||
@@ -285,10 +285,31 @@ export default {
|
||||
|
||||
return data;
|
||||
},
|
||||
mounted () {
|
||||
// @TODO: do we need this? Maybe us computed. If we need, then make it on show a specific modal
|
||||
this.$root.$on('shown::modal', () => {
|
||||
let editingGroup = this.$store.state.editingGroup;
|
||||
computed: {
|
||||
editingGroup () {
|
||||
return this.$store.state.editingGroup;
|
||||
},
|
||||
charactersRemaining () {
|
||||
let currentLength = this.workingGroup.summary ? this.workingGroup.summary.length : 0;
|
||||
return MAX_SUMMARY_SIZE_FOR_GUILDS - currentLength;
|
||||
},
|
||||
title () {
|
||||
if (this.creatingParty) return this.$t('createParty');
|
||||
if (!this.workingGroup._id && !this.workingGroup.id) return this.$t('createGuild');
|
||||
if (this.isParty) return this.$t('updateParty');
|
||||
return this.$t('updateGuild');
|
||||
},
|
||||
creatingParty () {
|
||||
return this.$store.state.groupFormOptions.createParty;
|
||||
},
|
||||
isParty () {
|
||||
return this.workingGroup.type === 'party';
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
editingGroup () {
|
||||
let editingGroup = this.editingGroup;
|
||||
|
||||
if (!editingGroup._id) {
|
||||
this.resetWorkingGroup();
|
||||
return;
|
||||
@@ -313,24 +334,6 @@ export default {
|
||||
if (editingGroup._id) this.workingGroup.id = editingGroup._id;
|
||||
if (editingGroup.leader._id) this.workingGroup.newLeader = editingGroup.leader._id;
|
||||
if (editingGroup._id) this.getMembers();
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
charactersRemaining () {
|
||||
let currentLength = this.workingGroup.summary ? this.workingGroup.summary.length : 0;
|
||||
return MAX_SUMMARY_SIZE_FOR_GUILDS - currentLength;
|
||||
},
|
||||
title () {
|
||||
if (this.creatingParty) return this.$t('createParty');
|
||||
if (!this.workingGroup.id) return this.$t('createGuild');
|
||||
if (this.isParty) return this.$t('updateParty');
|
||||
return this.$t('updateGuild');
|
||||
},
|
||||
creatingParty () {
|
||||
return this.$store.state.groupFormOptions.createParty;
|
||||
},
|
||||
isParty () {
|
||||
return this.workingGroup.type === 'party';
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -444,15 +447,18 @@ export default {
|
||||
},
|
||||
resetWorkingGroup () {
|
||||
this.workingGroup = {
|
||||
id: '',
|
||||
name: '',
|
||||
type: 'guild',
|
||||
privacy: 'private',
|
||||
summary: '',
|
||||
description: '',
|
||||
categories: [],
|
||||
onlyLeaderCreatesChallenges: true,
|
||||
guildLeaderCantBeMessaged: true,
|
||||
privateGuild: true,
|
||||
allowGuildInvitationsFromNonMembers: true,
|
||||
newLeader: '',
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user