mirror of
https://github.com/YuzuZensai/VRC-Circle.git
synced 2026-09-14 03:10:01 +00:00
✨ feat: Groups info page and store
This commit is contained in:
@@ -4,6 +4,7 @@ import type {
|
||||
FavoritedWorld,
|
||||
LimitedUserGroups,
|
||||
RepresentedGroup,
|
||||
Group as SdkGroup,
|
||||
User,
|
||||
CurrentUser,
|
||||
LimitedUserFriend,
|
||||
@@ -208,6 +209,29 @@ export function toGroup(raw: LimitedUserGroups | RepresentedGroup): Group {
|
||||
};
|
||||
}
|
||||
|
||||
export function toGroupDetail(raw: SdkGroup): Group {
|
||||
return {
|
||||
id: raw.id ?? "",
|
||||
detailed: true,
|
||||
name: raw.name ?? "",
|
||||
shortCode: raw.shortCode ?? undefined,
|
||||
description: raw.description || undefined,
|
||||
iconUrl: raw.iconUrl ?? undefined,
|
||||
bannerUrl: raw.bannerUrl ?? undefined,
|
||||
ownerId: raw.ownerId ?? undefined,
|
||||
memberCount: raw.memberCount,
|
||||
privacy: raw.privacy ?? undefined,
|
||||
onlineMemberCount: raw.onlineMemberCount,
|
||||
joinState: raw.joinState ?? undefined,
|
||||
isVerified: raw.isVerified ?? undefined,
|
||||
rules: raw.rules || undefined,
|
||||
languages: raw.languages ?? undefined,
|
||||
links: raw.links ?? undefined,
|
||||
tags: raw.tags ?? undefined,
|
||||
createdAt: toIso(raw.createdAt as unknown as string),
|
||||
};
|
||||
}
|
||||
|
||||
function platformsOf(pkgs: ReadonlyArray<{ platform: string }>): WorldPlatforms {
|
||||
let pc = false;
|
||||
let android = false;
|
||||
|
||||
Reference in New Issue
Block a user