Fixed alert dialog button in notifications, fixed add tile padding on profile page.

This commit is contained in:
DebaucheryLibrarian 2021-05-15 22:01:57 +02:00
parent 478a2c4b48
commit 0f8d5d4456
4 changed files with 19 additions and 11 deletions

View File

@ -32,6 +32,10 @@
</template> </template>
<script> <script>
function mounted() {
this.events.emit('blur');
}
export default { export default {
props: { props: {
title: { title: {
@ -40,6 +44,7 @@ export default {
}, },
}, },
emits: ['close'], emits: ['close'],
mounted,
}; };
</script> </script>

View File

@ -100,6 +100,7 @@
:notifications="notifications" :notifications="notifications"
:unseen-count="unseenNotificationsCount" :unseen-count="unseenNotificationsCount"
@check="fetchNotifications" @check="fetchNotifications"
@add-alert="showAddAlert = true"
/> />
</template> </template>
</Tooltip> </Tooltip>
@ -144,12 +145,19 @@
<Search class="search-full" /> <Search class="search-full" />
</div> </div>
<AddAlert
v-if="showAddAlert"
@close="showAddAlert = false"
>Alert</AddAlert>
</header> </header>
</template> </template>
<script> <script>
import Menu from './menu.vue'; import Menu from './menu.vue';
import Notifications from './notifications.vue'; import Notifications from './notifications.vue';
import AddAlert from '../alerts/add.vue';
import Search from './search.vue'; import Search from './search.vue';
import logo from '../../img/logo.svg'; import logo from '../../img/logo.svg';
@ -167,6 +175,7 @@ async function fetchNotifications() {
export default { export default {
components: { components: {
AddAlert,
Menu, Menu,
Notifications, Notifications,
Search, Search,
@ -177,6 +186,7 @@ export default {
logo, logo,
searching: false, searching: false,
showFilters: false, showFilters: false,
showAddAlert: false,
notifications: [], notifications: [],
unseenNotificationsCount: 0, unseenNotificationsCount: 0,
}; };

View File

@ -14,16 +14,11 @@
<Icon <Icon
v-tooltip="'Add alert'" v-tooltip="'Add alert'"
icon="plus3" icon="plus3"
@click="showAddAlert = true" @click="$emit('addAlert')"
/> />
</div> </div>
</div> </div>
<AddAlert
v-if="showAddAlert"
@close="showAddAlert = false"
>Alert</AddAlert>
<div class="notifications-body"> <div class="notifications-body">
<div <div
v-if="notifications.length === 0" v-if="notifications.length === 0"
@ -123,8 +118,6 @@
</template> </template>
<script> <script>
import AddAlert from '../alerts/add.vue';
async function checkNotifications() { async function checkNotifications() {
await this.$store.dispatch('checkNotifications'); await this.$store.dispatch('checkNotifications');
@ -142,9 +135,6 @@ async function checkNotification(notificationId, blur) {
} }
export default { export default {
components: {
AddAlert,
},
props: { props: {
notifications: { notifications: {
type: Array, type: Array,
@ -160,6 +150,7 @@ export default {
showAddAlert: false, showAddAlert: false,
}; };
}, },
emits: ['addAlert'],
methods: { methods: {
checkNotifications, checkNotifications,
checkNotification, checkNotification,

View File

@ -221,6 +221,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-sizing: border-box;
padding: 1rem;
background: var(--shadow-touch); background: var(--shadow-touch);
.icon { .icon {