From c2249ee5a6a58f02db424ba852343009f93c45fa Mon Sep 17 00:00:00 2001 From: Greg Price Date: Tue, 16 Jul 2024 16:35:22 -0700 Subject: [PATCH] wip/ref webview: Show spinner for thumbnail placeholders TODO update as needed for merged web version TODO test, manually This is a port of zulip/zulip 30477. --- src/webview/css/cssNight.js | 3 ++ src/webview/static/base.css | 3 ++ src/webview/static/images/loader-black.svg | 49 ++++++++++++++++++++++ src/webview/static/images/loader-white.svg | 49 ++++++++++++++++++++++ 4 files changed, 104 insertions(+) create mode 100644 src/webview/static/images/loader-black.svg create mode 100644 src/webview/static/images/loader-white.svg diff --git a/src/webview/css/cssNight.js b/src/webview/css/cssNight.js index b6af2a9b092..16839fb9531 100644 --- a/src/webview/css/cssNight.js +++ b/src/webview/css/cssNight.js @@ -17,4 +17,7 @@ body { .highlight { background-color: hsla(51, 100%, 64%, 0.42); } +.message_inline_image img.image-loading-placeholder { + content: url("images/loader-white.svg"); +} `; diff --git a/src/webview/static/base.css b/src/webview/static/base.css index 673b8c369c6..cc1bddbb19d 100644 --- a/src/webview/static/base.css +++ b/src/webview/static/base.css @@ -552,6 +552,9 @@ time { height: 160px; object-fit: contain; } +.message_inline_image img.image-loading-placeholder { + content: url("images/loader-black.svg"); +} .message_inline_video { position: relative; diff --git a/src/webview/static/images/loader-black.svg b/src/webview/static/images/loader-black.svg new file mode 100644 index 00000000000..d19b12d9501 --- /dev/null +++ b/src/webview/static/images/loader-black.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/webview/static/images/loader-white.svg b/src/webview/static/images/loader-white.svg new file mode 100644 index 00000000000..2209e94edc0 --- /dev/null +++ b/src/webview/static/images/loader-white.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +