Big progress update!
This commit is contained in:
parent
4645561d33
commit
9348cb1926
11 changed files with 761 additions and 6 deletions
|
|
@ -4,11 +4,9 @@ import * as Auth from './auth'
|
|||
|
||||
export const init = (app: Application, passport: PassportStatic) => {
|
||||
app.get('/', async (req, res) => {
|
||||
if (req.isAuthenticated() && req.user) {
|
||||
res.render('home')
|
||||
} else {
|
||||
res.redirect('/login?origin=/')
|
||||
}
|
||||
res.render('home', {
|
||||
user: req.isAuthenticated && req.user ? req.user : null
|
||||
})
|
||||
})
|
||||
|
||||
app.put('/', async (req, res) => {
|
||||
|
|
|
|||
158
src/app/views/home copy.ejs
Normal file
158
src/app/views/home copy.ejs
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Geolosys Configurator</title>
|
||||
|
||||
<link rel="shortcut icon" href="/assets/img/logo.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="/Libraries/font-awesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/Libraries/bootstrap/css/bootstrap.css">
|
||||
<script src="/Libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script type="module" src="/assets/js/modules/events.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/generators.module.js"></script>
|
||||
<!-- <script src="/assets/js/home.js"></script> -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<div class="container-fluid">
|
||||
<a href="/" class="navbar-brand">
|
||||
<span>
|
||||
<img width="24" src="/assets/img/logo.png"> Configurator
|
||||
</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link active">
|
||||
<span>
|
||||
<i class="far fa-plus-square"></i> Create
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% if(user) {%>
|
||||
<li class="nav-item">
|
||||
<a href="/configs" class="nav-link">
|
||||
<span>
|
||||
<b>{ }</b> Your Configs
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li class="nav-item">
|
||||
<% if(user) {%>
|
||||
<a href="/logout" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-out-alt"></i> Log Out
|
||||
</span>
|
||||
</a>
|
||||
<% } else { %>
|
||||
<a href="/login" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-out-alt"></i> Log In
|
||||
</span>
|
||||
</a>
|
||||
<% } %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="accordion" id="oreconfig">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2 class="mb-0">
|
||||
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse"
|
||||
data-target="#config-1" aria-expanded="true" aria-controls="config-1">
|
||||
Config #1
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="config-1" class="collapse show" aria-labelledby="headingOne" data-parent="#oreconfig">
|
||||
<!-- <div class="container" style="margin-top: 2rem;"> -->
|
||||
<form>
|
||||
<h6>Config Name (For Saving)</h6>
|
||||
|
||||
<input class="form-control mb-3" type="text" name="confName" id="confName">
|
||||
|
||||
<h6>Deposit Type</h6>
|
||||
|
||||
<div class="mb-3">
|
||||
<select class="form-select" aria-label="Deposit Type" name="DepositType">
|
||||
<option value="deposit" selected>Normal</option>
|
||||
<option value="depositMulti">Multi-Ore</option>
|
||||
<option value="depositBiome">Biome Specific</option>
|
||||
<option value="depositBiomeMulti">Multi-Ore & Biome Specific</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<h6>Deposit Structure Type <b>(1.14+ Only)</b></h6>
|
||||
|
||||
<div class="mb-3">
|
||||
<select class="form-select" aria-label="Structure Type" name="StructureType">
|
||||
<option value="dense" selected>Dense</option>
|
||||
<option value="sparse">Sparse</option>
|
||||
<option value="dike">Dike</option>
|
||||
<option value="layer">Layer</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<h6>Ore Blocks</h6>
|
||||
<div id="blocks"></div>
|
||||
|
||||
<h6>Sample Blocks</h6>
|
||||
<div id="samples"></div>
|
||||
|
||||
<h6>Minimum Y-Level</h6>
|
||||
|
||||
<input class="form-control mb-3" type="number" value="0" min="0" max="255" name="yMin" id="yMin">
|
||||
|
||||
<h6>Maximum Y-Level</h6>
|
||||
|
||||
<input class="form-control mb-3" type="number" value="1" min="0" max="255" name="yMax" id="yMax">
|
||||
|
||||
<h6>Chance <a href="https://oitsjustjo.se/M3NfQxBsZ" target="_blank">(Relative to All
|
||||
Chances)</a>
|
||||
</h6>
|
||||
|
||||
<input class="form-control mb-3" type="number" value="1" min="0" name="chance" id="chance">
|
||||
|
||||
<h6>Size</h6>
|
||||
|
||||
<input class="form-control mb-3" type="text" name="confName" id="confName">
|
||||
|
||||
<h6>Density</h6>
|
||||
|
||||
<input class="form-control mb-3" type="text" name="confName" id="confName">
|
||||
|
||||
<h6>Dimension Blacklist</h6>
|
||||
|
||||
<div id="dimBlacklist"></div>
|
||||
|
||||
<h6>Blocks that This Deposit Can Replace</h6>
|
||||
|
||||
<div id="replacers"></div>
|
||||
|
||||
<h6>Biomes To Spawn / Not Spawn</h6>
|
||||
|
||||
<div id="biomes"></div>
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary m-auto d-block">Generate!</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Geolosys Configurator</title>
|
||||
|
||||
<link rel="shortcut icon" href="/assets/img/logo.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="/Libraries/font-awesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/Libraries/bootstrap/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/assets/css/base.css">
|
||||
|
||||
<script src="/Libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script type="module" src="/assets/js/modules/events.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/generators.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/init.module.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark sticky-top bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a href="/" class="navbar-brand">
|
||||
<span>
|
||||
<img width="24" src="/assets/img/logo.png"> Configurator
|
||||
</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a href="#" class="nav-link active">
|
||||
<span>
|
||||
<i class="far fa-plus-square"></i> Create
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% if(user) {%>
|
||||
<li class="nav-item">
|
||||
<a href="/configs" class="nav-link">
|
||||
<span>
|
||||
<b>{ }</b> Your Configs
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li class="nav-item">
|
||||
<% if(user) {%>
|
||||
<a href="/logout" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-out-alt"></i> Log Out
|
||||
</span>
|
||||
</a>
|
||||
<% } else { %>
|
||||
<a href="/login" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-out-alt"></i> Log In
|
||||
</span>
|
||||
</a>
|
||||
<% } %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<div class="form-check form-switch align-bottom mt-2">
|
||||
<input class="form-check-input" type="checkbox" id="switch-112-mode">
|
||||
<label class="form-check-label text-white" for="switch-112-mode">Using MC 1.14+</label>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="text-center d-block">
|
||||
<img class="header" src="/assets/img/logo.png">
|
||||
<h4>Geolosys Deposit Configurator</h4>
|
||||
<h5>Made with 💙 by
|
||||
<a href="https://oitsjustjose.com/">oitsjustjose</a>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h4>Ores</h4>
|
||||
|
||||
<div class="accordion" id="oreconfig">
|
||||
</div>
|
||||
|
||||
<h4>Stones</h4>
|
||||
|
||||
<div class="accordion" id="stoneconfig">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h6 class="text-center">
|
||||
Source Code Hosted on
|
||||
<a href="https://github.com/oitsjustjose/geolosys-config-generator" target="_blank">GitHub</a>
|
||||
</h6>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -6,10 +6,12 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Geolosys Configurator Login</title>
|
||||
|
||||
<link rel="shortcut icon" href="/assets/img/logo.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="/Libraries/font-awesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/Libraries/bootstrap/css/bootstrap.css">
|
||||
<script src="/Libraries/bootstrap/js/bootstrap.js"></script>
|
||||
<script src="/Custom/js/login.js"></script>
|
||||
<script src="/assets/js/login.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Reference in a new issue