mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-09 07:47:28 -06:00
[feature] Add domain permission drafts and excludes (#3547)
* [feature] Add domain permission drafts and excludes * fix typescript complaining * lint * make filenames more consistent * test own domain excluded
This commit is contained in:
parent
c2029df9bc
commit
301543616b
69 changed files with 5664 additions and 264 deletions
|
|
@ -30,6 +30,7 @@ import type { MappedDomainPerms } from "../../../lib/types/domain-permission";
|
|||
import { NoArg } from "../../../lib/types/query";
|
||||
import { PermType } from "../../../lib/types/perm";
|
||||
import { useBaseUrl } from "../../../lib/navigation/util";
|
||||
import { useCapitalize } from "../../../lib/util";
|
||||
|
||||
export default function DomainPermissionsOverview() {
|
||||
const baseUrl = useBaseUrl();
|
||||
|
|
@ -42,9 +43,7 @@ export default function DomainPermissionsOverview() {
|
|||
const permType = params.permType.slice(0, -1) as PermType;
|
||||
|
||||
// Uppercase first letter of given permType.
|
||||
const permTypeUpper = useMemo(() => {
|
||||
return permType.charAt(0).toUpperCase() + permType.slice(1);
|
||||
}, [permType]);
|
||||
const permTypeUpper = useCapitalize(permType);
|
||||
|
||||
// Fetch / wait for desired perms to load.
|
||||
const { data: blocks, isLoading: isLoadingBlocks } = useDomainBlocksQuery(NoArg, { skip: permType !== "block" });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue