Fix /share
and cleanup and reorganize frontend locale loading (#25240)
This commit is contained in:
parent
5fae2de454
commit
b0780cfeed
25 changed files with 152 additions and 638 deletions
|
@ -229,14 +229,14 @@ ready(() => {
|
|||
|
||||
[].forEach.call(document.querySelectorAll('[data-admin-component]'), element => {
|
||||
const componentName = element.getAttribute('data-admin-component');
|
||||
const { locale, ...componentProps } = JSON.parse(element.getAttribute('data-props'));
|
||||
const componentProps = JSON.parse(element.getAttribute('data-props'));
|
||||
|
||||
import('../mastodon/containers/admin_component').then(({ default: AdminComponent }) => {
|
||||
return import('../mastodon/components/admin/' + componentName).then(({ default: Component }) => {
|
||||
const root = createRoot(element);
|
||||
|
||||
root.render (
|
||||
<AdminComponent locale={locale}>
|
||||
<AdminComponent>
|
||||
<Component {...componentProps} />
|
||||
</AdminComponent>,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue