mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-20 18:06:11 -05:00
A little more UI refactor, cleanup, eslint more strict (#54)
* A little more UI refactor, cleanup, eslint more strict * Split out imports for jQuery components and put them where needed. * No longer do all of it in application module. * Prepares better for code splitting. * Split out video player dialog * Simplifies jquery-ui dependencies for code splitting * Simplifies code * Configure to generate more, but smaller bundles. * Setup some more strict eslint settings * Fix css to import rather than require * Change settings to correctly support tree shaking in production build Signed-off-by: Dolf Starreveld <dolf@starreveld.com> * Remove “old” code from TimeFormatter * Accidentally left behind due to overlapping PRs Signed-off-by: Dolf Starreveld <dolf@starreveld.com>
This commit is contained in:
committed by
Scott Lamb
parent
eaae640703
commit
f5aa0080bb
@@ -31,7 +31,7 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import Time90kParser from '../support/Time90kParser';
|
||||
import {TimeStamp90kFormatter} from '../support/TimeFormatter';
|
||||
import TimeStamp90kFormatter from '../support/TimeStamp90kFormatter';
|
||||
import Range90k from './Range90k';
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class Range {
|
||||
*/
|
||||
constructor(low, high) {
|
||||
if (high < low) {
|
||||
console.log('Warning range swap: ' + low + ' - ' + high);
|
||||
console.warn('Warning range swap: ' + low + ' - ' + high);
|
||||
[low, high] = [high, low];
|
||||
}
|
||||
this.low = low;
|
||||
@@ -65,7 +65,7 @@ export default class Range {
|
||||
* Determine if value is inside the range.
|
||||
*
|
||||
* @param {Number} value Value to test
|
||||
* @return {Boolean}
|
||||
* @return {Boolean}
|
||||
*/
|
||||
isInRange(value) {
|
||||
return value >= this.low && value <= this.high;
|
||||
|
||||
@@ -40,9 +40,10 @@ import Range from './Range';
|
||||
let _range = new WeakMap();
|
||||
|
||||
/**
|
||||
* Subclass of Range to represent ranges over timestamps in 90k format.
|
||||
* Class like Range to represent ranges over timestamps in 90k format.
|
||||
*
|
||||
* This mostly means added some getters with names that make more sense.
|
||||
* A composed member of the Range class is use for the heavy lifting, while
|
||||
* this class provides a different interface.
|
||||
*/
|
||||
export default class Range90k {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user