Skip to content

Commit

Permalink
✨ refine unsubscription logic in subscription manager
Browse files Browse the repository at this point in the history
  • Loading branch information
moisout committed Sep 18, 2020
1 parent 2a999d1 commit daf2818
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion client/components/message/MessageBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
}"
@click="onMessageClick"
>
<span class="progress-line" />
<span
class="progress-line"
:class="{ persist: !dismissTimeout }"
:style="{ 'animation-duration': `${message.dismissDelay}ms` }"
/>
<div
v-ripple
class="close"
Expand Down Expand Up @@ -110,6 +114,7 @@ export default {
onMessageClick() {
if (this.dismissTimeout) {
clearTimeout(this.dismissTimeout);
this.dismissTimeout = null;
}
if (this.message.clickAction) {
this.message.clickAction();
Expand Down Expand Up @@ -186,6 +191,17 @@ export default {
width: 100%;
height: 2px;
background-color: var(--theme-color);
animation-delay: 0;
animation-name: reduce-width;
animation-timing-function: linear;
animation-fill-mode: forwards;
transform-origin: right;
transition: opacity 200ms linear;
opacity: 1;
&.persist {
opacity: 0;
}
}
.close {
Expand Down Expand Up @@ -215,6 +231,15 @@ export default {
word-break: break-all;
}
@keyframes reduce-width {
0% {
transform: scale3d(1, 1, 1);
}
100% {
transform: scale3d(0, 1, 1);
}
}
@keyframes blob-in-notif {
0% {
clip-path: circle(0%);
Expand Down

0 comments on commit daf2818

Please sign in to comment.