fix: style fixes and custom background video support for upload file

This commit is contained in:
David Ralph
2021-04-12 14:56:23 +01:00
parent cc341300b4
commit fbe6e040ea
16 changed files with 123 additions and 136 deletions

View File

@@ -1,11 +1,12 @@
import React from 'react';
const Clock = React.lazy(() => import('./time/Clock'));
const Greeting = React.lazy(() => import('./greeting/Greeting'));
const Quote = React.lazy(() => import('./quote/Quote'));
const Search = React.lazy(() => import('./search/Search'));
const Date = React.lazy(() => import('./time/Date'));
const QuickLinks = React.lazy(() => import('./quicklinks/QuickLinks'));
import Clock from './time/Clock';
import Greeting from './greeting/Greeting';
import Quote from './quote/Quote';
import Search from './search/Search';
import QuickLinks from './quicklinks/QuickLinks';
import Date from './time/Date';
const Weather = React.lazy(() => import('./weather/Weather'));
const renderLoader = () => <></>;
@@ -26,37 +27,6 @@ export default class Widgets extends React.PureComponent {
return (localStorage.getItem(key) === 'true');
}
componentDidMount() {
const widget = document.getElementById('widgets');
// These lines of code prevent double clicking the page or pressing CTRL + A from highlighting the page
widget.addEventListener('mousedown', (event) => {
if (event.detail > 1) {
event.preventDefault();
}
}, false);
document.onkeydown = (e) => {
e = e || window.event;
if (!e.ctrlKey) {
return;
}
let code = e.which || e.keyCode;
const modals = document.getElementsByClassName('ReactModal__Overlay');
if (modals.length > 0) {
return;
}
switch (code) {
case 65:
e.preventDefault();
e.stopPropagation();
break;
default: break;
}
};
}
render() {
// allow for re-ordering widgets
let elements = [];