mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-04 23:59:20 +09:00
406b4bdbe7
* refactor(frontend): 非推奨となったReactivity Transformを使わないように * refactor: 不要な括弧を除去 * fix: 不要なアノテーションを除去 * fix: Refの配列をrefしている部分の対応 * refactor: 不要な括弧を除去 * fix: lint * refactor: Ref、ShallowRef、ComputedRefの変数の宣言をletからconstに置換 * fix: type error * chore: drop reactivity transform from eslint configuration * refactor: remove unnecessary import * fix: 対応漏れ
65 lines
1.6 KiB
Vue
65 lines
1.6 KiB
Vue
<!--
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
-->
|
|
|
|
<template>
|
|
<MkContainer>
|
|
<template #icon><i class="ti ti-chart-line"></i></template>
|
|
<template #header>{{ i18n.ts.activity }}</template>
|
|
<template #func="{ buttonStyleClass }">
|
|
<button class="_button" :class="buttonStyleClass" @click="showMenu">
|
|
<i class="ti ti-dots"></i>
|
|
</button>
|
|
</template>
|
|
|
|
<div style="padding: 8px;">
|
|
<MkChart :src="chartSrc" :args="{ user, withoutAll: true }" span="day" :limit="limit" :bar="true" :stacked="true" :detailed="false" :aspectRatio="5"/>
|
|
</div>
|
|
</MkContainer>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue';
|
|
import * as Misskey from 'misskey-js';
|
|
import MkContainer from '@/components/MkContainer.vue';
|
|
import MkChart from '@/components/MkChart.vue';
|
|
import * as os from '@/os.js';
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
const props = withDefaults(defineProps<{
|
|
user: Misskey.entities.User;
|
|
limit?: number;
|
|
}>(), {
|
|
limit: 50,
|
|
});
|
|
|
|
const chartSrc = ref('per-user-notes');
|
|
|
|
function showMenu(ev: MouseEvent) {
|
|
os.popupMenu([{
|
|
text: i18n.ts.notes,
|
|
active: chartSrc.value === 'per-user-notes',
|
|
action: () => {
|
|
chartSrc.value = 'per-user-notes';
|
|
},
|
|
}, {
|
|
text: i18n.ts.numberOfProfileView,
|
|
active: chartSrc.value === 'per-user-pv',
|
|
action: () => {
|
|
chartSrc.value = 'per-user-pv';
|
|
},
|
|
}, /*, {
|
|
text: i18n.ts.following,
|
|
action: () => {
|
|
chartSrc = 'per-user-following';
|
|
}
|
|
}, {
|
|
text: i18n.ts.followers,
|
|
action: () => {
|
|
chartSrc = 'per-user-followers';
|
|
}
|
|
}*/], ev.currentTarget ?? ev.target);
|
|
}
|
|
</script>
|