aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/assets
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-11-13 11:05:10 -0500
committerDrew DeVault <sir@cmpwn.com>2020-11-13 11:05:10 -0500
commitfe32c53a1789b28883069cb492e1eb2a8c42c22f (patch)
treed422497e3f6b7796046aa1e7234e067861f8eab5 /themes/alps/assets
parent86579bb4781c559917d9495eeb982137ade04bac (diff)
downloadalps-fe32c53a1789b28883069cb492e1eb2a8c42c22f.tar.gz
alps-fe32c53a1789b28883069cb492e1eb2a8c42c22f.zip
Improve UI while emails are being sent
Diffstat (limited to 'themes/alps/assets')
-rw-r--r--themes/alps/assets/compose.js (renamed from themes/alps/assets/attachments.js)8
-rw-r--r--themes/alps/assets/style.css40
2 files changed, 47 insertions, 1 deletions
diff --git a/themes/alps/assets/attachments.js b/themes/alps/assets/compose.js
index dc6cc04..e6f057f 100644
--- a/themes/alps/assets/attachments.js
+++ b/themes/alps/assets/compose.js
@@ -1,3 +1,11 @@
+const composeForm = document.getElementById("compose-form");
+const sendProgress = document.getElementById("send-progress");
+composeForm.addEventListener("submit", ev => {
+ [...document.querySelectorAll("input, textarea")].map(
+ i => i.setAttribute("readonly", "readonly"));
+ sendProgress.style.display = 'flex';
+});
+
let attachments = [];
const headers = document.querySelector(".create-update .headers");
diff --git a/themes/alps/assets/style.css b/themes/alps/assets/style.css
index 79bc88a..830506f 100644
--- a/themes/alps/assets/style.css
+++ b/themes/alps/assets/style.css
@@ -254,10 +254,48 @@ main.create-update #attachment-list .upload.error .error {
color: red;
}
-main.create-update textarea {
+main.create-update .text {
flex: 1 auto;
resize: none;
margin-top: 1rem;
+ position: relative;
+}
+
+main.create-update textarea {
+ width: 100%;
+ height: 100%;
+}
+
+#send-progress {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ font-size: 1.2rem;
+ background: rgba(0, 0, 0, 0.2);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+#send-progress svg {
+ height: 1.2rem;
+ margin-right: 0.3rem;
+ animation: fa-spin 2s infinite linear;
+}
+
+#send-progress svg path {
+ fill: currentColor;
+}
+
+@keyframes fa-spin {
+ 0% {
+ transform: rotate(0deg);
+ }
+ 100% {
+ transform: rotate(1turn);
+ }
}
main table { border-collapse: collapse; width: 100%; border: 1px solid #eee; }