Compare commits
1 Commits
bug/strip-
...
contributi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acba47fede |
26
README.md
26
README.md
@@ -35,6 +35,7 @@
|
|||||||
- [Built With](#built-with)
|
- [Built With](#built-with)
|
||||||
- [Features](#features)
|
- [Features](#features)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
|
- [Contributing](#contributing)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
- [Roadmap](#roadmap)
|
- [Roadmap](#roadmap)
|
||||||
- [Contact](#contact)
|
- [Contact](#contact)
|
||||||
@@ -157,6 +158,31 @@ Once done you will be taken to the login page.
|
|||||||
|
|
||||||
Go through the settings page once and change relevant settings before you start adding vehicles and expenses.
|
Go through the settings page once and change relevant settings before you start adding vehicles and expenses.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
### Dev Setup
|
||||||
|
|
||||||
|
If you want to contribute to the project you need to set it up
|
||||||
|
for development first.
|
||||||
|
|
||||||
|
Fork and clone the project. Once you have it on your own machine,
|
||||||
|
open up a terminal and navigate to the `server/` directory.
|
||||||
|
|
||||||
|
In the `server/` directory run the command `go run main.go`.
|
||||||
|
After some initial
|
||||||
|
setup, the server should be listening on at port `3000`.
|
||||||
|
|
||||||
|
Next, open a new terminal. Navigate to the `ui/` directory and run `npm install`.
|
||||||
|
This will install all the dependencies for the frontend.
|
||||||
|
After the command is done running, run `npm run dev`. After some output, the
|
||||||
|
frontend should be accessible at `http://localhost:8080`.
|
||||||
|
|
||||||
|
If you are sent straight to the login screen, try closing the page and opening
|
||||||
|
it again. You should be greeted with a setup wizard the first time you run the
|
||||||
|
project.
|
||||||
|
|
||||||
|
Now, simply follow the instructions in order to set up your fresh install.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Distributed under the GPL-3.0 License. See `LICENSE` for more information.
|
Distributed under the GPL-3.0 License. See `LICENSE` for more information.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
password: '',
|
password: '',
|
||||||
authError: null,
|
authError: null,
|
||||||
tryingToLogIn: false,
|
tryingToLogIn: false,
|
||||||
errorMessage: '',
|
errorMessage:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -38,7 +38,7 @@ export default {
|
|||||||
// and password they provided.
|
// and password they provided.
|
||||||
tryToLogIn() {
|
tryToLogIn() {
|
||||||
this.tryingToLogIn = true
|
this.tryingToLogIn = true
|
||||||
this.errorMessage = ''
|
this.errorMessage='';
|
||||||
// Reset the authError if it existed.
|
// Reset the authError if it existed.
|
||||||
this.authError = null
|
this.authError = null
|
||||||
return this.logIn({
|
return this.logIn({
|
||||||
@@ -53,9 +53,9 @@ export default {
|
|||||||
// Redirect to the originally requested page, or to the home page
|
// Redirect to the originally requested page, or to the home page
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error.response.data?.errors?.login) {
|
if(error.response.data?.errors?.login){
|
||||||
this.errorMessage = error.response.data.errors.login
|
this.errorMessage=error.response.data.errors.login
|
||||||
}
|
}
|
||||||
this.tryingToLogIn = false
|
this.tryingToLogIn = false
|
||||||
this.authError = error
|
this.authError = error
|
||||||
})
|
})
|
||||||
@@ -67,9 +67,21 @@ export default {
|
|||||||
<template>
|
<template>
|
||||||
<Layout>
|
<Layout>
|
||||||
<form @submit.prevent="tryToLogIn">
|
<form @submit.prevent="tryToLogIn">
|
||||||
<b-field label="Email"> <b-input v-model="username" tag="b-input" name="username" type="email" :placeholder="placeholders.username"/></b-field>
|
<b-field label="Email">
|
||||||
|
<b-input
|
||||||
|
v-model="username"
|
||||||
|
tag="b-input"
|
||||||
|
name="username"
|
||||||
|
:placeholder="placeholders.username"
|
||||||
|
/></b-field>
|
||||||
<b-field label="Password">
|
<b-field label="Password">
|
||||||
<b-input v-model="password" tag="b-input" name="password" type="password" :placeholder="placeholders.password" />
|
<b-input
|
||||||
|
v-model="password"
|
||||||
|
tag="b-input"
|
||||||
|
name="password"
|
||||||
|
type="password"
|
||||||
|
:placeholder="placeholders.password"
|
||||||
|
/>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-button tag="input" native-type="submit" :disabled="tryingToLogIn" type="is-primary">
|
<b-button tag="input" native-type="submit" :disabled="tryingToLogIn" type="is-primary">
|
||||||
<BaseIcon v-if="tryingToLogIn" name="sync" spin />
|
<BaseIcon v-if="tryingToLogIn" name="sync" spin />
|
||||||
@@ -77,7 +89,9 @@ export default {
|
|||||||
Log in
|
Log in
|
||||||
</span>
|
</span>
|
||||||
</b-button>
|
</b-button>
|
||||||
<p v-if="authError"> There was an error logging in to your account. {{ errorMessage }} </p>
|
<p v-if="authError">
|
||||||
|
There was an error logging in to your account. {{errorMessage}}
|
||||||
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</Layout>
|
</Layout>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user