mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2026-02-05 02:34:13 +02:00
Merge branch 'main' into DevelopCkutls
This commit is contained in:
@@ -49,33 +49,32 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
ClaimDatamsg(msg) {
|
||||
const MsgUser = {
|
||||
id: this.id + 1,
|
||||
msg: msg[0],
|
||||
username: msg[1],
|
||||
icon: msg[2]
|
||||
}
|
||||
|
||||
this.array.push(MsgUser)
|
||||
|
||||
SendMessageToChat(msg[0]);
|
||||
|
||||
if(this.array.length > 7) {
|
||||
this.array.shift()
|
||||
}
|
||||
// if(this.array.length > 7) {
|
||||
// this.array.shift()
|
||||
// }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
eventBus.on('dataChat', (dataFromServer) => {
|
||||
try {
|
||||
// Attempt to parse the JSON string
|
||||
const dataObject = JSON.parse(dataFromServer);
|
||||
let imageUrl = "https://avatar.spworlds.ru/face/55/" + dataObject.SpUserName;
|
||||
|
||||
const MsgUser = {
|
||||
id: this.id + 1,
|
||||
msg: dataFromServer,
|
||||
username: dataFromServer,
|
||||
icon: dataFromServer
|
||||
}
|
||||
msg: dataObject.Message,
|
||||
username: dataObject.SpUserName,
|
||||
icon: imageUrl
|
||||
};
|
||||
|
||||
this.array.push(MsgUser)
|
||||
console.log(dataFromServer)
|
||||
this.array.push(MsgUser);
|
||||
} catch (error) {
|
||||
console.error('Error parsing JSON data:', error);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
<script>
|
||||
import "@/assets/css/ComponentsStyles/header.css";
|
||||
// import { GetAuthCodeFromCurrentPath } from '@/assets/js/authentication/LoggingMiddleware.js';
|
||||
import { LogIn } from "@/assets/js/authentication/AuthService.js";
|
||||
import { GetCurrentMoney } from "@/assets/js/rest/RestMethods.js";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="write">
|
||||
<div class="write__content">
|
||||
<input type="text" @keyup.enter="sendmsgDataEnter" v-model.trim="msg" placeholder="Напишите сообщение..." maxlength="22">
|
||||
<input type="text" @keyup.enter="sendmsgDataEnter" v-model.trim="msg" placeholder="Напишите сообщение..." maxlength="100">
|
||||
<button
|
||||
:disabled="CheckerforBtn()"
|
||||
type="submit"
|
||||
|
||||
Reference in New Issue
Block a user