mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-13 20:57:24 +01:00
* Read IP blocks from database * begin building general blocking solution * 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 * improve test coverage * Improve blocker UI * add blocker to block emails from registration * lint fix * fix * lint fixes * fix import * add new permission for managing blockers * improve permission check * fix managing permissions from admin * improve navbar display for non fullAccess admin * update block error strings * lint fix * add option to errorHandler to skip logging * validate blocker value during input * improve blocker form display * chore(subproj): reconcile habitica-images * fix(scripts): use same Mongo version for dev/test * fix(whitespace): eof * documentation improvements * remove nconf import * remove old test --------- Co-authored-by: Kalista Payne <kalista@habitica.com> Co-authored-by: Kalista Payne <sabrecat@gmail.com>
62 lines
1.4 KiB
Vue
62 lines
1.4 KiB
Vue
<template>
|
|
<base-notification
|
|
:can-remove="canRemove"
|
|
:has-icon="true"
|
|
:notification="notification"
|
|
:read-after-click="true"
|
|
@click="action"
|
|
>
|
|
<div
|
|
slot="content"
|
|
>
|
|
<strong> {{ notification.data.title }} </strong>
|
|
<span> {{ notification.data.text }} </span>
|
|
</div>
|
|
<Sprite
|
|
slot="icon"
|
|
class="mt-3"
|
|
:image-name="notification.data.icon"
|
|
/>
|
|
</base-notification>
|
|
</template>
|
|
|
|
<script>
|
|
import BaseNotification from './base';
|
|
import Sprite from '@/components/ui/sprite.vue';
|
|
|
|
export default {
|
|
components: {
|
|
BaseNotification,
|
|
Sprite,
|
|
},
|
|
props: {
|
|
notification: {
|
|
type: Object,
|
|
default (data) {
|
|
return data;
|
|
},
|
|
},
|
|
canRemove: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
},
|
|
methods: {
|
|
action () {
|
|
if (!this.notification || !this.notification.data
|
|
|| this.notification.data.destination === this.$route.path) {
|
|
return;
|
|
}
|
|
if (this.notification.data.destination.indexOf('backgrounds') !== -1) {
|
|
this.$store.state.avatarEditorOptions.editingUser = true;
|
|
this.$store.state.avatarEditorOptions.startingPage = 'backgrounds';
|
|
this.$store.state.avatarEditorOptions.subpage = '2024';
|
|
this.$root.$emit('bv::show::modal', 'avatar-modal');
|
|
} else {
|
|
this.$router.push(this.notification.data.destination || '/inventory/items');
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|