diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-02-15 05:08:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-15 05:08:59 +0900 |
| commit | 53422ffcb296be404c0f3ef7e175bedecca4fb4d (patch) | |
| tree | 39cb47b43edd8b8265bb9ad48becdea2666f8881 /src/client/app/mobile/views/components | |
| parent | Update README.md [AUTOGEN] (#4253) (diff) | |
| download | sharkey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.tar.gz sharkey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.tar.bz2 sharkey-53422ffcb296be404c0f3ef7e175bedecca4fb4d.zip | |
Improve desktop UX (#4262)
* wip
* wip
* wip
* wip
* wip
* wip
* Merge
* wip
* wip
* wip
* wip
* wip
* wip
Diffstat (limited to 'src/client/app/mobile/views/components')
| -rw-r--r-- | src/client/app/mobile/views/components/activity.vue | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/src/client/app/mobile/views/components/activity.vue b/src/client/app/mobile/views/components/activity.vue deleted file mode 100644 index f06dddfc46..0000000000 --- a/src/client/app/mobile/views/components/activity.vue +++ /dev/null @@ -1,108 +0,0 @@ -<template> -<div class="mk-activity"> - <div ref="chart"></div> -</div> -</template> - -<script lang="ts"> -import Vue from 'vue'; -import ApexCharts from 'apexcharts'; - -export default Vue.extend({ - props: ['user'], - data() { - return { - fetching: true, - data: [], - peak: null - }; - }, - mounted() { - this.$root.api('charts/user/notes', { - userId: this.user.id, - span: 'day', - limit: 21 - }).then(stats => { - const normal = []; - const reply = []; - const renote = []; - - const now = new Date(); - const y = now.getFullYear(); - const m = now.getMonth(); - const d = now.getDate(); - - for (let i = 0; i < 21; i++) { - const x = new Date(y, m, d - i); - normal.push([ - x, - stats.diffs.normal[i] - ]); - reply.push([ - x, - stats.diffs.reply[i] - ]); - renote.push([ - x, - stats.diffs.renote[i] - ]); - } - - const chart = new ApexCharts(this.$refs.chart, { - chart: { - type: 'bar', - stacked: true, - height: 100, - sparkline: { - enabled: true - }, - }, - plotOptions: { - bar: { - columnWidth: '90%' - } - }, - grid: { - clipMarkers: false, - padding: { - top: 0, - right: 8, - bottom: 0, - left: 8 - } - }, - tooltip: { - shared: true, - intersect: false - }, - series: [{ - name: 'Normal', - data: normal - }, { - name: 'Reply', - data: reply - }, { - name: 'Renote', - data: renote - }], - xaxis: { - type: 'datetime', - crosshairs: { - width: 1, - opacity: 1 - } - } - }); - - chart.render(); - }); - } -}); -</script> - -<style lang="stylus" scoped> -.mk-activity - max-width 600px - margin 0 auto - -</style> |