mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
nicer red + better welcome
This commit is contained in:
@@ -49,6 +49,11 @@ module.exports = ( app, settings ) => {
|
||||
} );
|
||||
} );
|
||||
|
||||
app.get( '/admin/logout', ( request, response ) => {
|
||||
request.session.loggedIn = false;
|
||||
response.send( 'logged out' );
|
||||
} );
|
||||
|
||||
/*
|
||||
main admin panel access route. Will serve an html file
|
||||
that uses vue.js in its SPA form to make the admin panel
|
||||
@@ -60,10 +65,18 @@ module.exports = ( app, settings ) => {
|
||||
if ( settings[ 'init' ] ) {
|
||||
response.sendFile( path.join( __dirname + '/ui/panel.html' ) );
|
||||
} else {
|
||||
response.sendFile( path.join( __dirname + '/ui/setup.html' ) );
|
||||
response.sendFile( path.join( __dirname + '/ui/welcome.html' ) );
|
||||
}
|
||||
} else {
|
||||
response.redirect( '/admin/login' );
|
||||
}
|
||||
} );
|
||||
|
||||
app.get( '/admin/setup', ( request, response ) => {
|
||||
if ( request.session.loggedIn ) {
|
||||
response.sendFile( path.join( __dirname + '/ui/setup.html' ) );
|
||||
} else {
|
||||
response.redirect( '/admin/login' );
|
||||
}
|
||||
} );
|
||||
};
|
||||
35
src/server/admin/ui/welcome.html
Normal file
35
src/server/admin/ui/welcome.html
Normal file
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Welcome :: myevent - admin panel</title>
|
||||
<link rel="stylesheet" href="/admin/css/loginstyle.css">
|
||||
<style>
|
||||
.myevent-logo-welcome {
|
||||
height: 50vh;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1>Welcome to myevent!</h1>
|
||||
<a href="https://myevent.janishutz.com"><img src="/assets/logo.png" alt="myevent-logo" class="myevent-logo-welcome"></a>
|
||||
<p>myevent, the new way to sell your tickets online!</p>
|
||||
<p>Let's get started setting up your event!</p>
|
||||
<p id="warranty">Note: As a project licensed under the GNU General Public License Version 3.0-or-later (GPL 3.0+), this software comes with ABSOLUTELY NO WARRANTY TO THE EXTENT PERMITTED BY APPLICABLE LAW</p>
|
||||
<a href="/admin/setup">Getting Started!</a>
|
||||
</div>
|
||||
|
||||
<!--Script for dark mode-->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
|
||||
<script>
|
||||
if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || sessionStorage.getItem( 'theme' ) === 'dark' ) {
|
||||
document.documentElement.classList.add( 'dark' );
|
||||
} else {
|
||||
document.documentElement.classList.add( 'light' );
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user