diff --git a/dev_notes.md b/dev_notes.md index 3b860db78..7495da25c 100644 --- a/dev_notes.md +++ b/dev_notes.md @@ -25,12 +25,16 @@ - [x] allow 3 chars admin names - [x] disable server auto-start when no admins configured - [x] login page indicate if the `admins.json` file is not found -- [ ] make warns revokable? -- [ ] xxxx +Quickie: +- crash replace 45 > 90? +- ctx.ip overwrite with xff? +- make warns revokable? > ASAP!: +- [ ] a way to create admins file without cfx.re +- [ ] rename authenticator pra adminVault - [ ] consolidate the log pages - [ ] add discord group whitelist (whitelist switch becomes a select box that will enable guildID and roleID) - Manual Approval (default) diff --git a/fxmanifest.lua b/fxmanifest.lua index 8559dadc7..2463c97d2 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -5,7 +5,7 @@ author 'Tabarra' description 'Remotely Manage & Monitor your GTA5 FiveM Server' repository 'https://github.com/tabarra/txAdmin' -version '3.6.0-dev' +version '3.6.0' rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aware my resources *will* become incompatible once RedM ships.' fx_version 'cerulean' diff --git a/src/components/webServer/index.js b/src/components/webServer/index.js index 4769dc549..1e7835cba 100644 --- a/src/components/webServer/index.js +++ b/src/components/webServer/index.js @@ -16,7 +16,6 @@ const { customAlphabet } = require('nanoid'); const dict51 = require('nanoid-dictionary/nolookalikes'); const nanoid = customAlphabet(dict51, 20); -const chalk = require('chalk'); const { setHttpCallback } = require('@citizenfx/http-wrapper'); const { dir, log, logOk, logWarn, logError } = require('../../extras/console')(modulename); const {requestAuth} = require('./requestAuthenticator'); diff --git a/src/extras/banner.js b/src/extras/banner.js index 76bbf5263..569096fca 100644 --- a/src/extras/banner.js +++ b/src/extras/banner.js @@ -162,7 +162,10 @@ module.exports.printBanner = async () => { } //Opening page - if(GlobalData.osType === 'windows' && !GlobalData.isAdvancedUser){ + if( + GlobalData.osType === 'windows' && + (urlSuffix || !GlobalData.isAdvancedUser) + ){ open(`http://localhost:${GlobalData.txAdminPort}/auth${urlSuffix}`).catch(); } } diff --git a/src/index.js b/src/index.js index ec78e147c..57fd7732a 100644 --- a/src/index.js +++ b/src/index.js @@ -195,14 +195,15 @@ if(verbose) dir({isZapHosting, forceInterface, forceFXServerPort, txAdminPort, l //Check if this version of txAdmin is too outdated to be considered safe to use in prod //NOTE: Only valid if its being very actively maintained. // Use 30d for patch 0, or 45~60d otherwise -const txVerBBLastUpdate = 1615200000; -const txVerBBDelta = 28 + ((isZapHosting)? 10 : 0); +const txVerBBLastUpdate = 1617619200; +const txVerBBDelta = 21 + ((isZapHosting)? 10 : 0); const txAdminVersionBestBy = txVerBBLastUpdate + (txVerBBDelta * 86400); // dir({ // updateDelta: txVerBBDelta, // lastUpdate: new Date(txVerBBLastUpdate*1000).toLocaleString(), // nextUpdate: new Date(txAdminVersionBestBy*1000).toLocaleString(), -// timeUntil: require('humanize-duration')(((now() - txAdminVersionBestBy)*1000)), +// nextUpdateTS: txAdminVersionBestBy, +// timeLeft: require('humanize-duration')(((now() - txAdminVersionBestBy)*1000)), // }) if(now() > txAdminVersionBestBy){ logError(`This version of txAdmin is outdated.`);