nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions

View File

@@ -11,6 +11,7 @@ var isBinaryPath = require('is-binary-path');
// (may be shared across chokidar FSWatcher instances)
var FsWatchInstances = Object.create(null);
// Private function: Instantiates the fs.watch interface
// * path - string, path to be watched
@@ -25,7 +26,7 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
listener(path);
emitRaw(rawEvent, evPath, {watchedPath: path});
// emit based on events occuring for files from a directory's watcher in
// emit based on events occurring for files from a directory's watcher in
// case the file's watcher misses it (and rely on throttling to de-dupe)
if (evPath && path !== evPath) {
fsWatchBroadcast(
@@ -251,6 +252,8 @@ function(file, stats, initialAdd, callback) {
var dirname = sysPath.dirname(file);
var basename = sysPath.basename(file);
var parent = this._getWatchedDir(dirname);
// stats is always present
var prevStats = stats;
// if the file is already being watched, do nothing
if (parent.has(basename)) return callback();
@@ -264,12 +267,24 @@ function(file, stats, initialAdd, callback) {
if (error) {
this._remove(dirname, basename);
} else {
this._emit('change', file, newStats);
// Check that change event was not fired because of changed only accessTime.
var at = newStats.atime.getTime();
var mt = newStats.mtime.getTime();
if (!at || at <= mt || mt !== prevStats.mtime.getTime()) {
this._emit('change', file, newStats);
}
prevStats = newStats;
}
}.bind(this));
// add is about to be emitted if file not already tracked in parent
} else if (parent.has(basename)) {
this._emit('change', file, newStats);
// Check that change event was not fired because of changed only accessTime.
var at = newStats.atime.getTime();
var mt = newStats.mtime.getTime();
if (!at || at <= mt || mt !== prevStats.mtime.getTime()) {
this._emit('change', file, newStats);
}
prevStats = newStats;
}
}.bind(this));