Browse Source

Update annotation template

pull/10/head
Hironsan 6 years ago
parent
commit
84603d7449
2 changed files with 17 additions and 1 deletions
  1. 16
      doccano/app/server/static/annotation.1.js
  2. 2
      doccano/app/server/templates/annotation.1.html

16
doccano/app/server/static/annotation.1.js

@ -143,6 +143,22 @@ var vm = new Vue({
computed: {
done: function () {
return this.total - this.remaining
},
achievement: function () {
if (this.total == 0) {
return 0;
} else {
return (this.total - this.remaining) / this.total * 100
}
},
progressColor: function () {
if (this.achievement < 30) {
return 'is-danger'
} else if (this.achievement < 70) {
return 'is-warning'
} else {
return 'is-primary'
}
}
}
});

2
doccano/app/server/templates/annotation.1.html

@ -14,7 +14,7 @@
</p>
<ul class="menu-list">
<li>
<progress class="progress is-primary" value="15" max="100">30%</progress>
<progress class="progress" v-bind:class="progressColor" v-bind:value="achievement" max="100">30%</progress>
</li>
</ul>

Loading…
Cancel
Save