fixed bug ##283
die messages der einschreibung werden nun getrennt. dafür aber gestackt.
This commit is contained in:
parent
fd9784cfe3
commit
62756d3cec
|
@ -214,15 +214,23 @@
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-snackbar
|
<v-snackbar
|
||||||
v-for="message in messages"
|
color="success"
|
||||||
:key="messages.indexOf(message)"
|
|
||||||
:color="message.error ? 'error' : 'success'"
|
|
||||||
bottom
|
bottom
|
||||||
:timeout="0"
|
:timeout="0"
|
||||||
:multi-line="true"
|
:multi-line="true"
|
||||||
v-model="message.visible"
|
:value="messages.length > 0 ? messages[0].visible : test"
|
||||||
|
vertical
|
||||||
>
|
>
|
||||||
{{ createMessage(message) }}
|
<v-list-item v-for="message in messages"
|
||||||
|
:key="messages.indexOf(message)"
|
||||||
|
style="background-color: #4CAF50;"
|
||||||
|
v-show="message.visible">
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title style="color: white">
|
||||||
|
{{ createMessage(message) }}
|
||||||
|
</v-list-item-title>
|
||||||
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
</v-snackbar>
|
</v-snackbar>
|
||||||
</v-container>
|
</v-container>
|
||||||
</div>
|
</div>
|
||||||
|
@ -249,7 +257,8 @@ export default {
|
||||||
componentRenderer: 0,
|
componentRenderer: 0,
|
||||||
timer: '',
|
timer: '',
|
||||||
stornoMessage: null,
|
stornoMessage: null,
|
||||||
checkValidate: false
|
checkValidate: false,
|
||||||
|
test: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -270,7 +279,7 @@ export default {
|
||||||
user.timeout = setTimeout(() => {
|
user.timeout = setTimeout(() => {
|
||||||
this.addAmount({username: user.username,
|
this.addAmount({username: user.username,
|
||||||
amount: user.toSetAmount,
|
amount: user.toSetAmount,
|
||||||
user})
|
user: user})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
user.toSetAmount = null
|
user.toSetAmount = null
|
||||||
}, 300)
|
}, 300)
|
||||||
|
|
|
@ -86,8 +86,10 @@ const mutations = {
|
||||||
},
|
},
|
||||||
addMessage: (state, data) => {
|
addMessage: (state, data) => {
|
||||||
var message = null
|
var message = null
|
||||||
|
console.log(data)
|
||||||
if (state.messages.length > 0) {
|
if (state.messages.length > 0) {
|
||||||
if (state.messages[0].user.id === data.user.id && !data.error) {
|
console.log(state.messages[0].user.username, data.user.username)
|
||||||
|
if (state.messages[0].user.username === data.user.username && !data.error) {
|
||||||
message = state.messages[0]
|
message = state.messages[0]
|
||||||
if ((new Date() - state.messages[0].date) / 1000 < 2) {
|
if ((new Date() - state.messages[0].date) / 1000 < 2) {
|
||||||
clearTimeout(message.timeout)
|
clearTimeout(message.timeout)
|
||||||
|
|
|
@ -165,7 +165,7 @@ const mutations = {
|
||||||
addMessage: (state, data) => {
|
addMessage: (state, data) => {
|
||||||
var message = null
|
var message = null
|
||||||
if (state.messages.length > 0) {
|
if (state.messages.length > 0) {
|
||||||
if (state.messages[0].user.id === data.user.id && !data.error) {
|
if (state.messages[0].user.username === data.user.username && !data.error) {
|
||||||
message = state.messages[0]
|
message = state.messages[0]
|
||||||
if ((new Date() - state.messages[0].date) / 1000 < 2) {
|
if ((new Date() - state.messages[0].date) / 1000 < 2) {
|
||||||
clearTimeout(message.timeout)
|
clearTimeout(message.timeout)
|
||||||
|
|
Loading…
Reference in New Issue