Merge branch 'develop' into release

This commit is contained in:
Sabe Jones
2020-04-02 15:09:54 -05:00
34 changed files with 618 additions and 250 deletions
+9 -8
View File
@@ -33,7 +33,7 @@
'resting': showRestingBanner
}"
>
<banned-account-modal />
<!-- <banned-account-modal /> -->
<amazon-payments-modal v-if="!isStaticPage" />
<payments-success-modal />
<sub-cancel-modal-confirm v-if="isUserLoaded" />
@@ -266,7 +266,6 @@ import {
} from '@/libs/userlocalManager';
import svgClose from '@/assets/svg/close.svg';
import bannedAccountModal from '@/components/bannedAccountModal';
const COMMUNITY_MANAGER_EMAIL = process.env.EMAILS_COMMUNITY_MANAGER_EMAIL; // eslint-disable-line
@@ -281,7 +280,6 @@ export default {
BuyModal,
SelectMembersModal,
amazonPaymentsModal,
bannedAccountModal,
paymentsSuccessModal,
subCancelModalConfirm,
subCanceledModal,
@@ -385,7 +383,8 @@ export default {
return response;
}, error => {
if (error.response.status >= 400) {
this.checkForBannedUser(error);
const isBanned = this.checkForBannedUser(error);
if (isBanned === true) return null; // eslint-disable-line consistent-return
// Don't show errors from getting user details. These users have delete their account,
// but their chat message still exists.
@@ -403,7 +402,8 @@ export default {
// TODO use a specific error like NotificationNotFound instead of checking for the string
const invalidUserMessage = [this.$t('invalidCredentials'), 'Missing authentication headers.'];
if (invalidUserMessage.indexOf(errorMessage) !== -1) {
this.$store.dispatch('auth:logout');
this.$store.dispatch('auth:logout', { redirectToLogin: true });
return null;
}
// Most server errors should return is click to dismiss errors, with some exceptions
@@ -553,7 +553,7 @@ export default {
// Case where user is not logged in
if (!parseSettings) {
return;
return false;
}
const bannedMessage = this.$t('accountSuspended', {
@@ -561,9 +561,10 @@ export default {
userId: parseSettings.auth.apiId,
});
if (errorMessage !== bannedMessage) return;
if (errorMessage !== bannedMessage) return false;
this.$root.$emit('bv::show::modal', 'banned-account');
this.$store.dispatch('auth:logout', { redirectToLogin: true });
return true;
},
initializeModalStack () {
// Manage modals
+1 -1
View File
@@ -186,7 +186,7 @@ export default {
return this.overrideTopPadding;
}
let val = '27px';
let val = '24px';
if (!this.avatarOnly) {
if (this.member.items.currentPet) val = '24px';
@@ -348,6 +348,7 @@
></div>
</div>
</div>
</div>
<div
v-if="achievementsCategories[key].number > 5"
class="btn btn-flat btn-show-more"
@@ -358,7 +359,6 @@
$t('showAllAchievements', {category: $t(key+'Achievs')})
}}
</div>
</div>
</div>
</div>
<hr class="col-12">
+3 -2
View File
@@ -82,7 +82,8 @@ export async function socialAuth (store, params) {
localStorage.setItem(LOCALSTORAGE_AUTH_KEY, userLocalData);
}
export function logout () {
export function logout (store, options = {}) {
localStorage.clear();
window.location.href = '/logout-server';
const query = options.redirectToLogin === true ? '?redirectToLogin=true' : '';
window.location.href = `/logout-server${query}`;
}