mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
add summary field to challenges and guilds (#8960)
* create new summary field for challenges * finish implementating summary for challenges, add some support for guilds * make small improvements to challenges code * fix lint errors * add more code to support summaries for guilds (still more needed) * fix existing tests by adding summary field * make existing tests pass * WIP make "Public Challenges" text translatable * change "leader" locale key to "guildOrPartyLeader" to make searches for it easier * remove v-once from h2 headings * remove failed attempt to localise text in <script> * add quick-and-dirty error checking for guild not having categories * make "Public Challenges" text translatable * rename final ...PlaceHolder strings to ...Placeholder (lower-case "h") for consistency with existing Placeholder strings
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
.col-12
|
||||
h3(v-once) {{ $t('chat') }}
|
||||
|
||||
textarea(:placeholder="!isParty ? $t('chatPlaceHolder') : $t('partyChatPlaceholder')", v-model='newMessage', @keydown='updateCarretPosition')
|
||||
textarea(:placeholder="!isParty ? $t('chatPlaceholder') : $t('partyChatPlaceholder')", v-model='newMessage', @keydown='updateCarretPosition')
|
||||
autocomplete(:text='newMessage', v-on:select="selectedAutocomplete", :coords='coords', :groupId='groupId')
|
||||
button.btn.btn-secondary.send-chat.float-right(v-once, @click='sendMessage()') {{ $t('send') }}
|
||||
button.btn.btn-secondary.float-left(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }}
|
||||
@@ -106,7 +106,19 @@
|
||||
.section-header
|
||||
.row
|
||||
.col-10
|
||||
h3(v-once) {{ $t('description') }}
|
||||
h3(v-once) {{ $t('guildSummary') }}
|
||||
.col-2
|
||||
.toggle-up(@click="sections.summary = !sections.summary", v-if="sections.summary")
|
||||
.svg-icon(v-html="icons.upIcon")
|
||||
.toggle-down(@click="sections.summary = !sections.summary", v-if="!sections.summary")
|
||||
.svg-icon(v-html="icons.downIcon")
|
||||
.section(v-if="sections.summary")
|
||||
p {{ group.summary }}
|
||||
|
||||
.section-header
|
||||
.row
|
||||
.col-10
|
||||
h3 {{ $t('groupDescription') }}
|
||||
.col-2
|
||||
.toggle-up(@click="sections.description = !sections.description", v-if="sections.description")
|
||||
.svg-icon(v-html="icons.upIcon")
|
||||
@@ -115,18 +127,6 @@
|
||||
.section(v-if="sections.description")
|
||||
p {{ group.description }}
|
||||
|
||||
.section-header
|
||||
.row
|
||||
.col-10
|
||||
h3 {{ $t('guildInformation') }}
|
||||
.col-2
|
||||
.toggle-up(@click="sections.information = !sections.information", v-if="sections.information")
|
||||
.svg-icon(v-html="icons.upIcon")
|
||||
.toggle-down(@click="sections.information = !sections.information", v-if="!sections.information")
|
||||
.svg-icon(v-html="icons.downIcon")
|
||||
.section(v-if="sections.information")
|
||||
p {{ group.information }}
|
||||
|
||||
.section-header.challenge
|
||||
.row
|
||||
.col-10.information-header
|
||||
@@ -442,8 +442,8 @@ export default {
|
||||
selectedQuest: {},
|
||||
sections: {
|
||||
quest: true,
|
||||
summary: true,
|
||||
description: true,
|
||||
information: true,
|
||||
challenges: true,
|
||||
},
|
||||
newMessage: '',
|
||||
|
||||
Reference in New Issue
Block a user