|
1 | 1 | <script lang="ts"> |
2 | 2 | import KaiOS from 'kaios-lib'; |
| 3 | + import numeral from 'numeral'; |
3 | 4 | import Card from 'onyx-ui/components/card/Card.svelte'; |
4 | 5 | import CardContent from 'onyx-ui/components/card/CardContent.svelte'; |
5 | 6 | import CardHeader from 'onyx-ui/components/card/CardHeader.svelte'; |
| 7 | + import Icon from 'onyx-ui/components/icon/Icon.svelte'; |
6 | 8 | import Typography from 'onyx-ui/components/Typography.svelte'; |
7 | 9 | import View from 'onyx-ui/components/view/View.svelte'; |
8 | 10 | import ViewContent from 'onyx-ui/components/view/ViewContent.svelte'; |
9 | 11 | import { Priority } from 'onyx-ui/enums'; |
10 | 12 | import { KeyManager } from 'onyx-ui/services'; |
11 | 13 | import { registerView, view } from 'onyx-ui/stores/view'; |
12 | 14 | import { onDestroy } from 'svelte'; |
| 15 | + import MdComment from 'svelte-icons/md/MdComment.svelte'; |
| 16 | + import MdFavorite from 'svelte-icons/md/MdFavorite.svelte'; |
| 17 | + import MdPlayArrow from 'svelte-icons/md/MdPlayArrow.svelte'; |
| 18 | + import MdRepeat from 'svelte-icons/md/MdRepeat.svelte'; |
13 | 19 | import { replace } from 'svelte-spa-router'; |
14 | 20 | import { pause, play, skip, skipTo } from '../components/AudioPlayer.svelte'; |
15 | 21 | import Waveform from '../components/Waveform.svelte'; |
|
96 | 102 | <Typography type="titleSmall" align="center" |
97 | 103 | >{$player.track.user.full_name || $player.track.user.username}</Typography |
98 | 104 | > |
| 105 | + <div class="stats"> |
| 106 | + <div class="item"> |
| 107 | + <Icon><MdPlayArrow /></Icon>{numeral($player.track.playback_count).format('0.0a')} |
| 108 | + </div> |
| 109 | + <div class="item"> |
| 110 | + <Icon><MdFavorite /></Icon>{numeral($player.track.favoritings_count).format('0.0a')} |
| 111 | + </div> |
| 112 | + <div class="item"> |
| 113 | + <Icon><MdRepeat /></Icon>{numeral($player.track.reposts_count).format('0a')} |
| 114 | + </div> |
| 115 | + <div class="item"> |
| 116 | + <Icon><MdComment /></Icon>{numeral($player.track.comment_count).format('0a')} |
| 117 | + </div> |
| 118 | + </div> |
99 | 119 | </CardContent> |
100 | 120 | </Card> |
101 | 121 | {/if} |
|
109 | 129 | font-weight: 600; |
110 | 130 | color: var(--accent-color); |
111 | 131 | } |
| 132 | +
|
| 133 | + .stats { |
| 134 | + display: flex; |
| 135 | + justify-content: space-between; |
| 136 | + padding: 10px; |
| 137 | + } |
| 138 | + .stats > .item { |
| 139 | + display: flex; |
| 140 | + flex-direction: column; |
| 141 | + align-items: center; |
| 142 | + } |
112 | 143 | </style> |
0 commit comments