mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-25 03:47:07 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user