This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/* eslint-disable */
|
||||
/* xeslint-disable */
|
||||
import logger from "./logit";
|
||||
import store from "../store";
|
||||
import roles from "./roles";
|
||||
import lt from "../api/locale";
|
||||
@@ -15,13 +16,11 @@ function addNavItem(title, icon, route) {
|
||||
// Initialize the app
|
||||
// on change of authentication status
|
||||
export default function initialize() {
|
||||
console.log("initialize called");
|
||||
//clear the nav items either way
|
||||
store.state.navItems = [];
|
||||
//clear the locale text cache
|
||||
lt.ClearCache();
|
||||
if (store.state.authenticated) {
|
||||
console.log("initialize about to call fetch");
|
||||
//fetch the required localized text keys into the cache
|
||||
lt.Fetch([
|
||||
"Home",
|
||||
@@ -35,9 +34,6 @@ export default function initialize() {
|
||||
"Logout"
|
||||
])
|
||||
.then(function() {
|
||||
console.log(
|
||||
"initialize back from fetch call, about to use the keys supposedly fetched now"
|
||||
);
|
||||
//put nav items into store
|
||||
//Everyone has a home
|
||||
addNavItem(lt.Get("Home"), "home", "/");
|
||||
@@ -92,87 +88,7 @@ export default function initialize() {
|
||||
addNavItem(lt.Get("Logout"), "sign-out-alt", "/login");
|
||||
})
|
||||
.catch(function(error) {
|
||||
// oops, mom don't buy it
|
||||
console.log(error.message);
|
||||
// output: 'mom is not happy'
|
||||
logger.log("Initialize::() -> error", error);
|
||||
});
|
||||
}
|
||||
}
|
||||
/*
|
||||
<v-list-tile to="/">
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-home</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Home</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile to="/service">
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-toolbox</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Service</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile to="/dispatch">
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-shipping-fast</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Dispatch</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile to="/inventory">
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-dolly</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Inventory</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile to="/accounting">
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-file-invoice-dollar</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Accounting</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile to="/admin">
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-user-tie</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Administration</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile to="/ops">
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-cogs</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Operations</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile to="/about">
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-info-circle</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>About</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile
|
||||
v-if="this.$store.state.authenticated"
|
||||
to="/login"
|
||||
v-on:click.native="logout()"
|
||||
>
|
||||
<v-list-tile-action>
|
||||
<v-icon>fa-sign-out-alt</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Log off</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
<v-container fluid>
|
||||
<v-layout row wrap="">
|
||||
<v-flex xs12 class="text-xs-center" mt-5>
|
||||
<h1>Login</h1>
|
||||
<v-img
|
||||
:src="require('../assets/logo.svg')"
|
||||
class="my-3"
|
||||
contain
|
||||
height="200"
|
||||
></v-img>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 offset-sm3 mt-3>
|
||||
<form>
|
||||
|
||||
@@ -33,7 +33,7 @@ WEEK OF 2018-11-12 - RAVEN shell start work. YAY!
|
||||
NEXT UP / CURRENTLY WORKING ON:
|
||||
|
||||
- Clean up the login form to use graphics and no text
|
||||
|
||||
- lookup naming guidelines for javascript functions (capitalized?) and fixup the code and stick to it.
|
||||
- Look over the (now two) api calls and look for optimization and code shrinkage / de-duplication
|
||||
- Move on to the next thing (build and post?)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user