[Glitch] Add wrapstodon to initial state and show wrapstodon sidebar item on load
Port 550a6d4765e5af144052b9fb6cdc5d3a4e958a87 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
780fefa700
commit
3cd033df0c
@ -2,6 +2,11 @@ import type { ApiAccountJSON } from './api_types/accounts';
|
|||||||
|
|
||||||
type InitialStateLanguage = [code: string, name: string, localName: string];
|
type InitialStateLanguage = [code: string, name: string, localName: string];
|
||||||
|
|
||||||
|
interface InitialWrapstodonState {
|
||||||
|
year: number;
|
||||||
|
state: 'available' | 'generating' | 'eligible' | 'ineligible';
|
||||||
|
}
|
||||||
|
|
||||||
interface InitialStateMeta {
|
interface InitialStateMeta {
|
||||||
access_token: string;
|
access_token: string;
|
||||||
advanced_layout?: boolean;
|
advanced_layout?: boolean;
|
||||||
@ -49,6 +54,7 @@ interface InitialStateMeta {
|
|||||||
status_page_url: string;
|
status_page_url: string;
|
||||||
terms_of_service_enabled: boolean;
|
terms_of_service_enabled: boolean;
|
||||||
emoji_style?: string;
|
emoji_style?: string;
|
||||||
|
wrapstodon?: InitialWrapstodonState | null;
|
||||||
default_content_type: string;
|
default_content_type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,6 +161,7 @@ export const criticalUpdatesPending = initialState?.critical_updates_pending;
|
|||||||
export const statusPageUrl = getMeta('status_page_url');
|
export const statusPageUrl = getMeta('status_page_url');
|
||||||
export const sso_redirect = getMeta('sso_redirect');
|
export const sso_redirect = getMeta('sso_redirect');
|
||||||
export const termsOfServiceEnabled = getMeta('terms_of_service_enabled');
|
export const termsOfServiceEnabled = getMeta('terms_of_service_enabled');
|
||||||
|
export const wrapstodon = getMeta('wrapstodon');
|
||||||
|
|
||||||
const displayNames =
|
const displayNames =
|
||||||
// Intl.DisplayNames can be undefined in old browsers
|
// Intl.DisplayNames can be undefined in old browsers
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user