mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
small setup patches (spelling mistakes)
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
<h2>General information</h2>
|
||||
<label for="name">Name of the website</label><br>
|
||||
<input type="text" name="name" id="name" v-model="formData.websiteName"><br>
|
||||
<label for="name">URL of the website</label><br>
|
||||
<input type="text" name="domain" id="domain" v-model="formData.yourDomain"><br>
|
||||
|
||||
|
||||
<h2>Database</h2>
|
||||
@@ -108,7 +110,6 @@ export default {
|
||||
},
|
||||
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' );
|
||||
@@ -149,7 +150,7 @@ export default {
|
||||
this.$router.push( '/setup/root' );
|
||||
},
|
||||
collectUrl() {
|
||||
this.formData.yourDomain = location.protocol + '//' + location.host;
|
||||
this.formData.yourDomain = location.protocol + '//' + location.host + ( location.port ? ':' + location.port : '' );
|
||||
this.formData.db.host = location.hostname;
|
||||
}
|
||||
},
|
||||
@@ -157,6 +158,7 @@ export default {
|
||||
if ( sessionStorage.getItem( 'basics' ) ) {
|
||||
this.formData = JSON.parse( sessionStorage.getItem( 'basics' ) );
|
||||
}
|
||||
this.collectUrl();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -124,15 +124,14 @@ export default {
|
||||
let requirementsCount = { 'special': 0, 'numbers': 0, 'lower': 0, 'upper': 0, 'incorrect': '' };
|
||||
const pw = this.formData.password;
|
||||
for ( let l in pw ) {
|
||||
console.log( pw[ l ] );
|
||||
if ( /[a-z]/.test( pw[ l ] ) ) {
|
||||
requirementsCount[ 'lower' ] += 1;
|
||||
} else if ( /[A-Z]/.test( pw[ l ] ) ) {
|
||||
requirementsCount[ 'upper' ] += 1;
|
||||
} else if ( lookup.includes( pw[ l ] ) ) {
|
||||
requirementsCount[ 'special' ] += 1;
|
||||
} else if ( !isNaN( pw[ l ] * 1 ) ) {
|
||||
requirementsCount[ 'number' ] += 1;
|
||||
} else if ( !isNaN( pw[ l ] ) ) {
|
||||
requirementsCount[ 'numbers' ] += 1;
|
||||
} else {
|
||||
console.log( 'incorrect letter' );
|
||||
requirementsCount[ 'incorrect' ] = pw[ l ];
|
||||
|
||||
Reference in New Issue
Block a user