* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo
2020-07-11 10:13:11 +09:00
committed by GitHub
parent 5b28d7bf90
commit cf3fc97202
56 changed files with 2695 additions and 907 deletions

View File

@@ -1,22 +1,20 @@
<template>
<div>
<mk-container :show-header="!props.compact">
<template #header><fa :icon="faHashtag"/>{{ $t('_widgets.trends') }}</template>
<mk-container :show-header="props.showHeader">
<template #header><fa :icon="faHashtag"/>{{ $t('_widgets.trends') }}</template>
<div class="wbrkwala">
<mk-loading v-if="fetching"/>
<transition-group tag="div" name="chart" class="tags" v-else>
<div v-for="stat in stats" :key="stat.tag">
<div class="tag">
<router-link class="a" :to="`/tags/${ encodeURIComponent(stat.tag) }`" :title="stat.tag">#{{ stat.tag }}</router-link>
<p>{{ $t('nUsersMentioned', { n: stat.usersCount }) }}</p>
</div>
<x-chart class="chart" :src="stat.chart"/>
<div class="wbrkwala">
<mk-loading v-if="fetching"/>
<transition-group tag="div" name="chart" class="tags" v-else>
<div v-for="stat in stats" :key="stat.tag">
<div class="tag">
<router-link class="a" :to="`/tags/${ encodeURIComponent(stat.tag) }`" :title="stat.tag">#{{ stat.tag }}</router-link>
<p>{{ $t('nUsersMentioned', { n: stat.usersCount }) }}</p>
</div>
</transition-group>
</div>
</mk-container>
</div>
<x-chart class="chart" :src="stat.chart"/>
</div>
</transition-group>
</div>
</mk-container>
</template>
<script lang="ts">
@@ -28,7 +26,10 @@ import XChart from './trends.chart.vue';
export default define({
name: 'hashtags',
props: () => ({
compact: false
showHeader: {
type: 'boolean',
default: true,
},
})
}).extend({
components: {
@@ -49,10 +50,6 @@ export default define({
clearInterval(this.clock);
},
methods: {
func() {
this.props.compact = !this.props.compact;
this.save();
},
fetch() {
this.$root.api('hashtags/trend').then(stats => {
this.stats = stats;