[Glitch] Add wrapstodon to initial state and show wrapstodon sidebar item on load

Port 550a6d4765 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire
2025-12-16 10:47:18 +01:00
parent 780fefa700
commit 3cd033df0c

View File

@@ -2,6 +2,11 @@ import type { ApiAccountJSON } from './api_types/accounts';
type InitialStateLanguage = [code: string, name: string, localName: string];
interface InitialWrapstodonState {
year: number;
state: 'available' | 'generating' | 'eligible' | 'ineligible';
}
interface InitialStateMeta {
access_token: string;
advanced_layout?: boolean;
@@ -49,6 +54,7 @@ interface InitialStateMeta {
status_page_url: string;
terms_of_service_enabled: boolean;
emoji_style?: string;
wrapstodon?: InitialWrapstodonState | null;
default_content_type: string;
}
@@ -155,6 +161,7 @@ export const criticalUpdatesPending = initialState?.critical_updates_pending;
export const statusPageUrl = getMeta('status_page_url');
export const sso_redirect = getMeta('sso_redirect');
export const termsOfServiceEnabled = getMeta('terms_of_service_enabled');
export const wrapstodon = getMeta('wrapstodon');
const displayNames =
// Intl.DisplayNames can be undefined in old browsers