fix(frontend): アクティビティウィジェットのグラフモードが動作しない問題を修正
This commit is contained in:
parent
0f8c068e84
commit
2c6cefd1ac
|
@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { onMounted, ref } from 'vue';
|
||||
const props = defineProps<{
|
||||
activity: {
|
||||
total: number;
|
||||
|
@ -94,6 +94,10 @@ function render() {
|
|||
pointsTotal.value = activity.map((d, i) => `${(i * zoom.value) + pos.value},${(1 - (d.total / peak)) * viewBoxY.value}`).join(' ');
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
render();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
|
|
@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkContainer :showHeader="widgetProps.showHeader" :naked="widgetProps.transparent" data-cy-mkw-activity class="mkw-activity">
|
||||
<template #icon><i class="ti ti-chart-line"></i></template>
|
||||
<template #header>{{ i18n.ts._widgets.activity }}</template>
|
||||
<template #func="{ buttonStyleClass }"><button class="_button" :class="buttonStyleClass" @click="toggleView()"><i class="ti ti-selector"></i></button></template>
|
||||
<template #func="{ buttonStyleClass }"><button class="_button" :class="buttonStyleClass" @click="toggleView()"><i :class="widgetProps.view === 0 ? 'ti ti-chart-line' : 'ti ti-activity'"></i></button></template>
|
||||
|
||||
<div>
|
||||
<MkLoading v-if="fetching"/>
|
||||
|
|
Loading…
Reference in New Issue