summaryrefslogtreecommitdiff
path: root/src/client/widgets/trends.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-07-11 10:13:11 +0900
committerGitHub <noreply@github.com>2020-07-11 10:13:11 +0900
commitcf3fc97202588e835ade5d6ab1a3c087e46958ad (patch)
treeb3fe472b455bf913a47df4d41b1363c7122bf1d9 /src/client/widgets/trends.vue
parentタイムライン上でTwitterウィジットを展開できるようにな... (diff)
downloadmisskey-cf3fc97202588e835ade5d6ab1a3c087e46958ad.tar.gz
misskey-cf3fc97202588e835ade5d6ab1a3c087e46958ad.tar.bz2
misskey-cf3fc97202588e835ade5d6ab1a3c087e46958ad.zip
Deck (#6504)
* 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
Diffstat (limited to 'src/client/widgets/trends.vue')
-rw-r--r--src/client/widgets/trends.vue39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/client/widgets/trends.vue b/src/client/widgets/trends.vue
index 61f5bfbd32..d4a4b2d289 100644
--- a/src/client/widgets/trends.vue
+++ b/src/client/widgets/trends.vue
@@ -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;