diff --git a/ChangeLog.md b/ChangeLog.md index dcaeab3f..66563fbb 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,10 @@ # Changelog: * **19.03.20** - Using proper icons for the client info + - Added an image preview overlay + - Added image preview within the chat + - Added an image preview to the music bot thumbnails + - Added an image preview to client avatars * **18.03.20** - Updated the sound playback mechanism and allowing the native backend to playback sounds via the native interface. diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index 373ec839..2d51502d 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -14,6 +14,7 @@ function remove_if_exists() { function cleanup_declarations() { remove_if_exists shared/declarations/ remove_if_exists web/declarations/ + remove_if_exists client/declarations/ } function cleanup_generated_files() { @@ -58,4 +59,4 @@ cleanup_declarations echo "Deleting generated output files" cleanup_generated_files -echo "Project cleaned up" \ No newline at end of file +echo "Project cleaned up" diff --git a/shared/css/generate_packed.sh b/shared/css/generate_packed.sh index 679163c9..48e2c80f 100755 --- a/shared/css/generate_packed.sh +++ b/shared/css/generate_packed.sh @@ -47,6 +47,7 @@ files=( "css/static/modal-serverinfo.css" "css/static/modal-settings.css" "css/static/modal-volume.css" + "css/static/overlay-image-preview.css" "css/static/ts/tab.css" "css/static/ts/chat.css" diff --git a/shared/css/static/frame-chat.scss b/shared/css/static/frame-chat.scss index e23cb134..95f79d9d 100644 --- a/shared/css/static/frame-chat.scss +++ b/shared/css/static/frame-chat.scss @@ -1431,6 +1431,20 @@ $bot_thumbnail_height: 9em; background-color: #25252a; } } + + .xbbcode-tag-img { + padding: .25em; + border-radius: .25em; + + overflow: hidden; + max-width: 20em; + max-height: 20em; + + img { + width: 100%; + height: 100%; + } + } } .container-music-info { diff --git a/shared/css/static/overlay-image-preview.scss b/shared/css/static/overlay-image-preview.scss new file mode 100644 index 00000000..22328c84 --- /dev/null +++ b/shared/css/static/overlay-image-preview.scss @@ -0,0 +1,88 @@ +@import "mixin"; + +.overlay-image-preview { + position: absolute; + z-index: 1000; + + pointer-events: all; + + top: 0; + bottom: 0; + left: 0; + right: 0; + + opacity: 1; + background-color: #000000EF; + + display: flex; + flex-direction: column; + justify-content: center; + + .container-menu-bar { + position: absolute; + + top: .25em; + left: 0; + right: .25em; + + display: flex; + flex-direction: row; + justify-content: flex-end; + + .entry { + display: flex; + flex-direction: column; + justify-content: center; + font-size: 2em; + + margin: .25em; + padding: .15em; + + border-radius: .125em; + + cursor: pointer; + + .container-icon { + width: 1em; + height: 1em; + display: flex; + + img { + height: 100%; + width: 100%; + } + } + + &:hover { + background-color: #FFFFFF1F; + } + } + } + + .container-image { + max-width: 90%; + max-height: 90%; + align-self: center; + + display: flex; + flex-direction: column; + justify-content: stretch; + + img { + flex-shrink: 1; + + min-height: 1em; + min-width: 1em; + + max-height: 100%; + max-width: 100%; + } + } + + &.hidden { + pointer-events: none; + opacity: 0; + } + + @include transition(ease-in-out .25s); +} \ No newline at end of file diff --git a/shared/html/templates.html b/shared/html/templates.html index 140ad7eb..5590f409 100644 --- a/shared/html/templates.html +++ b/shared/html/templates.html @@ -224,6 +224,26 @@
+