386 lines
No EOL
22 KiB
Text
386 lines
No EOL
22 KiB
Text
<!--
|
|
=========================================================
|
|
* Soft UI Dashboard - v1.0.3
|
|
=========================================================
|
|
|
|
* Product Page: https://www.creative-tim.com/product/soft-ui-dashboard
|
|
* Copyright 2021 Creative Tim (https://www.creative-tim.com)
|
|
* Licensed under MIT (https://www.creative-tim.com/license)
|
|
|
|
* Coded by Creative Tim
|
|
|
|
=========================================================
|
|
|
|
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
-->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<link rel="stylesheet" href="../testcdn/a05ee437b7ade39c78f8.css" data-n-p="">
|
|
<%- include('partials/preloader.ejs', {now: 'debug'}) %>
|
|
<%
|
|
|
|
let seconds = Math.round(rawUptime % 60);
|
|
|
|
if (seconds > 59) seconds = Math.round(seconds % 60);
|
|
|
|
let minutes = Math.floor(rawUptime / 60);
|
|
let hours = Math.floor(minutes / 60);
|
|
let days = Math.floor(hours / 24);
|
|
|
|
minutes = minutes % 60;
|
|
hours = hours % 24;
|
|
|
|
let filterUptime = `${days}d, ${hours}h, ${minutes}m, ${seconds}s`;
|
|
if (!days) filterUptime = `${hours}h, ${minutes}m, ${seconds}s`;
|
|
if (!hours) filterUptime = `${minutes}m, ${seconds}s`;
|
|
if (!minutes) filterUptime = `${seconds}s`;
|
|
|
|
let modified = 0;
|
|
|
|
if (onlineFiles.index.replace(/\s+/g, '') !== localFiles.index.replace(/\s+/g, '')) modified++;
|
|
if (onlineFiles.guild.replace(/\s+/g, '') !== localFiles.guild.replace(/\s+/g, '')) modified++;
|
|
if (onlineFiles.guilds.replace(/\s+/g, '') !== localFiles.guilds.replace(/\s+/g, '')) modified++;
|
|
|
|
const info = []
|
|
const versions = []
|
|
if (modified !== 0) modded = "true"
|
|
else modded = "false"
|
|
|
|
let information = [
|
|
{name: "Theme", value: "Soft UI Theme"},
|
|
{name: "Modified", value: `${modded}`},
|
|
{name: "License Type", value: `${license}`},
|
|
{name: "Uptime", value: `${filterUptime}`},
|
|
{name: "Permissions", value: req.requiredPermissions},
|
|
{name: "Redirect URI", value: `${config.redirectUri?.includes("/discord/callback")}`}
|
|
]
|
|
|
|
let modules = [
|
|
{name: "Node JS", version: `${nodeVersion.split("v")[1]}`},
|
|
{name: "Discord JS", version: `${discordVersion}`, npm: "discord.js"},
|
|
{name: "Discord Dashboard", version: `${dbdVersion}`, npm: "discord-dashboard"},
|
|
{name: "Theme", version: `${themeVersion}`, npm: "soft-ui"},
|
|
]
|
|
|
|
onlineV.forEach(online => {
|
|
const current = localV[online.name];
|
|
const latest = online.version;
|
|
const name = online.name;
|
|
|
|
versions.push({name: name, current: current, latest: latest})
|
|
});
|
|
|
|
const settings = config.settings
|
|
|
|
let debug = {information, modules, versions, settings, themeConfig}
|
|
|
|
var data = "text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(debug));
|
|
%>
|
|
<%- themeConfig?.customHtml %>
|
|
</head>
|
|
<body class="g-sidenav-show bg-gray-100" id="scroll">
|
|
<%- include('partials/preload.ejs') %>
|
|
<%- include('partials/sidebar.ejs', {config: config, now:'debug'}) %>
|
|
<div class="main-content position-relative bg-gray-100 max-height-vh-100 h-100">
|
|
<!-- Navbar -->
|
|
<%- include('partials/navbar.ejs', {now:'debug'}) %>
|
|
<!-- End Navbar -->
|
|
<div class="container-fluid py-4">
|
|
<div class="modal fade" id="exampleModalSignUp" tabindex="-1" role="dialog"
|
|
aria-labelledby="exampleModalSignTitle" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered modal-sm" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-body p-0">
|
|
<div class="card card-plain">
|
|
<div class="card-header pb-0 text-left">
|
|
<h4 class="font-weight-bolder text-primary text-gradient">Download Log file.</h4>
|
|
<p class="mb-0"
|
|
style="text-align: center;">This log contains the dashboard's Theme Config and all options with any personal information redacted.</p>
|
|
</div>
|
|
<div class="card-body pb-3" id="form1">
|
|
<form role="form text-left">
|
|
<div class="text-center">
|
|
<%
|
|
//new date
|
|
const date = new Date();
|
|
//convert unix to string
|
|
const dateString = date.toString();
|
|
//split date string
|
|
const dateSplit = dateString.split(" ");
|
|
//get date
|
|
const dateFinal = dateSplit[2] + "-" + dateSplit[1] + "-" + dateSplit[3];
|
|
//get time
|
|
const timeFinal = dateSplit[4];
|
|
//split by space and join by -
|
|
const timeFinal2 = timeFinal.replace(/[&\/\\#, +()$~%.'":*?<>{}]/g, '-');
|
|
%>
|
|
<a href="data:<%- data %>"
|
|
download="Log_SoftUI_<%- timeFinal2 %>_<%- dateFinal %>.json"
|
|
class="btn bg-gradient-primary">download JSON</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="card-footer text-center pt-0 px-sm-4 px-1">
|
|
Paste this in the <a
|
|
href="https://discord.com/channels/803034737261936670/803036935785414717"
|
|
target="_blank" class="text-dark font-weight-bolder">#😖»get-help</a> channel.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="row">
|
|
<div class="col-xl-6">
|
|
<div class="row pb-4">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header mx-4 p-3 text-center">
|
|
<div class="icon icon-shape icon-lg bg-gradient-primary shadow text-center border-radius-lg">
|
|
<i class="fab fa-node-js opacity-10" aria-hidden="true"></i>
|
|
</div>
|
|
</div>
|
|
<div class="card-body pt-0 p-3 text-center">
|
|
<h6 class="text-center mb-0">Node JS</h6>
|
|
<span class="text-xs">Version</span>
|
|
<hr class="horizontal dark my-3">
|
|
<h5 class="mb-0"><%- nodeVersion.split("v")[1] %></h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 mt-md-0 mt-4">
|
|
<div class="card">
|
|
<div class="card-header mx-4 p-3 text-center">
|
|
<div class="icon icon-shape icon-lg bg-gradient-primary shadow text-center border-radius-lg">
|
|
<i class="fab fa-discord opacity-10" aria-hidden="true"></i>
|
|
</div>
|
|
</div>
|
|
<div class="card-body pt-0 p-3 text-center">
|
|
<h6 class="text-center mb-0">Discord.JS</h6>
|
|
<span class="text-xs">Version</span>
|
|
<hr class="horizontal dark my-3">
|
|
<h5 class="mb-0"><%- discordVersion %></h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-xl-6">
|
|
<style>
|
|
.fab {
|
|
color: rgb(232, 230, 227) !important;
|
|
}
|
|
|
|
.fas {
|
|
color: rgb(232, 230, 227) !important;
|
|
}
|
|
</style>
|
|
<div class="row">
|
|
<div class="col-md-6 mb-4">
|
|
<div class="card">
|
|
<div class="card-header mx-4 p-3 text-center">
|
|
<div class="icon icon-shape icon-lg bg-gradient-primary shadow text-center border-radius-lg">
|
|
<i class="fas fa-landmark opacity-10" aria-hidden="true"></i>
|
|
</div>
|
|
</div>
|
|
<div class="card-body pt-0 p-3 text-center">
|
|
<h6 class="text-center mb-0">Discord Dashboard</h6>
|
|
<span class="text-xs">Version</span>
|
|
<hr class="horizontal dark my-3">
|
|
<h5 class="mb-0"><%- dbdVersion %></h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 mt-md-0 mt-4 mb-4">
|
|
<div class="card">
|
|
<div class="card-header mx-4 p-3 text-center">
|
|
<div class="icon icon-shape icon-lg bg-gradient-primary shadow text-center border-radius-lg">
|
|
<i class="fas fa-cloud opacity-10" aria-hidden="true"></i>
|
|
</div>
|
|
</div>
|
|
<div class="card-body pt-0 p-3 text-center">
|
|
<h6 class="text-center mb-0">Theme</h6>
|
|
<span class="text-xs">Version</span>
|
|
<hr class="horizontal dark my-3">
|
|
<h5 class="mb-0"><%- themeVersion %></h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 mb-lg-0 mb-4">
|
|
<div class="card">
|
|
<div class="card-header pb-0 p-3">
|
|
<div class="row">
|
|
<div class="col-6 d-flex align-items-center">
|
|
<h6 class="mb-0">Dashboard Logs</h6>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body p-3">
|
|
<div class="row">
|
|
<div class="col-md-12 mb-md-0 mb-4">
|
|
<div data-bs-toggle="modal" style="cursor: pointer;"
|
|
data-bs-target="#exampleModalSignUp"
|
|
class="alert alert-primary text-white font-weight-bold text-center"
|
|
role="alert">
|
|
Download Logs
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 mb-lg-0 mb-4">
|
|
<div class="card">
|
|
<div class="card-header pb-0 p-3">
|
|
<div class="row">
|
|
<div class="col-6 d-flex align-items-center">
|
|
<h6 class="mb-0">Theme Modification</h6>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body p-3">
|
|
<div class="row">
|
|
<div class="col-md-12 mb-md-0 mb-4">
|
|
<% if(modified !== 0){ %>
|
|
<div class="alert alert-danger text-white font-weight-bold"
|
|
role="alert">
|
|
This theme has been modified!
|
|
</div>
|
|
<% } else{ %>
|
|
<div class="alert alert-success text-white font-weight-bold"
|
|
role="alert">
|
|
This theme has not been modified!
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 mb-lg-0 mb-4">
|
|
<div class="card">
|
|
<div class="card-header pb-0 p-3">
|
|
<div class="row">
|
|
<div class="col-6 d-flex align-items-center">
|
|
<h6 class="mb-0">Dashboard Information</h6>
|
|
</div>
|
|
<div style="text-align: right;" class="col-6 align-items-right">
|
|
<a style="text-align: right;">Uptime: <%- filterUptime %></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body p-3">
|
|
<div class="row">
|
|
<div class="col-md-12 mb-md-0 mb-4">
|
|
<% if (license == "opensource") { %>
|
|
<div class="alert alert-primary text-white font-weight-bold"
|
|
role="alert">
|
|
License type: <span
|
|
style="text-transform: capitalize;"><%- license %></span>
|
|
</div>
|
|
<% } else if (license == "personal") { %>
|
|
<div class="alert alert-success text-white font-weight-bold"
|
|
role="alert">
|
|
License type: <span
|
|
style="text-transform: capitalize;"><%- license %></span>
|
|
</div>
|
|
<% } else if (license == "production") { %>
|
|
<div class="alert alert-info text-white font-weight-bold" role="alert">
|
|
License type: <span
|
|
style="text-transform: capitalize;"><%- license %></span>
|
|
</div>
|
|
<% } else { %>
|
|
<div class="alert alert-warning text-white font-weight-bold"
|
|
role="alert">
|
|
License type: <span
|
|
style="text-transform: capitalize;">Unknown</span>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12 mt-4">
|
|
<div class="col-12 col-lg-12 mb-4">
|
|
<div class="card ">
|
|
<div class="card-header pb-0 p-3">
|
|
<div class="d-flex justify-content-between">
|
|
<h6 class="mb-2">Partial Information</h6>
|
|
</div>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table align-items-center ">
|
|
<tbody>
|
|
<% onlineV.forEach(online => { %>
|
|
<%
|
|
const latest = onlineV[online.version];
|
|
const current = localV[online.name];
|
|
const newest = online.version;
|
|
%>
|
|
<tr>
|
|
<td class="w-30">
|
|
<div class="d-flex px-2 py-1 align-items-center">
|
|
<div class="ms-2">
|
|
<p class="text-xs font-weight-bold mb-0">Name:</p>
|
|
<h6 class="text-sm mb-0"
|
|
style="text-transform: capitalize;"><%- online.name %></h6>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="text-center">
|
|
<p class="text-xs font-weight-bold mb-0">Version:</p>
|
|
<h6 class="text-sm mb-0"><%- current %></h6>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="text-center">
|
|
<p class="text-xs font-weight-bold mb-0">Type:</p>
|
|
<h6 class="text-sm mb-0"
|
|
style="text-transform: capitalize;"><%- online.type %></h6>
|
|
</div>
|
|
</td>
|
|
<td class="align-middle text-sm">
|
|
<div class="col text-center">
|
|
<p class="text-xs font-weight-bold mb-0">Latest:</p>
|
|
<%
|
|
let update = true;
|
|
if (newest > current) update = true;
|
|
if (newest == current) update = false;
|
|
%>
|
|
<% if (update) { %>
|
|
<span class="badge bg-gradient-danger"><%- online.version %></span>
|
|
<% } else { %>
|
|
<span class="badge bg-gradient-success"><%- online.version %></span>
|
|
<% } %>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<% }) %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
</div>
|
|
<%- include('partials/footer.ejs') %>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<%- include('partials/scripts.ejs', {now: "debug"}) %>
|
|
</body>
|
|
|
|
</html> |