diff --git a/src/components/message.vue b/src/components/message.vue index 7df2218..bac9d41 100644 --- a/src/components/message.vue +++ b/src/components/message.vue @@ -1,7 +1,8 @@ @@ -10,7 +11,8 @@ export default { name: "message", props: { - msg: String + msg: String, + time: String, } } @@ -36,4 +38,10 @@ export default { word-break: break-word; white-space: pre-line; } + .time{ + position: relative; + bottom: -0.2rem; + font-size: 0.7rem; + text-align: right; + } \ No newline at end of file diff --git a/src/components/messageReceive.vue b/src/components/messageReceive.vue index 8ab5d12..8a3f63c 100644 --- a/src/components/messageReceive.vue +++ b/src/components/messageReceive.vue @@ -1,7 +1,8 @@ @@ -10,7 +11,8 @@ export default { name: "messageReceive", props: { - msg: String + msg: String, + time: String } } @@ -35,4 +37,10 @@ export default { word-break: break-word; white-space: pre-line; } + .time{ + position: relative; + bottom: -0.2rem; + font-size: 0.7rem; + text-align: right; + } \ No newline at end of file diff --git a/src/components/newMessage.vue b/src/components/newMessage.vue index f83067e..65eca55 100644 --- a/src/components/newMessage.vue +++ b/src/components/newMessage.vue @@ -79,6 +79,8 @@ export default { height: 1.25rem; background-color: #fff0; border: 0 solid #fff0; + appearance: none; + outline: none; color: #fff; font-size: 1rem; resize: none; diff --git a/src/matrix.js b/src/matrix.js index 363ce78..0a9490f 100644 --- a/src/matrix.js +++ b/src/matrix.js @@ -105,9 +105,8 @@ export default { function getCookie(key) { let cookie = document.cookie.replace(/ /g, '').split(';') - .find(cookie => cookie.split('=')[0] === key); - if (cookie) return cookie.split('=')[1]; - return false; + .find(cookie => cookie.split('=')[0] === key); + return cookie?cookie.split('=')[1]:false; } matrix_cli.on("event", event => { diff --git a/src/views/chat.vue b/src/views/chat.vue index 04d9c76..945112c 100644 --- a/src/views/chat.vue +++ b/src/views/chat.vue @@ -1,15 +1,18 @@