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:
syuilo 2020-11-25 21:31:34 +09:00 committed by GitHub
parent 7660839e40
commit 0144408500
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
106 changed files with 4489 additions and 1734 deletions

View file

@ -77,7 +77,7 @@ export class Meta {
public blockedHosts: string[];
@Column('varchar', {
length: 512, array: true, default: '{"/announcements", "/featured", "/channels", "/explore", "/games/reversi", "/about-misskey"}'
length: 512, array: true, default: '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}'
})
public pinnedPages: string[];
@ -94,6 +94,18 @@ export class Meta {
})
public bannerUrl: string | null;
@Column('varchar', {
length: 512,
nullable: true
})
public backgroundImageUrl: string | null;
@Column('varchar', {
length: 512,
nullable: true
})
public logoImageUrl: string | null;
@Column('varchar', {
length: 512,
nullable: true,

View file

@ -35,6 +35,8 @@ export class NoteReaction {
@JoinColumn()
public note: Note | null;
// TODO: 対象noteのuserIdを非正規化したい(「受け取ったリアクション一覧」のようなものを(JOIN無しで)実装したいため)
@Column('varchar', {
length: 260
})

View file

@ -111,6 +111,12 @@ export class UserProfile {
})
public autoAcceptFollowed: boolean;
@Column('boolean', {
default: false,
comment: 'Whether reject index by crawler.'
})
public noCrawle: boolean;
@Column('boolean', {
default: false,
})

View file

@ -48,7 +48,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
return thumbnail ? (file.thumbnailUrl || (isImage ? (file.webpublicUrl || file.url) : null)) : (file.webpublicUrl || file.url);
}
public async clacDriveUsageOf(user: User['id'] | User): Promise<number> {
public async calcDriveUsageOf(user: User['id'] | User): Promise<number> {
const id = typeof user === 'object' ? user.id : user;
const { sum } = await this
@ -60,7 +60,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
return parseInt(sum, 10) || 0;
}
public async clacDriveUsageOfHost(host: string): Promise<number> {
public async calcDriveUsageOfHost(host: string): Promise<number> {
const { sum } = await this
.createQueryBuilder('file')
.where('file.userHost = :host', { host: toPuny(host) })
@ -70,7 +70,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
return parseInt(sum, 10) || 0;
}
public async clacDriveUsageOfLocal(): Promise<number> {
public async calcDriveUsageOfLocal(): Promise<number> {
const { sum } = await this
.createQueryBuilder('file')
.where('file.userHost IS NULL')
@ -80,7 +80,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
return parseInt(sum, 10) || 0;
}
public async clacDriveUsageOfRemote(): Promise<number> {
public async calcDriveUsageOfRemote(): Promise<number> {
const { sum } = await this
.createQueryBuilder('file')
.where('file.userHost IS NOT NULL')

View file

@ -239,6 +239,7 @@ export class UserRepository extends Repository<User> {
alwaysMarkNsfw: profile!.alwaysMarkNsfw,
carefulBot: profile!.carefulBot,
autoAcceptFollowed: profile!.autoAcceptFollowed,
noCrawle: profile!.noCrawle,
hasUnreadSpecifiedNotes: NoteUnreads.count({
where: { userId: user.id, isSpecified: true },
take: 1