fix: slider, add about page loading text, background bug fix etc

This commit is contained in:
David Ralph
2021-03-26 22:16:44 +00:00
parent 98082158b7
commit 43741f4d58
9 changed files with 32 additions and 36 deletions

View File

@@ -132,7 +132,6 @@ export default class Background extends React.PureComponent {
case 'colour':
// background colour
const customBackgroundColour = localStorage.getItem('customBackgroundColour');
if (customBackgroundColour !== 'Disabled' && customBackgroundColour !== '') {
let gradientSettings = '';
try {
gradientSettings = JSON.parse(customBackgroundColour);
@@ -148,7 +147,6 @@ export default class Background extends React.PureComponent {
if (typeof gradientSettings === 'object' && gradientSettings !== null) {
return this.gradientStyleBuilder(gradientSettings);
}
}
break;
case 'custom':
@@ -188,7 +186,10 @@ export default class Background extends React.PureComponent {
}
});
}
}
break;
default:
break;
}
}
componentDidMount() {

View File

@@ -6,11 +6,9 @@ import NotesIcon from '@material-ui/icons/AssignmentRounded';
import Tooltip from '@material-ui/core/Tooltip';
import Report from '@material-ui/icons/SmsFailed';
import './scss/index.scss';
import Notes from './Notes';
// the user probably won't use the notes feature every time so we lazy load
const Notes = React.lazy(() => import('./Notes'));
const renderLoader = () => <></>;
import './scss/index.scss';
export default function Navbar(props) {
const language = window.language;
@@ -20,9 +18,7 @@ export default function Navbar(props) {
{(localStorage.getItem('notesEnabled') === 'true') ?
<div className='notes'>
<NotesIcon className='topicons'/>
<React.Suspense fallback={renderLoader()}>
<Notes/>
</React.Suspense>
<Notes/>
</div>
:null}