diff --git a/src/styles/components/task.scss b/src/styles/components/task.scss index 2ece6e71..eb22e00f 100644 --- a/src/styles/components/task.scss +++ b/src/styles/components/task.scss @@ -254,3 +254,16 @@ .link-share-container .task-view { background-color: transparent; } + +.flash-background-enter, .flash-background-enter-active { + animation: flash-background $flash-background-duration ease 1; +} + +@keyframes flash-background { + 0% { + background: lighten($primary, 30); + } + 100% { + background: transparent; + } +} \ No newline at end of file diff --git a/src/styles/theme/variables.scss b/src/styles/theme/variables.scss index b9dcf591..efdc4df1 100644 --- a/src/styles/theme/variables.scss +++ b/src/styles/theme/variables.scss @@ -17,6 +17,7 @@ $navbar-dropdown-boxed-shadow: $dropdown-content-shadow; $bulmaswatch-import-font: false !default; $light-background: #F1F5F8; $transition-duration: 100ms; +$flash-background-duration: 750ms; $transparent-background-light: rgba($light-background, 0.9); $vikunja-font: 'Quicksand', sans-serif; diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index b97ce3ce..70eb47b8 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -28,129 +28,145 @@ v-model="task.assignees" /> -
- -
- - Priority + +
+ +
+ + Priority +
+
- -
-
- -
- - Due Date + + +
+ +
+ + Due Date +
+
+ + + + + + +
-
- + +
+ +
+ + Percent Done +
+ +
+
+ +
+ +
+ + Start Date +
+
-
-
- -
- - Percent Done + + +
+ +
+ + End Date +
+
+ + + + + + +
- -
-
- -
- - Start Date + + +
+ +
+ + Reminders +
+
-
- - - - - - + + +
+ +
+ + Repeat +
+
-
-
- -
- - End Date + + +
+ +
+ + Color +
+
-
- - - - - - -
-
-
- -
- - Reminders -
- -
-
- -
- - Repeat -
- -
-
- -
- - Color -
- -
+
@@ -546,7 +562,13 @@ export default { this.activeFields[fieldName] = true this.$nextTick(() => { if (this.$refs[fieldName]) { - this.$refs[fieldName].$el.focus() + this.$refs[fieldName].$el.focus(); + + // scroll the field to the center of the screen if not in viewport already + const boundingRect = this.$refs[fieldName].$el.getBoundingClientRect(); + + if (boundingRect.top > (window.scrollY + window.innerHeight) || boundingRect.top < window.scrollY) + this.$refs[fieldName].$el.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"}); } }) },