mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
progress on docs, fixes in basic setup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"init":true,
|
||||
"setupDone":true,
|
||||
"setupDone":false,
|
||||
"twoFA":"enforce",
|
||||
"twoFAMode":"enhanced",
|
||||
"db":"mysql",
|
||||
|
||||
@@ -22,6 +22,7 @@ module.exports = ( app, settings ) => {
|
||||
|
||||
app.post( '/setup/start', bodyParser.json(), ( request, response ) => {
|
||||
if ( request.body.token === '' + fs.readFileSync( path.join( __dirname + '/../setupkey.txt' ) ) ) {
|
||||
request.session.setupKeyOk = true;
|
||||
response.send( 'ok' );
|
||||
} else {
|
||||
response.status( 400 ).send( 'incorrect' );
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
source.close();
|
||||
}, 500 );
|
||||
setTimeout( () => {
|
||||
$( 'manual-download' ).slideDown( 500 );
|
||||
$( '#manual-download' ).slideDown( 500 );
|
||||
}, 2000 );
|
||||
} else if ( e.data === 'paymentOk' ) {
|
||||
self.$refs.notification.createNotification( 'Your payment has been marked as completed!', 5, 'ok', 'normal' );
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
this.collectUrl();
|
||||
if ( this.formData.dbType === 'mysql' ) {
|
||||
if ( !this.formData.db.port || !this.formData.db.host || !this.formData.db.database || !this.formData.db.user || !this.formData.db.password ) {
|
||||
this.$refs.notification.createNotification( 'Database settings are not complete!', 5, 'error', 'normal' );
|
||||
@@ -141,6 +142,10 @@
|
||||
sessionStorage.setItem( 'basics', JSON.stringify( this.formData ) );
|
||||
this.backendStore.addVisitedSetupPages( 'root', true );
|
||||
this.$router.push( '/setup/root' );
|
||||
},
|
||||
collectUrl() {
|
||||
this.formData.yourDomain = location.protocol + '//' + location.host;
|
||||
this.formData.db.host = location.hostname;
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
Reference in New Issue
Block a user