merge: Feat: Implement "Show Below Avatar" for Avatar Decorations (!645)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/645 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
ac1e5a0fb5
12 changed files with 36 additions and 1 deletions
|
|
@ -525,6 +525,7 @@ export class UserEntityService implements OnModuleInit {
|
|||
flipH: ud.flipH || undefined,
|
||||
offsetX: ud.offsetX || undefined,
|
||||
offsetY: ud.offsetY || undefined,
|
||||
showBelow: ud.showBelow || undefined,
|
||||
url: decorations.find(d => d.id === ud.id)!.url,
|
||||
}))) : [],
|
||||
isBot: user.isBot,
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ export class MiUser {
|
|||
flipH?: boolean;
|
||||
offsetX?: number;
|
||||
offsetY?: number;
|
||||
showBelow?: boolean;
|
||||
}[];
|
||||
|
||||
@Index()
|
||||
|
|
|
|||
|
|
@ -104,6 +104,10 @@ export const packedUserLiteSchema = {
|
|||
type: 'number',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
showBelow: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ export const paramDef = {
|
|||
flipH: { type: 'boolean', nullable: true },
|
||||
offsetX: { type: 'number', nullable: true, maximum: 0.25, minimum: -0.25 },
|
||||
offsetY: { type: 'number', nullable: true, maximum: 0.25, minimum: -0.25 },
|
||||
showBelow: { type: 'boolean', nullable: true },
|
||||
},
|
||||
required: ['id'],
|
||||
} },
|
||||
|
|
@ -417,6 +418,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
flipH: d.flipH ?? false,
|
||||
offsetX: d.offsetX ?? 0,
|
||||
offsetY: d.offsetY ?? 0,
|
||||
showBelow: d.showBelow ?? false,
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue