You've already forked AstralRinth
feat: pride 2026 frontend (#6205)
* feat: pride 2026 banner app sidebar * feat: use ProgressBar component * feat: pride skins * feat: pride skins * feat: blog post * fix: blogpost * fix: pride skin condition * fix: types * fix: show logic * fix: qa * fix: lint * fix: unused var
This commit is contained in:
@@ -18,6 +18,7 @@ import { LabrinthAnalyticsV3Module } from './labrinth/analytics/v3'
|
||||
import { LabrinthAuthInternalModule } from './labrinth/auth/internal'
|
||||
import { LabrinthAuthV2Module } from './labrinth/auth/v2'
|
||||
import { LabrinthBillingInternalModule } from './labrinth/billing/internal'
|
||||
import { LabrinthCampaignInternalModule } from './labrinth/campaign/internal'
|
||||
import { LabrinthCollectionsModule } from './labrinth/collections'
|
||||
import { LabrinthExternalProjectsInternalModule } from './labrinth/external-projects/internal'
|
||||
import { LabrinthGlobalsInternalModule } from './labrinth/globals/internal'
|
||||
@@ -80,6 +81,7 @@ export const MODULE_REGISTRY = {
|
||||
labrinth_auth_internal: LabrinthAuthInternalModule,
|
||||
labrinth_auth_v2: LabrinthAuthV2Module,
|
||||
labrinth_billing_internal: LabrinthBillingInternalModule,
|
||||
labrinth_campaign_internal: LabrinthCampaignInternalModule,
|
||||
labrinth_collections: LabrinthCollectionsModule,
|
||||
labrinth_external_projects_internal: LabrinthExternalProjectsInternalModule,
|
||||
labrinth_globals_internal: LabrinthGlobalsInternalModule,
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { AbstractModule } from '../../../core/abstract-module'
|
||||
import type { Labrinth } from '../types'
|
||||
|
||||
export class LabrinthCampaignInternalModule extends AbstractModule {
|
||||
public getModuleID(): string {
|
||||
return 'labrinth_campaign_internal'
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Pride 2026 campaign fundraising progress.
|
||||
* GET /_internal/campaign/pride-26
|
||||
*/
|
||||
public async getPride26(): Promise<Labrinth.Campaign.Internal.CampaignInfo> {
|
||||
return this.client.request<Labrinth.Campaign.Internal.CampaignInfo>('/campaign/pride-26', {
|
||||
api: 'labrinth',
|
||||
version: 'internal',
|
||||
method: 'GET',
|
||||
skipAuth: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,17 @@
|
||||
import type { RawDecimal } from '../../utils/types'
|
||||
import type { ISO3166 } from '../iso3166/types'
|
||||
|
||||
export namespace Labrinth {
|
||||
export namespace Campaign {
|
||||
export namespace Internal {
|
||||
export type CampaignInfo = {
|
||||
total_donations_usd: RawDecimal
|
||||
target_usd: RawDecimal
|
||||
num_donators: number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Billing {
|
||||
export namespace Internal {
|
||||
export type PriceDuration = 'five-days' | 'monthly' | 'quarterly' | 'yearly'
|
||||
@@ -1025,6 +1036,7 @@ export namespace Labrinth {
|
||||
icon_url: string | null
|
||||
color: number | null
|
||||
members: Projects.v3.TeamMember[]
|
||||
moderation_notes?: Users.Common.ModerationNote | null
|
||||
}
|
||||
|
||||
export type CreateOrganizationRequest = {
|
||||
@@ -1249,7 +1261,7 @@ export namespace Labrinth {
|
||||
}
|
||||
|
||||
export namespace Users {
|
||||
namespace Common {
|
||||
export namespace Common {
|
||||
export type Role = 'developer' | 'moderator' | 'admin'
|
||||
|
||||
export type AuthProvider =
|
||||
@@ -1267,6 +1279,15 @@ export namespace Labrinth {
|
||||
venmo_handle?: string
|
||||
balance: number
|
||||
}
|
||||
|
||||
export type ModerationNote = {
|
||||
notes: string
|
||||
last_modified: string
|
||||
created_at: string
|
||||
last_author: string
|
||||
user_rating: number
|
||||
version: number
|
||||
}
|
||||
}
|
||||
|
||||
export namespace v2 {
|
||||
@@ -1316,6 +1337,7 @@ export namespace Labrinth {
|
||||
created: string
|
||||
role: Role
|
||||
badges: number
|
||||
campaigns: UserCampaigns
|
||||
auth_providers?: AuthProvider[]
|
||||
email?: string
|
||||
email_verified?: boolean
|
||||
@@ -1324,7 +1346,7 @@ export namespace Labrinth {
|
||||
payout_data?: UserPayoutData
|
||||
stripe_customer_id?: string
|
||||
allow_friend_requests?: boolean
|
||||
campaigns: UserCampaigns
|
||||
moderation_notes?: Common.ModerationNote | null
|
||||
github_id?: number
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,18 @@ export class LabrinthUsersV3Module extends AbstractModule {
|
||||
return 'labrinth_users_v3'
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the authenticated user.
|
||||
* GET /v3/user
|
||||
*/
|
||||
public async getAuthenticated(): Promise<Labrinth.Users.v3.User> {
|
||||
return this.client.request<Labrinth.Users.v3.User>('/user', {
|
||||
api: 'labrinth',
|
||||
version: 3,
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a user by ID or username
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user