mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Some random quick (#9111)
* Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning
This commit is contained in:
@@ -68,7 +68,7 @@
|
|||||||
button.btn.btn-secondary(v-once, @click='edit()') {{$t('editChallenge')}}
|
button.btn.btn-secondary(v-once, @click='edit()') {{$t('editChallenge')}}
|
||||||
div(v-if='isLeader')
|
div(v-if='isLeader')
|
||||||
button.btn.btn-danger(v-once, @click='closeChallenge()') {{$t('endChallenge')}}
|
button.btn.btn-danger(v-once, @click='closeChallenge()') {{$t('endChallenge')}}
|
||||||
div(v-if='isLeader')
|
div(v-if='isLeader || isAdmin')
|
||||||
button.btn.btn-secondary(v-once, @click='exportChallengeCsv()') {{$t('exportChallengeCsv')}}
|
button.btn.btn-secondary(v-once, @click='exportChallengeCsv()') {{$t('exportChallengeCsv')}}
|
||||||
div(v-if='isLeader')
|
div(v-if='isLeader')
|
||||||
button.btn.btn-secondary(v-once, @click='cloneChallenge()') {{$t('clone')}}
|
button.btn.btn-secondary(v-once, @click='cloneChallenge()') {{$t('clone')}}
|
||||||
@@ -246,6 +246,9 @@ export default {
|
|||||||
if (!this.challenge.leader) return false;
|
if (!this.challenge.leader) return false;
|
||||||
return this.user._id === this.challenge.leader._id;
|
return this.user._id === this.challenge.leader._id;
|
||||||
},
|
},
|
||||||
|
isAdmin () {
|
||||||
|
return Boolean(this.user.contributor.admin);
|
||||||
|
},
|
||||||
canJoin () {
|
canJoin () {
|
||||||
return !this.isMember;
|
return !this.isMember;
|
||||||
},
|
},
|
||||||
@@ -403,6 +406,7 @@ export default {
|
|||||||
cloneChallenge () {
|
cloneChallenge () {
|
||||||
this.cloning = true;
|
this.cloning = true;
|
||||||
this.$store.state.challengeOptions.tasksToClone = this.tasksByType;
|
this.$store.state.challengeOptions.tasksToClone = this.tasksByType;
|
||||||
|
this.$store.state.challengeOptions.workingChallenge = Object.assign({}, this.$store.state.challengeOptions.workingChallenge, this.challenge);
|
||||||
this.$root.$emit('show::modal', 'challenge-modal');
|
this.$root.$emit('show::modal', 'challenge-modal');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,11 +31,13 @@
|
|||||||
.row.new-message-row
|
.row.new-message-row
|
||||||
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', :chat='group.chat')
|
autocomplete(:text='newMessage', v-on:select="selectedAutocomplete", :coords='coords', :chat='group.chat')
|
||||||
button.btn.btn-secondary.send-chat.float-left(v-once, @click='sendMessage()') {{ $t('send') }}
|
|
||||||
.row
|
.row
|
||||||
.col-6
|
.col-6
|
||||||
button.btn.btn-secondary.float-left.fetch(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }}
|
button.btn.btn-secondary.float-left.fetch(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }}
|
||||||
button.btn.btn-secondary.float-left(v-once, @click='reverseChat()') {{ $t('reverseChat') }}
|
button.btn.btn-secondary.float-left(v-once, @click='reverseChat()') {{ $t('reverseChat') }}
|
||||||
|
.col-6
|
||||||
|
button.btn.btn-secondary.send-chat.float-right(v-once, @click='sendMessage()') {{ $t('send') }}
|
||||||
|
|
||||||
.row.community-guidelines(v-if='!communityGuidelinesAccepted')
|
.row.community-guidelines(v-if='!communityGuidelinesAccepted')
|
||||||
div.col-8(v-once, v-html="$t('communityGuidelinesIntro')")
|
div.col-8(v-once, v-html="$t('communityGuidelinesIntro')")
|
||||||
@@ -301,13 +303,6 @@
|
|||||||
.new-message-row {
|
.new-message-row {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.send-chat {
|
|
||||||
z-index: 10;
|
|
||||||
position: absolute;
|
|
||||||
right: 1em;
|
|
||||||
bottom: 1em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle-up .svg-icon, .toggle-down .svg-icon {
|
.toggle-up .svg-icon, .toggle-down .svg-icon {
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
.row
|
.row
|
||||||
.col-6
|
.col-6
|
||||||
button.btn.btn-secondary.send-chat.float-left(v-once, @click='sendMessage()') {{ $t('send') }}
|
button.btn.btn-secondary.float-left.fetch(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }}
|
||||||
|
button.btn.btn-secondary.float-left(v-once, @click='reverseChat()') {{ $t('reverseChat') }}
|
||||||
.col-6
|
.col-6
|
||||||
button.btn.btn-secondary.float-right.fetch(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }}
|
button.btn.btn-secondary.send-chat.float-right(v-once, @click='sendMessage()') {{ $t('send') }}
|
||||||
button.btn.btn-secondary.float-right(v-once, @click='reverseChat()') {{ $t('reverseChat') }}
|
|
||||||
|
|
||||||
.row.community-guidelines(v-if='!communityGuidelinesAccepted')
|
.row.community-guidelines(v-if='!communityGuidelinesAccepted')
|
||||||
div.col-8(v-once, v-html="$t('communityGuidelinesIntro')")
|
div.col-8(v-once, v-html="$t('communityGuidelinesIntro')")
|
||||||
|
|||||||
@@ -248,6 +248,22 @@
|
|||||||
div.popover-content {{ $t('clickOnPetToFeed', {foodName: currentDraggingFood.text() }) }}
|
div.popover-content {{ $t('clickOnPetToFeed', {foodName: currentDraggingFood.text() }) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
.group {
|
||||||
|
height: 130px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pet-row {
|
||||||
|
max-width: 100%;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
margin-right: .5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '~client/assets/scss/colors.scss';
|
@import '~client/assets/scss/colors.scss';
|
||||||
@import '~client/assets/scss/modal.scss';
|
@import '~client/assets/scss/modal.scss';
|
||||||
@@ -274,20 +290,6 @@
|
|||||||
top: -16px !important;
|
top: -16px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group {
|
|
||||||
height: 130px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pet-row {
|
|
||||||
max-width: 100%;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
margin-right: .5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.hatchablePopover {
|
.hatchablePopover {
|
||||||
width: 180px
|
width: 180px
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user