diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-08-30 17:37:11 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-08-30 17:37:11 +0900 |
| commit | 631ff6e49048c729c3d71db0e3170d1dec4196fe (patch) | |
| tree | 06e0f2e0e5c954ae24bcf6829892c831f7cf259c /src/web/app/common | |
| parent | [Client] Fix bug (diff) | |
| download | sharkey-631ff6e49048c729c3d71db0e3170d1dec4196fe.tar.gz sharkey-631ff6e49048c729c3d71db0e3170d1dec4196fe.tar.bz2 sharkey-631ff6e49048c729c3d71db0e3170d1dec4196fe.zip | |
:v:
Diffstat (limited to 'src/web/app/common')
| -rw-r--r-- | src/web/app/common/tags/index.js | 1 | ||||
| -rw-r--r-- | src/web/app/common/tags/weekly-activity-chart.tag | 49 |
2 files changed, 0 insertions, 50 deletions
diff --git a/src/web/app/common/tags/index.js b/src/web/app/common/tags/index.js index 6e6081da9b..35a9f4586e 100644 --- a/src/web/app/common/tags/index.js +++ b/src/web/app/common/tags/index.js @@ -27,5 +27,4 @@ require('./activity-table.tag'); require('./reaction-picker.tag'); require('./reactions-viewer.tag'); require('./reaction-icon.tag'); -require('./weekly-activity-chart.tag'); require('./post-menu.tag'); diff --git a/src/web/app/common/tags/weekly-activity-chart.tag b/src/web/app/common/tags/weekly-activity-chart.tag deleted file mode 100644 index d9c6c4bd1c..0000000000 --- a/src/web/app/common/tags/weekly-activity-chart.tag +++ /dev/null @@ -1,49 +0,0 @@ -<mk-weekly-activity-chart> - <svg if={ data } ref="canvas" viewBox="0 0 7 1" preserveAspectRatio="none"> - <g each={ d, i in data.reverse() }> - <rect width="0.8" riot-height={ d.postsH } - riot-x={ i + 0.1 } riot-y={ 1 - d.postsH - d.repliesH - d.repostsH } - fill="#41ddde"/> - <rect width="0.8" riot-height={ d.repliesH } - riot-x={ i + 0.1 } riot-y={ 1 - d.repliesH - d.repostsH } - fill="#f7796c"/> - <rect width="0.8" riot-height={ d.repostsH } - riot-x={ i + 0.1 } riot-y={ 1 - d.repostsH } - fill="#a1de41"/> - </g> - </svg> - <style> - :scope - display block - max-width 600px - margin 0 auto - - > svg - display block - - > rect - transform-origin center - - </style> - <script> - this.mixin('api'); - - this.user = this.opts.user; - - this.on('mount', () => { - this.api('aggregation/users/activity', { - user_id: this.user.id, - limit: 7 - }).then(data => { - data.forEach(d => d.total = d.posts + d.replies + d.reposts); - this.peak = Math.max.apply(null, data.map(d => d.total)); - data.forEach(d => { - d.postsH = d.posts / this.peak; - d.repliesH = d.replies / this.peak; - d.repostsH = d.reposts / this.peak; - }); - this.update({ data }); - }); - }); - </script> -</mk-weekly-activity-chart> |