Rename application ID
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
8fff46e0e3
commit
68292e72b7
5 changed files with 15 additions and 4 deletions
|
@ -11,7 +11,7 @@
|
||||||
<%- snippets %>
|
<%- snippets %>
|
||||||
</head>
|
</head>
|
||||||
<body class="theme-mode-light no-reduce-motion">
|
<body class="theme-mode-light no-reduce-motion">
|
||||||
<div id="soapbox" class="h-full">
|
<div id="bigbuffet" class="h-full">
|
||||||
<div class="loading-indicator-wrapper">
|
<div class="loading-indicator-wrapper">
|
||||||
<div class="loading-indicator">
|
<div class="loading-indicator">
|
||||||
<div class="loading-indicator__container">
|
<div class="loading-indicator__container">
|
||||||
|
|
|
@ -22,7 +22,7 @@ const Portal: React.FC<IPortal> = ({ children }) => {
|
||||||
return (
|
return (
|
||||||
ReactDOM.createPortal(
|
ReactDOM.createPortal(
|
||||||
children,
|
children,
|
||||||
document.getElementById('soapbox') as HTMLDivElement,
|
document.getElementById('bigbuffet') as HTMLDivElement,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,7 +50,7 @@ const TestApp: FC<any> = ({ children, storeProps, routerProps = {} }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id='soapbox'>
|
<div id='bigbuffet'>
|
||||||
<Provider store={props.store}>
|
<Provider store={props.store}>
|
||||||
<MemoryRouter {...routerProps}>
|
<MemoryRouter {...routerProps}>
|
||||||
<StatProvider>
|
<StatProvider>
|
||||||
|
|
|
@ -33,7 +33,7 @@ if (BuildConfig.NODE_ENV === 'production') {
|
||||||
}
|
}
|
||||||
|
|
||||||
ready(() => {
|
ready(() => {
|
||||||
const container = document.getElementById('soapbox') as HTMLElement;
|
const container = document.getElementById('bigbuffet') as HTMLElement;
|
||||||
const root = createRoot(container);
|
const root = createRoot(container);
|
||||||
|
|
||||||
root.render(<Soapbox />);
|
root.render(<Soapbox />);
|
||||||
|
|
|
@ -132,6 +132,16 @@ const fixTakahe = (instance: ImmutableMap<string, any>) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fixBigBuffet = (instance: ImmutableMap<string, any>) => {
|
||||||
|
const version: string = instance.get('version', '');
|
||||||
|
|
||||||
|
if (version.includes('+bigbuffet')) {
|
||||||
|
return instance.set('version', version.replace('+bigbuffet', '+soapbox'));
|
||||||
|
} else {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Normalize instance (Pleroma, Mastodon, etc.) to Mastodon's format
|
// Normalize instance (Pleroma, Mastodon, etc.) to Mastodon's format
|
||||||
export const normalizeInstance = (instance: Record<string, any>) => {
|
export const normalizeInstance = (instance: Record<string, any>) => {
|
||||||
return InstanceRecord(
|
return InstanceRecord(
|
||||||
|
@ -156,6 +166,7 @@ export const normalizeInstance = (instance: Record<string, any>) => {
|
||||||
normalizeVersion(instance);
|
normalizeVersion(instance);
|
||||||
fixTakahe(instance);
|
fixTakahe(instance);
|
||||||
fixAkkoma(instance);
|
fixAkkoma(instance);
|
||||||
|
fixBigBuffet(instance);
|
||||||
|
|
||||||
// Merge defaults
|
// Merge defaults
|
||||||
instance.mergeDeepWith(mergeDefined, InstanceRecord());
|
instance.mergeDeepWith(mergeDefined, InstanceRecord());
|
||||||
|
|
Loading…
Reference in a new issue