mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
progress on setup
This commit is contained in:
2
notes.md
2
notes.md
@@ -1,7 +1,5 @@
|
||||
# Account view:
|
||||
|
||||
- Also update data in db when user goes to purchase to prevent clearing during purchase
|
||||
|
||||
- Load all orders of customer from db when selecting tickets and save to memory to check if ticket count has been exceeded or not.
|
||||
|
||||
|
||||
|
||||
@@ -24,12 +24,15 @@ class POSTHandler {
|
||||
for ( let event in this.events ) {
|
||||
if ( locations[ this.events[ event ][ 'location' ] ] ) {
|
||||
this.ticketTotals[ event ] = locations[ this.events[ event ][ 'location' ] ][ 'save' ][ 'seatInfo' ][ 'count' ];
|
||||
this.events[ event ][ 'maxTickets' ] = this.ticketTotals[ event ];
|
||||
} else {
|
||||
this.ticketTotals[ event ] = this.events[ event ][ 'maxTickets' ];
|
||||
}
|
||||
}
|
||||
|
||||
// console.log( this.events );
|
||||
// console.log( this.ticketTotals );
|
||||
|
||||
// for ( let order in this.allSelectedSeats ) {
|
||||
|
||||
// }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"init":true,
|
||||
"init":false,
|
||||
"twoFA":"enforce",
|
||||
"setupKey":"hello world",
|
||||
"twoFAMode":"enhanced",
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const db = require( '../backend/db/db.js' );
|
||||
let db = null;
|
||||
// const db = require( '../backend/db/db.js' );
|
||||
|
||||
module.exports = ( app, settings ) => {
|
||||
/*
|
||||
@@ -22,4 +23,4 @@ module.exports = ( app, settings ) => {
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
};
|
||||
0
src/server/setupkey.txt
Normal file
0
src/server/setupkey.txt
Normal file
@@ -12,6 +12,14 @@ let routes = [
|
||||
title: 'Welcome to libreevent!'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/admin/login',
|
||||
name: 'adminLogin',
|
||||
component: () => import( '../views/AdminLoginView.vue' ),
|
||||
meta: {
|
||||
title: 'Admin login - Restart required! :: libreevent'
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
routes.push( setupRoutes );
|
||||
|
||||
@@ -25,6 +25,15 @@ export default {
|
||||
setupAuthRequired: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'basics',
|
||||
name: 'setupBasics',
|
||||
component: () => import( '../views/BasicSetupView.vue' ),
|
||||
meta: {
|
||||
title: 'Basic setup :: Setup - libreevent',
|
||||
setupAuthRequired: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'root',
|
||||
name: 'setupRoot',
|
||||
|
||||
22
src/webapp/setup/src/views/AdminLoginView.vue
Normal file
22
src/webapp/setup/src/views/AdminLoginView.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<h1>Please restart libreevent!</h1>
|
||||
<p>Restart the node.js app that libreevent runs in to access the login page. Not sure how to do this? Click <a href="https://libreevent.janishutz.com/docs/setup/setup#complete" target="_blank">here</a></p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 400%;
|
||||
}
|
||||
</style>
|
||||
74
src/webapp/setup/src/views/BasicSetupView.vue
Normal file
74
src/webapp/setup/src/views/BasicSetupView.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<!--
|
||||
* libreevent - BasicSetupView.vue
|
||||
*
|
||||
* Created by Janis Hutz 08/23/2023, Licensed under the GPL V3 License
|
||||
* https://janishutz.com, development@janishutz.com
|
||||
*
|
||||
*
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<h1>Basic Setup</h1>
|
||||
<p>To make setting up the database and email accounts easier, you can enter the required values below.</p>
|
||||
<p>You may find more infos about this part <a href="https://libreevent.janishutz.com/docs/setup/setup#basic-setup" target="_blank">here</a></p>
|
||||
<h2>Database</h2>
|
||||
<p>A database is a piece of software that specializes in storing data. libreevent can use most SQL based databases as well as a custom JSON-based database. You are strongly encouraged to use a SQL based database, as they perform significantly better. Read more
|
||||
<a href="https://libreevent.janishutz.com/docs/setup/installation#database">here</a>
|
||||
</p>
|
||||
<form>
|
||||
<label for="host">Database host name</label><br>
|
||||
<input type="url" name="host" id="host"><br>
|
||||
<label for="database">Database name</label><br>
|
||||
<input type="text" name="database" id="database"><br>
|
||||
<label for="user">Database user</label><br>
|
||||
<input type="text" name="user" id="user"><br>
|
||||
<label for="password">Password</label><br>
|
||||
<input type="password" name="password" id="password"><br>
|
||||
<label for="port">Database port (default usually fine)</label><br>
|
||||
<input type="number" name="port" id="port" min="1" value="3306" max="65535"><br>
|
||||
</form>
|
||||
<h2>Email</h2>
|
||||
<h3>Account</h3>
|
||||
<form>
|
||||
<label for="host">SMTP Server</label><br>
|
||||
<input type="url" name="host" id="host"><br>
|
||||
<label for="port">SMTP Port (default usually fine)</label><br>
|
||||
<input type="number" name="port" id="port" value="587" min="1" max="65535"><br>
|
||||
<label for="user">Email account name</label><br>
|
||||
<input type="email" name="user" id="user"><br>
|
||||
<label for="pass">Password</label><br>
|
||||
<input type="password" name="pass" id="pass"><br>
|
||||
</form>
|
||||
<h3>Display</h3>
|
||||
<form>
|
||||
<label for="display">Display name (what is shown to user in from field)</label><br>
|
||||
<input type="url" name="display" id="display"><br>
|
||||
<label for="dpEmail">Email address to show</label><br>
|
||||
<input type="text" name="dpEmail" id="dpEmail"><br>
|
||||
</form>
|
||||
<button @click="submit()">Continue</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useBackendStore } from '@/stores/backendStore.js';
|
||||
import { mapStores } from 'pinia';
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapStores( useBackendStore )
|
||||
},
|
||||
methods: {
|
||||
submit () {
|
||||
this.backendStore.addVisitedSetupPages( 'root', true );
|
||||
this.$router.push( '/setup/root' );
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="home">
|
||||
<img alt="Libreevent logo" src="../assets/logo.png">
|
||||
<h1>Welcome to libreǝvent!</h1>
|
||||
<p>Let's start the setup by entering the setup key below! You may define a setup key in the config file of libreevent. See <a href="https://libreevent.janishutz.com/docs/setup/setup" target="_blank">here</a> for more instructions</p>
|
||||
<p>Let's start the setup by entering the setup key below! You may define a setup key in the setupkey.txt file of libreevent. See <a href="https://libreevent.janishutz.com/docs/setup/installation" target="_blank">here</a> for more instructions</p>
|
||||
<form>
|
||||
<label for="key">Your setup key</label><br>
|
||||
<input type="text" v-model="formData[ 'key' ]" required name="key" id="key">
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<img src="@/assets/logo.png" alt="libreevent logo" style="height: 30vh;">
|
||||
<h1>Setup complete!</h1>
|
||||
<p>Congratulations on finishing the setup of libreǝvent!</p>
|
||||
<p>Please restart the node.js application to have it load the actual user interface for libreevent. You may then log in at <a :href="windowURL" target="_blank">{{ windowURL }}</a></p>
|
||||
<p>In the admin panel, there are a few things you still need to change. You may find a list of all things <a href="/docs/setup/afterSetup">here</a></p>
|
||||
<p>Please restart the node.js application to have it load the actual user interface for libreevent and finish setup. You may then log in at <a :href="windowURL" target="_blank">{{ windowURL }}</a></p>
|
||||
<p>In the admin panel, there are a few things you still need to change. You may find a list of all things <a href="https://libreevent.janishutz.com/docs/setup/afterSetup" target="_blank">here</a></p>
|
||||
<ul>
|
||||
<li>Choose a payment gateway and set it up</li>
|
||||
<li>Create a event location and an event</li>
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<label for="mail">Email address for 2FA</label><br>
|
||||
<input type="email" name="mail" id="mail"><br>
|
||||
<label for="password">Password</label><br>
|
||||
<input type="email" name="password" id="password"><br>
|
||||
<input type="password" name="password" id="password"><br>
|
||||
<label for="password2">Confirm password</label><br>
|
||||
<input type="email" name="password2" id="password2">
|
||||
<input type="password" name="password2" id="password2">
|
||||
</form>
|
||||
<button @click="submit()">Continue</button>
|
||||
</div>
|
||||
@@ -46,6 +46,7 @@
|
||||
},
|
||||
methods: {
|
||||
submit () {
|
||||
// TODO: Require confirming email before proceeding
|
||||
this.backendStore.addVisitedSetupPages( 'page', true );
|
||||
this.$router.push( 'page' );
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
},
|
||||
methods: {
|
||||
setup () {
|
||||
this.backendStore.addVisitedSetupPages( 'root', true );
|
||||
this.$router.push( '/setup/root' );
|
||||
this.backendStore.addVisitedSetupPages( 'basics', true );
|
||||
this.$router.push( '/setup/basics' );
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<div>
|
||||
<nav class="setup-nav">
|
||||
<router-link to="/setup">Start</router-link> |
|
||||
<router-link to="/setup/basics" v-if="backendStore.getVisitedSetupPages[ 'basics' ]">Basic setup</router-link>
|
||||
<a v-else class="inactive">Basic Setup</a> |
|
||||
<router-link to="/setup/root" v-if="backendStore.getVisitedSetupPages[ 'root' ]">Root account</router-link>
|
||||
<a v-else class="inactive">Root account</a> |
|
||||
<router-link to="/setup/page" v-if="backendStore.getVisitedSetupPages[ 'page' ]">Landing page</router-link>
|
||||
|
||||
Reference in New Issue
Block a user