-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ceelogre/topic/users
Users UC implementation
- Loading branch information
Showing
28 changed files
with
967 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules | |
.nyc_output | ||
.vscode | ||
coverage/ | ||
.later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<template> | ||
<div> | ||
<nav class="navbar has-shadow" > | ||
<div class="navbar-brand"> | ||
<a class="navbar-item" href="#"> | ||
<img src="../assets/chat.png" alt="Octopact"> | ||
</a> | ||
<div class="navbar-burger burger"> | ||
<span></span> | ||
</div> | ||
</div> | ||
|
||
<div class="navbar-menu"> | ||
<div class="navbar-start"> | ||
<div class="navbar-item"> | ||
<h3>Dista - Events</h3> | ||
</div> | ||
</div> | ||
<div class="navbar-end"> | ||
<div class="navbar-item has-dropdown is-hoverable"> | ||
<div class="navbar-link"> | ||
{{ handle }} | ||
</div> | ||
<div class="navbar-dropdown"> | ||
<a class="navbar-item"> | ||
<span class="icon is-small"> | ||
<i class="fa fa-user-circle-o"></i> | ||
</span> Profile | ||
</a> | ||
<a @click="endUserSession()" class="navbar-item"> | ||
<span class="icon is-small"> | ||
<i class="fa fa-sign-out"></i> | ||
</span> Sign Out | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</nav> | ||
<section class="section"> | ||
<div class="columns"> | ||
<div class="column is-4-tablet is-3-desktop is-2-widescreen"> | ||
<aside class="menu"> | ||
<p class="menu-label">Menu</p> | ||
<ul class="menu-list"> | ||
<li> | ||
<router-link to="/signup"> | ||
<span class="icon"> | ||
<i class="fa fa-tachometer"></i> | ||
</span> Register | ||
</router-link> | ||
</li> | ||
<li> | ||
<router-link to="/signin"> | ||
<span class="icon"> | ||
<i class="fa fa-book"></i> | ||
</span> Login | ||
</router-link> | ||
</li> | ||
</ul> | ||
</aside> | ||
</div> | ||
<main class="column"> | ||
<router-view/> | ||
</main> | ||
</div> | ||
</section> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
handle: window.localStorage.getItem('handle') | ||
} | ||
}, | ||
methods: { | ||
endUserSession () { | ||
window.localStorage.removeItem('handle') | ||
window.localStorage.removeItem('uToken') | ||
this.$router.push('/') | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import axios from 'axios' | ||
const server = '/api/v1/' | ||
const apiClient = axios.create({ | ||
baseURL: server, | ||
withCredentials: false, | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json' | ||
} | ||
}) | ||
|
||
export default { | ||
createUser (user) { | ||
return apiClient.post('/users', user) | ||
}, | ||
signin (user) { | ||
return apiClient.post('/users/auth', user) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.