Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/css
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-08-21 11:29:44 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-08-27 18:29:52 +0300
commit5d6ed51f42c03ab5a5b78a8fadc51c455de1c710 (patch)
treedfa02b753d0a23490a65478920e192a193a4d91b /css
parentf56122ae787f433f94eaea60a5a8277c6b0089be (diff)
Provide feedback while waiting for the server to set the password
Due to its special nature the password is not stored in an attribute of the model. Nevertheless, a "changed:password" (always with an empty value) was triggered as soon as the password was submited. However, as there is no password attribute that event is not taken into account anywhere and the UI was not updated until the server response was received (with further updates once the rooms are fetched again). To provide feedback to the user that the password is being set now the confirm button is replaced by a working icon while waiting for the answer. In a similar way the input is also disabled to prevent further requests while the previous one is ongoing. Note that due to the aforementioned behaviour it is not really necessary to wait for the server response to update the model with the new password (as it will not be updated anyway), but it is done for consistency with other requests. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'css')
-rw-r--r--css/style.scss34
1 files changed, 33 insertions, 1 deletions
diff --git a/css/style.scss b/css/style.scss
index c816e1cf3..47f21007f 100644
--- a/css/style.scss
+++ b/css/style.scss
@@ -83,6 +83,9 @@
* It is assumed that the icon will have the standard width for buttons in
* inputs of 34px. However, further adjustments may be needed for the input and
* the padding depending on the context where they are used.
+ *
+ * The confirm icon can have a sibling loading icon to switch to (by hiding one
+ * icon and showing the other) while the operation is in progress.
*/
input[type="text"],
input[type="password"] {
@@ -114,6 +117,32 @@ input[type="password"] {
&:active:not(:disabled) {
opacity: 1;
}
+
+ + .icon-loading-small {
+ /* Mimic size set in server for confirm button. */
+ width: 34px;
+ height: 34px;
+ padding: 7px 6px;
+ margin-top: 3px;
+ margin-bottom: 3px;
+
+ position: absolute;
+ top: 0;
+ right: 3px;
+ }
+ }
+}
+
+.menuitem input[type="text"],
+.menuitem input[type="password"] {
+ & + .icon-confirm + .icon-loading-small {
+ /* Mimic size set in server for inputs in menu items. */
+ min-width: 44px;
+ max-height: 40px;
+ margin: 2px 0;
+
+ /* Override padding set in server for icons in menu items. */
+ padding: 7px 6px;
}
}
@@ -953,11 +982,14 @@ input[type="password"] {
.password-form {
position: relative;
- .password-confirm {
+ .password-confirm,
+ .password-loading {
/* Inputs in menu items do not have a right margin, so
* it does not need to be compensated. */
right: 0;
+ }
+ .password-confirm {
/* Needed to override an important rule set in the
* server. */
background-color: transparent !important;