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 %>
|
||||
</head>
|
||||
<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">
|
||||
<div class="loading-indicator__container">
|
||||
|
|
|
@ -22,7 +22,7 @@ const Portal: React.FC<IPortal> = ({ children }) => {
|
|||
return (
|
||||
ReactDOM.createPortal(
|
||||
children,
|
||||
document.getElementById('soapbox') as HTMLDivElement,
|
||||
document.getElementById('bigbuffet') as HTMLDivElement,
|
||||
)
|
||||
);
|
||||
};
|
||||
|
|
|
@ -50,7 +50,7 @@ const TestApp: FC<any> = ({ children, storeProps, routerProps = {} }) => {
|
|||
};
|
||||
|
||||
return (
|
||||
<div id='soapbox'>
|
||||
<div id='bigbuffet'>
|
||||
<Provider store={props.store}>
|
||||
<MemoryRouter {...routerProps}>
|
||||
<StatProvider>
|
||||
|
|
|
@ -33,7 +33,7 @@ if (BuildConfig.NODE_ENV === 'production') {
|
|||
}
|
||||
|
||||
ready(() => {
|
||||
const container = document.getElementById('soapbox') as HTMLElement;
|
||||
const container = document.getElementById('bigbuffet') as HTMLElement;
|
||||
const root = createRoot(container);
|
||||
|
||||
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
|
||||
export const normalizeInstance = (instance: Record<string, any>) => {
|
||||
return InstanceRecord(
|
||||
|
@ -156,6 +166,7 @@ export const normalizeInstance = (instance: Record<string, any>) => {
|
|||
normalizeVersion(instance);
|
||||
fixTakahe(instance);
|
||||
fixAkkoma(instance);
|
||||
fixBigBuffet(instance);
|
||||
|
||||
// Merge defaults
|
||||
instance.mergeDeepWith(mergeDefined, InstanceRecord());
|
||||
|
|
Loading…
Reference in a new issue