mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 02:02:19 +00:00
Allow changing name of party without adding description (#12095)
* fixed behavior of editing parties, guilds * removed unnecessary whitespace * added v-if, removed v-once(s), simplified group type logic
This commit is contained in:
parent
577e6f005e
commit
13123c0bae
1 changed files with 5 additions and 4 deletions
|
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<strong v-once>{{ $t('privacySettings') }} *</strong>
|
||||
<strong v-once>{{ $t('privacySettings') }}</strong>
|
||||
</label>
|
||||
<br>
|
||||
<div class="custom-control custom-checkbox">
|
||||
|
|
@ -115,7 +115,8 @@ label.custom-control-label(v-once) {{ $t('allowGuildInvitationsFromNonMembers')
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<strong v-once>{{ $t('groupDescription') }} *</strong>
|
||||
<strong v-if="isParty">{{ $t('groupDescription') }}</strong>
|
||||
<strong v-else>{{ $t('groupDescription') }} *</strong>
|
||||
</label>
|
||||
<a
|
||||
v-markdown="$t('markdownFormattingHelp')"
|
||||
|
|
@ -254,7 +255,7 @@ label.custom-control-label(v-once) {{ $t('allowGuildInvitationsFromNonMembers')
|
|||
<button
|
||||
v-if="workingGroup.id"
|
||||
class="btn btn-primary btn-md"
|
||||
:disabled="!workingGroup.name || !workingGroup.description"
|
||||
:disabled="!workingGroup.name || (!isParty && !workingGroup.description)"
|
||||
>
|
||||
{{ isParty ? $t('updateParty') : $t('updateGuild') }}
|
||||
</button>
|
||||
|
|
@ -540,7 +541,7 @@ export default {
|
|||
if (!this.workingGroup.name) errors.push(this.$t('nameRequired'));
|
||||
if (!this.workingGroup.summary) errors.push(this.$t('summaryRequired'));
|
||||
if (this.workingGroup.summary.length > MAX_SUMMARY_SIZE_FOR_GUILDS) errors.push(this.$t('summaryTooLong'));
|
||||
if (!this.workingGroup.description) errors.push(this.$t('descriptionRequired'));
|
||||
if (!this.isParty && !this.workingGroup.description) errors.push(this.$t('descriptionRequired'));
|
||||
if (!this.isParty && (!this.workingGroup.categories || this.workingGroup.categories.length === 0)) errors.push(this.$t('categoiresRequired'));
|
||||
|
||||
if (errors.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue