From 3146a0b35a8385cce27f0034b0422e16c4ede219 Mon Sep 17 00:00:00 2001 From: N-Pex Date: Tue, 23 Feb 2021 22:07:57 +0100 Subject: [PATCH] Voice messages --- src/assets/css/chat.scss | 41 +++++- src/components/Chat.vue | 138 ++++++++++--------- src/components/VoiceRecorder.vue | 195 ++++++++++++++++++++++----- src/components/VoiceRecorderLock.vue | 28 ++++ 4 files changed, 303 insertions(+), 99 deletions(-) create mode 100644 src/components/VoiceRecorderLock.vue diff --git a/src/assets/css/chat.scss b/src/assets/css/chat.scss index 3f5323b..e987db8 100644 --- a/src/assets/css/chat.scss +++ b/src/assets/css/chat.scss @@ -137,7 +137,7 @@ $admin-fg: white; max-height: 30vh; overflow-x: hidden; overflow-y: auto; - padding: 0 0 0 0px; + padding: 0 0 0px 20px; margin: 6px 0; font-family: 'Inter', sans-serif; font-weight: 300; @@ -606,10 +606,45 @@ $admin-fg: white; bottom: 0; right: 0; background-color: black; - &.will-cancel { - background-color: grey; + .will-cancel { + background-color: #ff3300; } .recording-time { color: white; } + .swipe-info { + color: white; + } + .locked { + background-color: black; + } + .error { + background-color: orange; + } + .voice-recorder-lock { + position: relative; + margin-left: 10px; + margin-right: 10px; + width: 20px; + height: 100%; + border: 1px solid black; + border-radius: 10px; + background-color: rgba(white, 0.3); + &.locked { + background-color: rgba(white, 0.8); + } + .thumb { + width: 16px; + height: 16px; + background-color: black; + border-radius: 8px; + position: absolute; + bottom: 1px; + left: 1px; + &.locked { + top: 1px; + bottom: unset; + } + } + } } \ No newline at end of file diff --git a/src/components/Chat.vue b/src/components/Chat.vue index 9b60cd7..a61ed05 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -111,6 +111,78 @@ + + + + + + + cancel + + + + + + mic + + + + + + {{ + editedEvent ? "save" : "arrow_upward" + }} + + + - - - - - - - mic - - - - - cancel - - - - - {{ - editedEvent ? "save" : "arrow_upward" - }} - - - +
diff --git a/src/components/VoiceRecorder.vue b/src/components/VoiceRecorder.vue index 16752e9..2fd88da 100644 --- a/src/components/VoiceRecorder.vue +++ b/src/components/VoiceRecorder.vue @@ -1,18 +1,79 @@ + + \ No newline at end of file