diff --git a/frontend/package.json b/frontend/package.json index 59ecc31..7227400 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "colubrina", - "version": "1.0.29", + "version": "1.0.30", "description": "Simple instant communication.", "private": true, "author": "Troplo ", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 938f14f..0010cbd 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -5,6 +5,7 @@ $vuetify.theme.themes[$vuetify.theme.dark ? 'dark' : 'light'].bg " > + @@ -454,10 +455,12 @@ import AjaxErrorHandler from "@/lib/errorHandler" import { VueFinalModal } from "vue-final-modal" import Header from "@/components/Header" +import DevOverlay from "@/components/DevOverlay" export default { name: "App", components: { + DevOverlay, VueFinalModal, Header, editor: require("vue2-ace-editor") diff --git a/frontend/src/assets/styles.css b/frontend/src/assets/styles.css index b0d6aae..858d03d 100644 --- a/frontend/src/assets/styles.css +++ b/frontend/src/assets/styles.css @@ -1,3 +1,33 @@ +.colubrina-alert { + position: fixed; + top: 0; + width: 100%; + z-index: 1000; + padding: 4px; +} + +.dev-overlay { + position: absolute; + z-index: 2000; + background-color: rgba(0, 0, 0, 0.37); + text-align: center; + width: 300px; +} + +.dev-header { + padding: 10px; + cursor: move; + z-index: 2001; + background-color: #2196F3; +} + +.chat-col { + display: flex; + flex-direction: column-reverse; + overflow: auto; + height: 100%; +} + >>>.max-v-list-height { max-height: 10px; overflow-y: auto; diff --git a/frontend/src/components/DevOverlay.vue b/frontend/src/components/DevOverlay.vue new file mode 100644 index 0000000..080dd2a --- /dev/null +++ b/frontend/src/components/DevOverlay.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/frontend/src/views/Communications/CommunicationsChat.vue b/frontend/src/views/Communications/CommunicationsChat.vue index 4589e7b..5490d0e 100644 --- a/frontend/src/views/Communications/CommunicationsChat.vue +++ b/frontend/src/views/Communications/CommunicationsChat.vue @@ -174,11 +174,110 @@ + + + mdi-reply + + + mdi-account + + + + {{ replying.content.substring(0, 100) }} + + + mdi-close + + + + +
+ mdi-arrow-down + Jump to bottom... +
+
+
+ +
+ {{ usersTyping.map((user) => getName(user)).join(", ") }} + {{ usersTyping.length > 1 ? " are" : " is" }} typing... +
+
+ + +
+ {{ usersTyping.map((user) => getName(user)).join(", ") }} + {{ usersTyping.length > 1 ? " are" : " is" }} typing... +
+
+
- mdi-reply - - - mdi-account - - - - {{ replying.content.substring(0, 100) }} - - - mdi-close - - - - -
- mdi-arrow-down - Jump to bottom... -
-
-
- -
- {{ usersTyping.map((user) => getName(user)).join(", ") }} - {{ usersTyping.length > 1 ? " are" : " is" }} typing... -
-
- - -
- {{ usersTyping.map((user) => getName(user)).join(", ") }} - {{ usersTyping.length > 1 ? " are" : " is" }} typing... -
-
-
{ - if ( - data.messageId && - data.chatId === this.chat.chatId && - this.messages?.length - ) { - this.messages.forEach((message) => { - message.readReceipts = message.readReceipts.filter( - (readReceipt) => readReceipt.id !== data.id - ) - }) - this.messages - .find((message) => message.id === data.messageId) - .readReceipts?.push(data) - this.autoScroll() + try { + if ( + data.messageId && + data.chatId === this.chat.chatId && + this.messages?.length + ) { + this.messages.forEach((message) => { + message.readReceipts = message.readReceipts.filter( + (readReceipt) => readReceipt.id !== data.id + ) + }) + this.messages + .find((message) => message.id === data.messageId) + .readReceipts?.push(data) + this.autoScroll() + } + } catch (e) { + console.log("Read receipt error", e) } }) this.$socket.on("message", (message) => {