mirror of
https://github.com/mue/mue.git
synced 2026-06-13 03:58:49 +02:00
fix: sidebar bug, tab name translation
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
border: none;
|
||||
background: none;
|
||||
min-width: calc(100% - 1.2em);
|
||||
text-align: left;
|
||||
|
||||
&:hover {
|
||||
background: t($modal-sidebarActive);
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
} from '@mui/material';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
import translations from 'modules/translations';
|
||||
|
||||
export default class Radio extends PureComponent {
|
||||
constructor(props) {
|
||||
@@ -18,7 +19,7 @@ export default class Radio extends PureComponent {
|
||||
};
|
||||
}
|
||||
|
||||
handleChange = (e) => {
|
||||
handleChange = async (e) => {
|
||||
const { value } = e.target;
|
||||
|
||||
if (value === 'loading') {
|
||||
@@ -31,10 +32,9 @@ export default class Radio extends PureComponent {
|
||||
localStorage.getItem('tabName') ===
|
||||
variables.language.getMessage(variables.languagecode, 'tabname')
|
||||
) {
|
||||
// todo: fix this it doesn't work and shows as undefined
|
||||
localStorage.setItem(
|
||||
'tabName',
|
||||
import(`../../../../translations/${value.replace('-', '_')}.json`).tabname,
|
||||
translations[value.replace('-', '_')].tabname,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import Tooltip from '../../helpers/tooltip/Tooltip';
|
||||
import Modal from 'react-modal';
|
||||
import ShareModal from '../../helpers/sharemodal/ShareModal';
|
||||
//import Hotkeys from 'react-hot-keys';
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
const toDataURL = async (url) => {
|
||||
const res = await fetch(url);
|
||||
|
||||
Reference in New Issue
Block a user