Merge branch 'develop' into group-tracking-modal

This commit is contained in:
CuriousMagpie
2022-08-29 13:33:15 -04:00
7 changed files with 42 additions and 29 deletions
@@ -757,8 +757,7 @@ export default {
}, 500),
sanitizeRedirect (redirect) {
if (!redirect) return '/';
let sanitizedString = DOMPurify.sanitize(redirect).replace(/\\|\/\/|\./g, '');
sanitizedString = `/${sanitizedString}`;
const sanitizedString = DOMPurify.sanitize(redirect).replace(/\\|\/\/|\./g, '');
return sanitizedString;
},
async register () {
@@ -112,10 +112,8 @@ export default {
},
},
watch: {
'group._id': {
async groupId () {
this.loadChallenges();
},
'group._id': function groupId () {
this.loadChallenges();
},
},
mounted () {
@@ -247,9 +247,6 @@
<li v-once>
{{ $t('sleepBullet3') }}
</li>
<li v-once>
{{ $t('sleepBullet4') }}
</li>
</ul>
<button
v-if="!user.preferences.sleep"
@@ -342,6 +339,7 @@
<li>
<a
href
:style="glossary-link"
v-html="$t('glossary')"
></a>
</li>
@@ -536,6 +534,21 @@
margin-left: .5em;
}
// formats the report a bug link to match the others
a:not([href]) {
&:not([role=button]) {
color: #007bff;
text-decoration: none;
}
}
a:not([href]):hover {
&:not([role=button]) {
color: #0056b3;
text-decoration: underline;
}
}
.tier1-icon, .tier2-icon {
width: 11px;
}
+14 -16
View File
@@ -68,7 +68,8 @@
</b-popover>
<div
class="spell-border"
:class="{ disabled: spellDisabled(key) || user.stats.lvl < skill.lvl }"
:class="{ disabled: spellDisabled(key) || user.stats.lvl < skill.lvl,
'insufficient-mana': user.stats.mp < skill.mana }"
>
<div
class="spell"
@@ -87,19 +88,6 @@
<div>Level {{ skill.lvl }}</div>
</div>
</div>
<div
v-else-if="spellDisabled(key) === true"
class="mana"
>
<div class="mana-text">
<div
v-once
class="svg-icon"
v-html="icons.mana"
></div>
<div>{{ skill.mana }}</div>
</div>
</div>
<div
v-else
class="mana"
@@ -200,7 +188,7 @@
border-radius: 4px;
margin-bottom: 1rem;
&:hover:not(.disabled) {
&:hover:not(.disabled):not(.insufficient-mana) {
background-color: $purple-400;
cursor: pointer;
box-shadow: 0 4px 4px 0 rgba(26, 24, 29, 0.16),
@@ -216,6 +204,10 @@
background-color: rgba(26, 24, 29, 0.5);
}
.mana-text {
color: $blue-500;
}
.level {
color: $white;
font-weight: normal;
@@ -223,6 +215,10 @@
}
}
&.insufficient-mana:not(.disabled) {
opacity: 0.5;
}
.spell {
background: $white;
border-radius: 4px;
@@ -481,7 +477,9 @@ export default {
skillNotes (skill) {
let notes = skill.notes();
if (skill.key === 'frost' && this.spellDisabled(skill.key)) {
if (this.user.stats.lvl < skill.lvl) {
notes = this.$t('spellLevelTooHigh', { level: skill.lvl });
} else if (skill.key === 'frost' && this.spellDisabled(skill.key)) {
notes = this.$t('spellAlreadyCast');
} else if (skill.key === 'stealth' && this.spellDisabled(skill.key)) {
notes = this.$t('spellAlreadyCast');