1
0
forked from mirror/misskey

chore(client): tweak client

This commit is contained in:
syuilo 2022-06-26 15:54:07 +09:00
parent c27d9e11b4
commit 311478e725
2 changed files with 12 additions and 8 deletions

View File

@ -5,7 +5,7 @@
<span class="host">{{ instance.name ?? instance.host }}</span>
<span class="sub _monospace"><b>{{ instance.host }}</b> / {{ instance.softwareName || '?' }} {{ instance.softwareVersion }}</span>
</div>
<MkMiniChart v-if="chart" class="chart" :src="chart.requests.received"/>
<MkMiniChart v-if="chartValues" class="chart" :src="chartValues"/>
</div>
</template>
@ -18,10 +18,12 @@ const props = defineProps<{
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 => {
chart = res;
os.apiGet('charts/instance', { host: props.instance.host, limit: 16 + 1, span: 'day' }).then(res => {
//
res.requests.received.splice(0, 1);
chartValues = res.requests.received;
});
</script>

View File

@ -5,7 +5,7 @@
<span class="name"><MkUserName class="name" :user="user"/></span>
<span class="sub"><span class="acct _monospace">@{{ acct(user) }}</span></span>
</div>
<MkMiniChart v-if="chart" class="chart" :src="chart.inc"/>
<MkMiniChart v-if="chartValues" class="chart" :src="chartValues"/>
</div>
</template>
@ -19,10 +19,12 @@ const props = defineProps<{
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 => {
chart = res;
os.apiGet('charts/user/notes', { userId: props.user.id, limit: 16 + 1, span: 'day' }).then(res => {
//
res.inc.splice(0, 1);
chartValues = res.inc;
});
</script>