diff --git a/src/App.vue b/src/App.vue index 8c8d40c..eb32533 100644 --- a/src/App.vue +++ b/src/App.vue @@ -236,7 +236,7 @@ export default { } #app { - background-color: $app-background; + background-color: var(--v-app-background); } .main { diff --git a/src/assets/config.json b/src/assets/config.json index bfbdea1..42d5c8e 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -45,6 +45,7 @@ } ], "experimental_voice_mode": true, + "experimental_file_mode": true, "experimental_read_only_room": true, "experimental_public_room": true, "show_status_messages": "never" diff --git a/src/assets/css/chat.scss b/src/assets/css/chat.scss index 3066a56..8d7132a 100644 --- a/src/assets/css/chat.scss +++ b/src/assets/css/chat.scss @@ -1,16 +1,19 @@ @import "~vuetify/src/styles/settings/_variables.scss"; @import "@/assets/css/main.scss"; @import "@/assets/css/vendors/v-emoji-picker"; +@import "@/assets/css/filedrop.scss"; $admin-bg: black; $admin-fg: white; body { + --v-app-background: $app-background; --v-background-color: white; --v-foreground-color: black; --v-secondary-color: #242424; --v-divider-color: #eeeeee; &.dark { + --v-app-background: black; --v-background-color: black; --v-foreground-color: white; --v-secondary-color: #c0c0c0; @@ -1528,4 +1531,4 @@ body { right: 20px; bottom: 20px; position: absolute; -} +} \ No newline at end of file diff --git a/src/assets/css/filedrop.scss b/src/assets/css/filedrop.scss new file mode 100644 index 0000000..54f1913 --- /dev/null +++ b/src/assets/css/filedrop.scss @@ -0,0 +1,349 @@ +$large-button-height: 48px; +$small-button-height: 36px; + +.file-drop-root { + $hiliteColor: #4642f1; + font-family: "Inter", sans-serif; + position: absolute; + top: 0px; + left: 0; + right: 0; + bottom: 0; + margin: 0; + background-color: var(--v-background-color); + color: var(--v-foreground-color); + overflow: hidden; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + padding: 16px; + + .file-drop-title { + color: #fff; + text-align: center; + font-size: 11.54 * $chat-text-size; + font-family: "Inter", sans-serif; + font-weight: 700; + line-height: 140%; + letter-spacing: 0.34px; + text-transform: uppercase; + margin-top: 13px; + margin-bottom: 25px; + } + .background { + width: 100%; + height: 50%; + background-color: #181719; + border-radius: 19px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + } + + .file-format-info { + opacity: 0.6; + color: #fff; + text-align: center; + font-size: 11 * $chat-text-size; + font-family: "Inter", sans-serif; + line-height: 117%; + letter-spacing: 0.4px; + margin-top: 13px; + background: transparent; + } + + .v-btn { + font-family: "Inter", sans-serif; + font-weight: 700; + font-size: 11.54 * $chat-text-size; + line-height: 140%; + color: white; + background-color: $hiliteColor !important; + border-radius: $small-button-height / 2; + min-height: 0; + height: $small-button-height !important; + margin-top: $chat-standard-padding-xs; + margin-bottom: $chat-standard-padding-xs; + &.large { + padding: 16px 23px; + height: $large-button-height; + border-radius: $large-button-height / 2; + } + } + + textarea { + color: rgba(white, 80%) !important; + } + textarea::placeholder { + color: rgba(white, 80%) !important; + } + + .attachment-wrapper { + width: 100%; + flex: 0 0 100%; + overflow-y: auto; + } + .file-drop-current-item { + width: 100%; + height: 70%; + background-color: #181719; + border-radius: 19px; + overflow: hidden; + .v-image { + width: 100%; + height: 100%; + object-fit: cover; + } + .filename { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + } + } + .file-drop-thumbnail-container { + width: 100%; + padding: 13px 20px 15px 20px; + height: 74px; + overflow-x: auto; + overflow-y: hidden; + white-space: nowrap; + text-align: start; + + /* Hide scrollbar for Chrome, Safari and Opera */ + &::-webkit-scrollbar { + display: none; + } + /* Hide scrollbar for IE, Edge and Firefox */ + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + + .file-drop-thumbnail { + width: 46px; + height: 46px; + border-radius: 9px; + overflow: hidden; + background-color: #242424; + border: 2px solid white; + display: inline-block; + position: relative; + &.current { + border: 2px solid #4642f1; + } + &.noborder { + border: 2px solid transparent; + } + .v-image { + width: 100%; + height: 100%; + object-fit: cover; + } + margin-right: 8px; + + .add, + .remove { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; + .v-icon { + width: 14px; + height: 15.75px; + } + } + .remove { + // Slight background to make visible + background-color: rgba(black, 0.2); + } + } + } + + .file-drop-section { + margin-top: 20px; + padding: 16px 18px; + background-color: #181719; + border-radius: 19px; + } + + .file-drop-input-container, + .file-drop-sending-input-container, + .file-drop-sent-input-container { + position: relative; + width: 100%; + min-height: 20%; + background-color: #181719; + border-radius: 19px; + display: flex; + flex-direction: column; + .input-area-text { + flex: 0 0 auto; + width: 100%; + margin-bottom: 50px; + padding: 16px 18px; + font-family: "Inter", sans-serif; + font-weight: 300; + } + .v-btn { + position: absolute; + right: 8px; + bottom: 10px; + } + } + + @keyframes fadeInStackItem { + from {opacity: 0;} + to {opacity: 1;} + } + + // Sending + // + .file-drop-sent-stack { + width: 100%; + height: 30%; + display: flex; + align-items: center; + justify-content: center; + .no-items { + display: flex; + align-items: center; + justify-content: center; + div { + position: absolute; + } + .file-drop-stack-item { + transform: rotate(-4.4deg); + } + color: #fff; + text-align: center; + font-size: 21 * $chat-text-size; + font-family: "Poppins", sans-serif; + font-weight: 700; + letter-spacing: 0.34px; + } + .items-sent { + z-index: 1000; + display: flex; + align-items: center; + justify-content: center; + div, .v-icon { + position: absolute; + } + .v-icon, .v-icon__component { + width: 30%; + height: 30%; + } + } + .file-drop-stack-item { + background: linear-gradient(0deg, #3a3a3c 0%, #3a3a3c 100%), #fff; + position: absolute; + overflow: hidden; + .v-image { + width: 100%; + height: 100%; + object-fit: cover; + } + &.animated { + animation-name: fadeInStackItem; + animation-duration: 1.5s; + } + } + } + + .file-drop-sending-container { + width: 100%; + padding: 13px 0px 15px 0px; + height: 50%; + overflow-x: hidden; + overflow-y: auto; + white-space: nowrap; + text-align: start; + + /* Hide scrollbar for Chrome, Safari and Opera */ + &::-webkit-scrollbar { + display: none; + } + /* Hide scrollbar for IE, Edge and Firefox */ + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + + .file-drop-sending-item { + width: 100%; + height: 64px; + overflow: hidden; + background-color: #242424; + border-radius: 12px; + background: linear-gradient(0deg, #26242b 0%, #26242b 100%), #fff; + position: relative; + padding: 8px; + .v-image { + width: 48px; + height: 48px; + border-radius: 8px; + object-fit: cover; + flex: 0 0 48px; + margin-right: 8px; + } + margin-bottom: 8px; + display: flex; + align-items: center; + .filename { + position: absolute; + top: 18px; + left: 8px; + font-size: 0.7em; + } + .v-progress-linear { + align-self: flex-end; + } + .file-drop-cancel { + position: absolute; + right: 8px; + width: 17px; + height: 17px; + color: green !important; + background: #2e2e3b; + border-radius: 8.5px; + display: flex; + align-items: center; + justify-content: center; + } + } + } + + .file-drop-sending-input-container { + .v-btn { + .v-progress-circular { + margin-left: 8px; + } + background: linear-gradient(0deg, #000 0%, #000 100%), #4642f1; + } + } + + .file-drop-files-sent { + width: 100%; + color: #fff; + text-align: center; + font-size: 21 * $chat-text-size; + font-family: "Poppins", sans-serif; + font-weight: 700; + letter-spacing: 0.34px; + text-align: center; + } + + .file-drop-sent-input-container { + background-color: transparent; + .v-btn { + right: unset; + left: 8px; + background: linear-gradient(0deg, #000 0%, #000 100%), #4642f1; + } + } +} diff --git a/src/assets/icons/ic_check_circle.vue b/src/assets/icons/ic_check_circle.vue new file mode 100644 index 0000000..33ea12b --- /dev/null +++ b/src/assets/icons/ic_check_circle.vue @@ -0,0 +1,15 @@ + diff --git a/src/assets/icons/ic_lock.vue b/src/assets/icons/ic_lock.vue new file mode 100644 index 0000000..fd9324c --- /dev/null +++ b/src/assets/icons/ic_lock.vue @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/src/assets/icons/ic_trash.vue b/src/assets/icons/ic_trash.vue new file mode 100644 index 0000000..e2d9b30 --- /dev/null +++ b/src/assets/icons/ic_trash.vue @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json index 5cc67ee..72c15ac 100644 --- a/src/assets/translations/en.json +++ b/src/assets/translations/en.json @@ -280,8 +280,12 @@ "user_admin": "Administrator", "user_moderator": "Moderator", "experimental_features": "Experimental Features", + "room_type": "Room type", + "room_type_default": "Default", "voice_mode": "Voice mode", "voice_mode_info": "Switches the chat interface to a 'listen and record' mode", + "file_mode": "File mode", + "file_mode_info": "Switches the chat interface to a 'file drop' mode", "download_chat": "Download chat", "read_only_room": "Read only room", "read_only_room_info": "Only admins and moderators are allowed to send to the room", @@ -364,5 +368,17 @@ "symbols": "Symbols", "places": "Places" } + }, + "file_mode": { + "choose_files": "Choose files", + "any_file_format_accepted": "Any file format is accepted", + "secure_file_send": "secure file send", + "add_a_message": "Add a message", + "sending_progress": "Sending...", + "sending": "Sending", + "files_sent":"1 file sent! | {count} files sent!", + "files_sent_with_note":"1 file sent with a note! | {count} files sent with a note!", + "return_to_home": "Return to home", + "files": "Files" } } diff --git a/src/components/Chat.vue b/src/components/Chat.vue index bfb8ade..6087dc1 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -1,6 +1,6 @@