From f1ed1141676aad0f7eb6247593ce136a64b294a0 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 14 Sep 2020 21:07:00 +0200 Subject: [PATCH] small blink on attr save as a visual hint --- src/public/app/widgets/attribute_editor.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/public/app/widgets/attribute_editor.js b/src/public/app/widgets/attribute_editor.js index a4c9c5286..a45e2acc1 100644 --- a/src/public/app/widgets/attribute_editor.js +++ b/src/public/app/widgets/attribute_editor.js @@ -26,6 +26,7 @@ const TPL = ` color: var(--muted-text-color); max-height: 100px; overflow: auto; + transition: opacity .1s linear; } .save-attributes-button { @@ -307,6 +308,12 @@ export default class AttributeEditorWidget extends TabAwareWidget { await server.put(`notes/${this.noteId}/attributes`, attributes, this.componentId); this.$saveAttributesButton.fadeOut(); + + // blink the attribute text to give visual hint that save has been executed + this.$editor.css('opacity', 0); + + // revert back + setTimeout(() => this.$editor.css('opacity', 1), 100); } }