mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
* add new frontend files * Add UI for managing blockers * correctly reset local data after creating blocker * Tweak wording * Add UI for managing blockers * restructure admin pages * add blocker to block emails from registration * lint fixes * Await genericPurchase completion before page reload to prevent request cancellation. Also adds defensive check for undefined error.response in axios interceptor to prevent "t.response undefined" errors. * Fix shop tabs overflow off screen at certain zoom levels Fix quest cards get cut off on small screens Fix pop-up windows extend past screen edges on mobile * Update ToS error message - Updated account suspension message from "This account, User ID..." to "Your account @[username] has been blocked..." - Modified server auth middleware to pass username parameter when throwing account suspended error -Modified auth utils loginRes function to include username in suspended account error - Updated client bannedAccountModal component to pass username (empty string if unavailable) - Updated login test to expect username in account suspended message * lint fix * Responsive Layout for Equipment Containers - Added responsive CSS for mobile (<768px) and tablet (769px-1024px) - Implemented flex-wrap layout that automatically stacks items in rows of 4 on smaller * remove redundant disabled styles in task modals The .disabled class conflicting with existing disabled state implementations * Revert "Merge branch 'fiz/item-container-scaling' into qa/bat" This reverts commit4f28bfaad4, reversing changes made to477dd6328a. * fix(blockers): duplicated code from rebase * fix(admin): revert accidental change from rebase * move !error.response to correct level !error.response before any attempt to access error.response.status * chore(github): split responsiveness to #15514 --------- Co-authored-by: Phillip Thelen <phillip@habitica.com> Co-authored-by: Kalista Payne <kalista@habitica.com>
62 lines
1.4 KiB
Vue
62 lines
1.4 KiB
Vue
<template>
|
|
<b-modal
|
|
id="banned-account"
|
|
:title="$t('accountSuspendedTitle')"
|
|
size="md"
|
|
:hide-footer="true"
|
|
>
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<p v-markdown="bannedMessage"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<div class="col-12 text-center">
|
|
<button
|
|
class="btn btn-primary"
|
|
@click="close()"
|
|
>
|
|
{{ $t('close') }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</b-modal>
|
|
</template>
|
|
|
|
<style scoped>
|
|
</style>
|
|
|
|
<script>
|
|
import markdownDirective from '@/directives/markdown';
|
|
import { LOCALSTORAGE_AUTH_KEY } from '@/libs/auth';
|
|
|
|
const COMMUNITY_MANAGER_EMAIL = import.meta.env.EMAILS_COMMUNITY_MANAGER_EMAIL; // eslint-disable-line
|
|
|
|
export default {
|
|
directives: {
|
|
markdown: markdownDirective,
|
|
},
|
|
computed: {
|
|
bannedMessage () {
|
|
const AUTH_SETTINGS = localStorage.getItem(LOCALSTORAGE_AUTH_KEY);
|
|
const parseSettings = JSON.parse(AUTH_SETTINGS);
|
|
const userId = parseSettings ? parseSettings.auth.apiId : '';
|
|
const username = this.$store?.state?.user?.data?.auth?.local?.username || '';
|
|
|
|
return this.$t('accountSuspended', {
|
|
userId,
|
|
username,
|
|
communityManagerEmail: COMMUNITY_MANAGER_EMAIL,
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
close () {
|
|
this.$root.$emit('bv::hide::modal', 'banned-account');
|
|
},
|
|
},
|
|
};
|
|
</script>
|