Skip to content

Commit

Permalink
version bump + minor
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Apr 5, 2021
1 parent ba77039 commit b2ef065
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
8 changes: 6 additions & 2 deletions dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion src/components/webServer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
5 changes: 4 additions & 1 deletion src/extras/banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
Expand Down

0 comments on commit b2ef065

Please sign in to comment.