diff --git a/agent.js b/agent.js index 6e29ddd..bf284d6 100644 --- a/agent.js +++ b/agent.js @@ -1,6 +1,8 @@ 'use strict'; import https from 'https'; +import dotenv from 'dotenv'; +await dotenv.config({ path: '.env' }); const agentOptions = { rejectUnauthorized: !process.env.ALLOW_SELF_SIGNED_SSL, diff --git a/controllers/certs.js b/controllers/certs.js index ad41f25..98d73de 100644 --- a/controllers/certs.js +++ b/controllers/certs.js @@ -28,6 +28,7 @@ export async function certsPage(app, req, res) { .then(certs => filterCertsByDomain(certs.data, res.locals.user.domains)); return app.render(req, res, '/certs', { csrf: req.csrfToken(), + user: res.locals.user, dbCerts: dbCerts || [], clusterCerts: clusterCerts || [], }); diff --git a/pages/account.js b/pages/account.js index c33fea0..bd1baef 100644 --- a/pages/account.js +++ b/pages/account.js @@ -157,7 +157,6 @@ export default function Account(props) { innerData = (
- {error && }
Loading... diff --git a/pages/certs.js b/pages/certs.js index 0ae17ca..d298f33 100644 --- a/pages/certs.js +++ b/pages/certs.js @@ -39,7 +39,6 @@ export default function Certs(props) { } const { user, csrf, dbCerts, clusterCerts } = state; - console.log(user, csrf, dbCerts, clusterCerts); if (user && !user.onboarding) { router.push('/onboarding'); diff --git a/pages/global.css b/pages/global.css index d7ef08b..10f6d4e 100644 --- a/pages/global.css +++ b/pages/global.css @@ -39,7 +39,7 @@ input:autofill, input:-webkit-autofill { box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); border-color: #86b7fe!important; } -tr:target, tr:target textarea { +tr:target td, tr:target textarea { background: var(--bs-highlight-bg); } table.notaborder textarea { @@ -89,8 +89,9 @@ table.notaborder textarea { .list-group-item-action:focus, .list-group-item-action:hover { color: #fff; background-color: #1F1F1F; } .sidebar, .table { background-color: #2c2f33!important; } .table { border-color: var(--bs-gray-900)!important; } - tr:target { + tr:target td { background: #ffc10720!important; + --bs-table-accent-bg: #ffc10720 !important; } tr:target textarea { background: transparent!important; diff --git a/router.js b/router.js index 4b584e7..3bf0a65 100644 --- a/router.js +++ b/router.js @@ -10,7 +10,7 @@ import * as db from './db.js'; import { dynamicResponse } from './util.js'; import definition from './specification_openapiv3.js'; import * as update from './update.js'; -import * as agent from './agent.js'; +import agent from './agent.js'; import * as accountController from './controllers/account.js'; import * as mapsController from './controllers/maps.js'; diff --git a/util.js b/util.js index bbac104..2f38efa 100644 --- a/util.js +++ b/util.js @@ -139,7 +139,7 @@ export function getApproxSubject(storageName) { export function filterCertsByDomain(certs, allowedDomains) { return certs.filter((c) => { - const approxSubject = module.exports.getApproxSubject(c.storage_name); + const approxSubject = getApproxSubject(c.storage_name); return allowedDomains.includes(approxSubject); }); }