nanka iroiro (#6853)
* wip * Update maps.ts * wip * wip * wip * wip * Update base.vue * wip * wip * wip * wip * Update link.vue * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update privacy.vue * wip * wip * wip * wip * Update range.vue * wip * wip * wip * wip * Update profile.vue * wip * Update a.vue * Update index.vue * wip * Update sidebar.vue * wip * wip * Update account-info.vue * Update a.vue * wip * wip * Update sounds.vue * wip * wip * wip * wip * wip * wip * wip * wip * Update account-info.vue * Update account-info.vue * wip * wip * wip * Update d-persimmon.json5 * wip
This commit is contained in:
@ -32,8 +32,8 @@ export default class DriveChart extends Chart<DriveLog> {
|
||||
const [localCount, remoteCount, localSize, remoteSize] = await Promise.all([
|
||||
DriveFiles.count({ userHost: null }),
|
||||
DriveFiles.count({ userHost: Not(IsNull()) }),
|
||||
DriveFiles.clacDriveUsageOfLocal(),
|
||||
DriveFiles.clacDriveUsageOfRemote()
|
||||
DriveFiles.calcDriveUsageOfLocal(),
|
||||
DriveFiles.calcDriveUsageOfRemote()
|
||||
]);
|
||||
|
||||
return {
|
||||
|
@ -51,7 +51,7 @@ export default class InstanceChart extends Chart<InstanceLog> {
|
||||
Followings.count({ followerHost: group }),
|
||||
Followings.count({ followeeHost: group }),
|
||||
DriveFiles.count({ userHost: group }),
|
||||
DriveFiles.clacDriveUsageOfHost(group),
|
||||
DriveFiles.calcDriveUsageOfHost(group),
|
||||
]);
|
||||
|
||||
return {
|
||||
|
@ -24,7 +24,7 @@ export default class PerUserDriveChart extends Chart<PerUserDriveLog> {
|
||||
protected async fetchActual(group: string): Promise<DeepPartial<PerUserDriveLog>> {
|
||||
const [count, size] = await Promise.all([
|
||||
DriveFiles.count({ userId: group }),
|
||||
DriveFiles.clacDriveUsageOf(group)
|
||||
DriveFiles.calcDriveUsageOf(group)
|
||||
]);
|
||||
|
||||
return {
|
||||
|
@ -334,7 +334,7 @@ export default async function(
|
||||
|
||||
//#region Check drive usage
|
||||
if (user && !isLink) {
|
||||
const usage = await DriveFiles.clacDriveUsageOf(user);
|
||||
const usage = await DriveFiles.calcDriveUsageOf(user);
|
||||
|
||||
const instance = await fetchMeta();
|
||||
const driveCapacity = 1024 * 1024 * (Users.isLocalUser(user) ? instance.localDriveCapacityMb : instance.remoteDriveCapacityMb);
|
||||
|
Reference in New Issue
Block a user