Remove luxon completely.

This commit is contained in:
Dane Everitt 2018-06-16 14:11:58 -07:00
parent e7faf979a1
commit 1acedc2de2
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,7 @@
{
"name": "pterodactyl-panel",
"dependencies": {
"date-fns": "^1.29.0",
"vue": "^2.5.7",
"vue-axios": "^2.1.1",
"vue-router": "^3.0.1",
@ -27,7 +28,6 @@
"jquery": "^3.3.1",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.5",
"luxon": "^1.2.1",
"postcss": "^6.0.21",
"postcss-import": "^11.1.0",
"postcss-loader": "^2.1.5",

View file

@ -28,9 +28,9 @@
</template>
<script>
import { DateTime } from 'luxon';
import Server from '../../models/server';
import _ from 'lodash';
import differenceInSeconds from 'date-fns/difference_in_seconds';
import Flash from '../Flash';
import ServerBox from './ServerBox';
import Navigation from '../core/Navigation';
@ -40,7 +40,7 @@
components: { Navigation, ServerBox, Flash },
data: function () {
return {
backgroundedAt: DateTime.local(),
backgroundedAt: new Date(),
documentVisible: true,
loading: true,
search: '',
@ -156,14 +156,14 @@
*/
_handleDocumentVisibilityChange: function (isVisible) {
if (!isVisible) {
this.backgroundedAt = DateTime.local();
this.backgroundedAt = new Date();
return;
}
// If it has been more than 30 seconds since this window was put into the background
// lets go ahead and refresh all of the listed servers so that they have fresh stats.
const diff = DateTime.local().diff(this.backgroundedAt, 'seconds');
this._iterateServerResourceUse(diff.seconds > 30 ? 1 : 5000);
const diff = differenceInSeconds(new Date(), this.backgroundedAt);
this._iterateServerResourceUse(diff > 30 ? 1 : 5000);
},
}
};

View file

@ -2032,6 +2032,10 @@ d@1:
dependencies:
es5-ext "^0.10.9"
date-fns@^1.29.0:
version "1.29.0"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6"
date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
@ -3662,10 +3666,6 @@ lru-cache@^4.0.1, lru-cache@^4.1.1:
pseudomap "^1.0.2"
yallist "^2.1.2"
luxon@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.2.1.tgz#5c4948d141939c2b2820f0c3a99276932245efb1"
make-dir@^1.0.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"