mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 03:47:40 -07:00
chore(client): tweak client
This commit is contained in:
parent
951dd79b78
commit
f4fd24f72a
2 changed files with 12 additions and 8 deletions
|
@ -5,7 +5,7 @@
|
||||||
<span class="host">{{ instance.name ?? instance.host }}</span>
|
<span class="host">{{ instance.name ?? instance.host }}</span>
|
||||||
<span class="sub _monospace"><b>{{ instance.host }}</b> / {{ instance.softwareName || '?' }} {{ instance.softwareVersion }}</span>
|
<span class="sub _monospace"><b>{{ instance.host }}</b> / {{ instance.softwareName || '?' }} {{ instance.softwareVersion }}</span>
|
||||||
</div>
|
</div>
|
||||||
<MkMiniChart v-if="chart" class="chart" :src="chart.requests.received"/>
|
<MkMiniChart v-if="chartValues" class="chart" :src="chartValues"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -18,10 +18,12 @@ const props = defineProps<{
|
||||||
instance: misskey.entities.Instance;
|
instance: misskey.entities.Instance;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chart = $ref(null);
|
let chartValues = $ref<number | null>(null);
|
||||||
|
|
||||||
os.apiGet('charts/instance', { host: props.instance.host, limit: 16, span: 'day' }).then(res => {
|
os.apiGet('charts/instance', { host: props.instance.host, limit: 16 + 1, span: 'day' }).then(res => {
|
||||||
chart = res;
|
// 今日のぶんの値はまだ途中の値であり、それも含めると大抵の場合前日よりも下降しているようなグラフになってしまうため今日は弾く
|
||||||
|
res.requests.received.splice(0, 1);
|
||||||
|
chartValues = res.requests.received;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<span class="name"><MkUserName class="name" :user="user"/></span>
|
<span class="name"><MkUserName class="name" :user="user"/></span>
|
||||||
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
|
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
|
||||||
</div>
|
</div>
|
||||||
<MkMiniChart v-if="chart" class="chart" :src="chart.inc"/>
|
<MkMiniChart v-if="chartValues" class="chart" :src="chartValues"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -19,10 +19,12 @@ const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chart = $ref(null);
|
let chartValues = $ref<number | null>(null);
|
||||||
|
|
||||||
os.apiGet('charts/user/notes', { userId: props.user.id, limit: 16, span: 'day' }).then(res => {
|
os.apiGet('charts/user/notes', { userId: props.user.id, limit: 16 + 1, span: 'day' }).then(res => {
|
||||||
chart = res;
|
// 今日のぶんの値はまだ途中の値であり、それも含めると大抵の場合前日よりも下降しているようなグラフになってしまうため今日は弾く
|
||||||
|
res.inc.splice(0, 1);
|
||||||
|
chartValues = res.inc;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue