merge: Instance admin UX improvements (!1059)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1059 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
8894578b2a
13 changed files with 649 additions and 237 deletions
|
|
@ -94,6 +94,15 @@ export class UtilityService {
|
|||
return this.meta.bubbleInstances.some(x => `.${host.toLowerCase()}`.endsWith(`.${x}`));
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public isBubbledHost(host: string | null): boolean {
|
||||
if (host == null) return false;
|
||||
|
||||
// TODO remove null conditional after merging lab/persisted-instance-blocks
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
return this.meta.bubbleInstances?.includes(host);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public concatNoteContentsForKeyWordCheck(content: {
|
||||
cw?: string | null;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ export class InstanceEntityService {
|
|||
rejectReports: instance.rejectReports,
|
||||
rejectQuotes: instance.rejectQuotes,
|
||||
moderationNote: iAmModerator ? instance.moderationNote : null,
|
||||
isBubbled: this.utilityService.isBubbledHost(instance.host),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue