mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Toggle-switch changed to the local one; 'en' locale edited
This commit is contained in:
@@ -18,16 +18,12 @@
|
|||||||
// b-form-input
|
// b-form-input
|
||||||
.row
|
.row
|
||||||
.col-12
|
.col-12
|
||||||
.toggle#toggle(:class="!this.user.inbox.optOut && 'toggle--active'" @click="toggleOpt()")
|
toggle-switch.float-right.align-with-tab(
|
||||||
.bar
|
:label="optTextSet.switchDescription",
|
||||||
.circle
|
:checked="!this.user.inbox.optOut"
|
||||||
b-popover(
|
:hoverText="optTextSet.popoverText",
|
||||||
target="toggle",
|
@change="toggleOpt()"
|
||||||
triggers="hover",
|
|
||||||
placement="right",
|
|
||||||
)
|
)
|
||||||
h4.popover-content-title {{PMAction}} {{$t('disabledPMPopoverTitle')}}
|
|
||||||
.popover-content-text {{$t('disabledPMPopoverText')}}
|
|
||||||
.row(v-if="!this.user.inbox.optOut")
|
.row(v-if="!this.user.inbox.optOut")
|
||||||
.col-4.sidebar
|
.col-4.sidebar
|
||||||
.search-section
|
.search-section
|
||||||
@@ -174,68 +170,6 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
|
|
||||||
width: 36px;
|
|
||||||
margin-right: 0;
|
|
||||||
padding: 4px 0 6px 2px;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
|
|
||||||
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.bar {
|
|
||||||
width: 100%;
|
|
||||||
height: 14px;
|
|
||||||
|
|
||||||
transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
|
|
||||||
|
|
||||||
border-radius: 30px;
|
|
||||||
background-color: rgb(189, 189, 189);
|
|
||||||
}
|
|
||||||
|
|
||||||
.circle {
|
|
||||||
line-height: 24px;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
top: 1px;
|
|
||||||
left: 0;
|
|
||||||
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
|
|
||||||
transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
|
|
||||||
|
|
||||||
color: rgba(0, 0, 0, 0.87);
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: rgb(245, 245, 245);
|
|
||||||
box-shadow: rgba(0, 0, 0, 0.12) 0 1px 6px, rgba(0, 0, 0, 0.12) 0 1px 4px;
|
|
||||||
|
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
&--active {
|
|
||||||
.bar {
|
|
||||||
opacity: 0.5;
|
|
||||||
background-color: $purple-200;
|
|
||||||
}
|
|
||||||
|
|
||||||
.circle {
|
|
||||||
left: 100%;
|
|
||||||
|
|
||||||
margin-left: -20px;
|
|
||||||
|
|
||||||
background-color: $purple-200;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.caption-disabled {
|
.caption-disabled {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -263,6 +197,7 @@ import sortBy from 'lodash/sortBy';
|
|||||||
import groupBy from 'lodash/groupBy';
|
import groupBy from 'lodash/groupBy';
|
||||||
import { mapState } from 'client/libs/store';
|
import { mapState } from 'client/libs/store';
|
||||||
import styleHelper from 'client/mixins/styleHelper';
|
import styleHelper from 'client/mixins/styleHelper';
|
||||||
|
import toggleSwitch from 'client/components/ui/toggleSwitch';
|
||||||
|
|
||||||
import messageIcon from 'assets/svg/message.svg';
|
import messageIcon from 'assets/svg/message.svg';
|
||||||
import chatMessage from '../chat/chatMessages';
|
import chatMessage from '../chat/chatMessages';
|
||||||
@@ -272,6 +207,7 @@ export default {
|
|||||||
mixins: [styleHelper],
|
mixins: [styleHelper],
|
||||||
components: {
|
components: {
|
||||||
chatMessage,
|
chatMessage,
|
||||||
|
toggleSwitch,
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.$root.$on('habitica::new-inbox-message', (data) => {
|
this.$root.$on('habitica::new-inbox-message', (data) => {
|
||||||
@@ -376,10 +312,17 @@ export default {
|
|||||||
return conversation.name.toLowerCase().indexOf(this.search.toLowerCase()) !== -1;
|
return conversation.name.toLowerCase().indexOf(this.search.toLowerCase()) !== -1;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
PMAction() {
|
optTextSet() {
|
||||||
return this.user.inbox.optOut ?
|
if (!this.user.inbox.optOut) {
|
||||||
this.$t('PMEnable') :
|
return {
|
||||||
this.$t('PMDisable');
|
switchDescription: this.$t('PMDisableFull'),
|
||||||
|
popoverText: this.$t('PMEnabledOptPopoverText'),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
switchDescription: this.$t('PMEnableFull'),
|
||||||
|
popoverText: this.$t('PMDisabledOptPopoverText'),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -290,12 +290,15 @@
|
|||||||
"emptyMessagesLine1": "You don't have any messages",
|
"emptyMessagesLine1": "You don't have any messages",
|
||||||
"emptyMessagesLine2": "Send a message to start a conversation!",
|
"emptyMessagesLine2": "Send a message to start a conversation!",
|
||||||
"PMEnable": "Enable",
|
"PMEnable": "Enable",
|
||||||
|
"PMEnableFull": "Enable private messages",
|
||||||
"PMDisable": "Disable",
|
"PMDisable": "Disable",
|
||||||
"disabledPMPopoverTitle": " private messages",
|
"PMDisableFull": "Disable private messages",
|
||||||
"disabledPMPopoverText": "You can enable or disable private messaging at any time.",
|
"PMDisableConfirmation": "Are you sure you want to disable private messages? No one will able to send you messages, though you can enable private messages at any time.",
|
||||||
|
"PMEnabledOptPopoverText": "When private messages are disabled, no one can send them to you, though you can enable this option at any time.",
|
||||||
|
"PMDisabledOptPopoverText": "Enable private messages so you can chat again!",
|
||||||
"disabledPMCaptionTitle": "Private messages are disabled",
|
"disabledPMCaptionTitle": "Private messages are disabled",
|
||||||
"disabledPMCaptionLine1": "Private messages are disabled and no one can send them to you.",
|
"disabledPMCaptionLine1": "Private messages are disabled and no one can send them to you.",
|
||||||
"disabledPMCaptionLine2": "You can enable or disable private messaging at any time.",
|
"disabledPMCaptionLine2": "You can enable or disable private messages at any time.",
|
||||||
"userSentMessage": "<span class=\"notification-bold\"><%= user %></span> sent you a message",
|
"userSentMessage": "<span class=\"notification-bold\"><%= user %></span> sent you a message",
|
||||||
"letsgo": "Let's Go!",
|
"letsgo": "Let's Go!",
|
||||||
"selected": "Selected",
|
"selected": "Selected",
|
||||||
|
|||||||
Reference in New Issue
Block a user