Skip to content

Commit

Permalink
[web] Fix notification block for long messages
Browse files Browse the repository at this point in the history
When long messages have to be displayed, their text no longer goes beyond the frame.
  • Loading branch information
hacketiwack committed Dec 7, 2023
1 parent 0bd2cb4 commit a335989
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions web-src/src/components/NotificationList.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<template>
<section v-if="notifications.length > 0" class="fd-notifications">
<section v-if="notifications.length > 0" class="notifications">
<div class="columns is-centered">
<div class="column is-half">
<div
v-for="notification in notifications"
:key="notification.id"
class="notification"
:class="[
'notification',
notification.type ? `is-${notification.type}` : ''
]"
:class="notification.type ? `is-${notification.type}` : ''"
>
<button class="delete" @click="remove(notification)" />
<span v-text="notification.text" />
<div class="text" v-text="notification.text" />
</div>
</div>
</div>
Expand All @@ -24,11 +21,6 @@ import * as types from '@/store/mutation_types'
export default {
name: 'NotificationList',
components: {},
data() {
return { showNav: false }
},
computed: {
notifications() {
Expand All @@ -44,19 +36,21 @@ export default {
}
</script>

<style>
.fd-notifications {
<style scoped>
.notifications {
position: fixed;
bottom: 60px;
bottom: 4rem;
z-index: 20000;
width: 100%;
}
.fd-notifications .notification {
margin-bottom: 10px;
margin-left: 24px;
margin-right: 24px;
.notifications .notification {
box-shadow:
0 4px 8px 0 rgba(0, 0, 0, 0.2),
0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.notification .text {
overflow-wrap: break-word;
max-height: 6rem;
overflow: scroll;
}
</style>

0 comments on commit a335989

Please sign in to comment.