Commit 62f7b206 authored by Regis's avatar Regis

object in css not computed

parent 58b560fa
...@@ -29,22 +29,23 @@ export default { ...@@ -29,22 +29,23 @@ export default {
}, },
}); });
const defaultFlags = {
pre: true,
pulse: false,
};
return { return {
poll, poll,
apiData: {}, apiData: {},
tasks: '0 of 0', tasks: '0 of 0',
title: null, title: null,
titleText: '', titleText: '',
titleFlag: defaultFlags, titleFlag: {
pre: true,
pulse: false,
},
description: null, description: null,
descriptionText: '', descriptionText: '',
descriptionChange: false, descriptionChange: false,
descriptionFlag: defaultFlags, descriptionFlag: {
pre: true,
pulse: false,
},
timeAgoEl: $('.issue_edited_ago'), timeAgoEl: $('.issue_edited_ago'),
titleEl: document.querySelector('title'), titleEl: document.querySelector('title'),
}; };
...@@ -60,7 +61,8 @@ export default { ...@@ -60,7 +61,8 @@ export default {
elementsToVisualize(noTitleChange, noDescriptionChange) { elementsToVisualize(noTitleChange, noDescriptionChange) {
if (!noTitleChange) { if (!noTitleChange) {
this.titleText = this.apiData.title_text; this.titleText = this.apiData.title_text;
this.titleFlag = { pre: true, pulse: false }; this.titleFlag.pre = true;
this.titleFlag.pulse = false;
} }
if (!noDescriptionChange) { if (!noDescriptionChange) {
...@@ -68,7 +70,8 @@ export default { ...@@ -68,7 +70,8 @@ export default {
this.descriptionChange = true; this.descriptionChange = true;
this.updateTaskHTML(); this.updateTaskHTML();
this.tasks = this.apiData.task_status; this.tasks = this.apiData.task_status;
this.descriptionFlag = { pre: true, pulse: false }; this.descriptionFlag.pre = true;
this.descriptionFlag.pulse = false;
} }
}, },
setTabTitle() { setTabTitle() {
...@@ -82,8 +85,10 @@ export default { ...@@ -82,8 +85,10 @@ export default {
this.setTabTitle(); this.setTabTitle();
this.$nextTick(() => { this.$nextTick(() => {
this.titleFlag = { pre: false, pulse: true }; this.titleFlag.pre = false;
this.descriptionFlag = { pre: false, pulse: true }; this.titleFlag.pulse = true;
this.descriptionFlag.pre = false;
this.descriptionFlag.pulse = true;
}); });
}, },
triggerAnimation() { triggerAnimation() {
...@@ -111,20 +116,6 @@ export default { ...@@ -111,20 +116,6 @@ export default {
this.timeAgoEl.attr('title', toolTipTime).tooltip('fixTitle'); this.timeAgoEl.attr('title', toolTipTime).tooltip('fixTitle');
}, },
}, },
computed: {
titleAnimationCss() {
return {
'issue-realtime-pre-pulse': this.titleFlag.pre,
'issue-realtime-trigger-pulse': this.titleFlag.pulse,
};
},
descriptionAnimationCss() {
return {
'issue-realtime-pre-pulse': this.descriptionFlag.pre,
'issue-realtime-trigger-pulse': this.descriptionFlag.pulse,
};
},
},
created() { created() {
if (!Visibility.hidden()) { if (!Visibility.hidden()) {
this.poll.makeRequest(); this.poll.makeRequest();
...@@ -163,7 +154,7 @@ export default { ...@@ -163,7 +154,7 @@ export default {
<div> <div>
<h2 <h2
class="title" class="title"
:class="titleAnimationCss" :class="{ 'issue-realtime-pre-pulse': titleFlag.pre, 'issue-realtime-trigger-pulse': titleFlag.pulse }"
ref="issue-title" ref="issue-title"
v-html="title" v-html="title"
> >
...@@ -175,7 +166,7 @@ export default { ...@@ -175,7 +166,7 @@ export default {
> >
<div <div
class="wiki" class="wiki"
:class="descriptionAnimationCss" :class="{ 'issue-realtime-pre-pulse': descriptionFlag.pre, 'issue-realtime-trigger-pulse': descriptionFlag.pulse }"
v-html="description" v-html="description"
ref="issue-content-container-gfm-entry" ref="issue-content-container-gfm-entry"
> >
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment