diff --git a/package.json b/package.json index c57fd22..8706b37 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "eslint": "^6.7.2", "eslint-plugin-vue": "^7.5.0", "node-sass": "^5.0.0", + "recorder-js": "*", "sass-loader": "^10.1.1", "vue-router": "^3.4.9", "vue-template-compiler": "^2.6.11" diff --git a/public/sym/ic_attach_file_white.svg b/public/sym/ic_attach_file_white.svg new file mode 100644 index 0000000..0029471 --- /dev/null +++ b/public/sym/ic_attach_file_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/sym/ic_insert_emoticon_white.svg b/public/sym/ic_insert_emoticon_white.svg new file mode 100644 index 0000000..438740f --- /dev/null +++ b/public/sym/ic_insert_emoticon_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/sym/ic_mic_white.svg b/public/sym/ic_mic_white.svg new file mode 100644 index 0000000..4c29695 --- /dev/null +++ b/public/sym/ic_mic_white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/event.vue b/src/components/event.vue index 85d9c07..aa45258 100644 --- a/src/components/event.vue +++ b/src/components/event.vue @@ -2,34 +2,7 @@
- -
-
-
-
- {{event.content.body}} -
- -
-
- {{event.content.body}} -
-
-
- {{event.content.body}} -
-
unsupported message type {{event.content.msgtype}}
- +
{{getTime(event.origin_server_ts)}}
@@ -47,10 +20,11 @@ import {parseMessage} from '@/lib/eventUtils'; import {getTime} from '@/lib/getTimeStrings'; import {getMediaUrl} from '@/lib/getMxc'; import ReplyEvent from '@/components/replyEvent'; +import EventContent from '@/components/eventContent'; export default { name: 'message', - components: {ReplyEvent}, + components: {EventContent, ReplyEvent}, props: { type: String, event: Object, @@ -134,32 +108,6 @@ export default { .notice{ font-style: italic; } - .image{ - width: 100%; - img{ - max-width: 100%; - height: auto; - max-height: 35rem; - border-radius: 0.5rem; - } - } - .video{ - width: 100%; - video{ - max-width: 100%; - height: auto; - max-height: 35rem; - border-radius: 0.5rem; - } - } - .audio{ - audio{ - max-width: 100%; - } - } - .italic{ - font-style: italic; - } } .messageReceive{ background-color: #424141; diff --git a/src/components/eventContent.vue b/src/components/eventContent.vue new file mode 100644 index 0000000..80a6980 --- /dev/null +++ b/src/components/eventContent.vue @@ -0,0 +1,128 @@ + + + + + \ No newline at end of file diff --git a/src/components/fileUpload.vue b/src/components/fileUpload.vue new file mode 100644 index 0000000..5c779c8 --- /dev/null +++ b/src/components/fileUpload.vue @@ -0,0 +1,62 @@ + + + + + \ No newline at end of file diff --git a/src/components/newMessage.vue b/src/components/newMessage.vue index 24b930d..93a8d6c 100644 --- a/src/components/newMessage.vue +++ b/src/components/newMessage.vue @@ -1,21 +1,47 @@