Moved footer to login page

This commit is contained in:
2020-09-28 18:04:26 +00:00
parent 5c9f093cae
commit 8ddb4260fb
3 changed files with 142 additions and 134 deletions

View File

@@ -5,7 +5,7 @@
### SMALL QUICK ITEMS #####
todo: Default sample logos are fugly, make them smaller and cleaner and less ugly, maybe just a stylized text and faint background, classier looking
todo: make our logo smaller or move it when a biz logo is displaying on the login form
todo: Direct report view URL doesn't work if already logged in due to code only being in login form
need to hijack the router before navigation to intercept special urls
@@ -32,7 +32,6 @@ todo: DataListFilter UI pretty shitty
how to make a new filter?
todo: make our logo smaller or move it when a biz logo is displaying on the login form
todo: hide swagger logo and branding in api explorer

View File

@@ -244,42 +244,12 @@
</transition>
</v-container>
</v-main>
<!-- <v-footer
v-if="!isAuthenticated"
absolute
class="font-weight-medium body-2"
>
<v-col class="primary py-4 text-center white--text" cols="12">
<a
href="https://ayanova.com"
target="_blank"
style="text-decoration:none"
class="primary py-md-4 px-md-12 text-center white--text"
>
AyaNova {{ version }} {{ copyright }}
</a>
</v-col>
</v-footer> -->
<v-footer color="primary" padless v-if="!isAuthenticated">
<v-col class="text-center mb-10 mb-sm-2" cols="12">
<a
href="https://ayanova.com"
target="_blank"
style="text-decoration:none"
class="primary white--text text-caption"
>
AyaNova {{ version }} {{ copyright }}
</a>
</v-col>
</v-footer>
</v-app>
</template>
<script>
/* Xeslint-disable */
import ayaNovaVersion from "./api/ayanova-version";
import gzconfirm from "./components/gzconfirm";
import gznotify from "./components/gznotify";
import openObjectHandler from "./api/open-object-handler";
@@ -304,7 +274,6 @@ export default {
},
created() {
//Detect version change, wipe persisted form settings if has changed
let currentVersion = window.$gz.clientInfo.version;
if (currentVersion != window.$gz.store.state.lastClientVersion) {
window.$gz.store.commit(
@@ -393,12 +362,6 @@ export default {
navItems() {
return this.$store.state.navItems;
},
copyright() {
return ayaNovaVersion.copyright;
},
version() {
return ayaNovaVersion.version;
},
helpUrl() {
return this.$store.state.helpUrl;
}

View File

@@ -1,105 +1,143 @@
<template>
<v-row align="center" justify="center" class="mx-auto mt-sm-12 mb-8">
<v-col cols="12" offset-md="4">
<form>
<v-row>
<!-- Customer logo -->
<v-col v-if="hasSmallLogo" cols="12" class="hidden-md-and-up">
<div class="text-center">
<img :src="smallLogoUrl" />
</div>
</v-col>
<v-col v-if="hasMediumLogo" cols="7" class="hidden-sm-and-down">
<div class="text-center">
<img :src="mediumLogoUrl" />
</div>
</v-col>
<!-- Our branding -->
<v-col cols="12" class="hidden-md-and-up">
<v-img
:src="require('../assets/logo.svg')"
contain
height="64"
></v-img>
</v-col>
<v-col cols="12" md="7" class="hidden-sm-and-down">
<v-img
:src="require('../assets/logo.svg')"
contain
height="128"
></v-img>
</v-col>
<v-col cols="12" md="7" v-if="formState.errorBoxMessage">
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
</v-col>
<v-col cols="12" md="7" v-if="showEvalUsers == true">
<v-select
v-model="selectedTrialUserId"
:items="selectLists.trialUsers"
item-text="name"
item-value="l"
label="Trial mode example users"
prepend-icon="fa-question-circle"
@click:prepend="trialHelpClick"
@input="trialUserSelected"
return-object
:data-cy="!!$ay.dev ? 'selecttrialuser' : false"
>
</v-select>
</v-col>
<v-col cols="12" md="7">
<v-text-field
name="username"
id="username"
v-model="input.username"
prepend-icon="fa-user"
autofocus
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"
:error="errorBadCreds"
v-focus
v-on:keyup.enter="onEnterUserName"
></v-text-field>
</v-col>
<v-col cols="12" md="7">
<v-text-field
name="password"
id="password"
v-model="input.password"
:append-outer-icon="reveal ? 'fa-eye' : 'fa-eye-slash'"
prepend-icon="fa-key"
:type="reveal ? 'text' : 'password'"
:error="errorBadCreds"
v-on:keyup.enter="login"
@click:append-outer="reveal = !reveal"
></v-text-field>
</v-col>
<v-col cols="12" md="7" mt-1 mb-5>
<v-btn color="primary" v-on:click="login()" value="LOGIN">
<v-icon>fa-sign-in-alt</v-icon>
</v-btn>
</v-col>
<template v-if="$ay.dev">
<v-col cols="12">
<span class="subtitle-2 secondary--text">DEVELOPMENT MODE</span>
<div>
<v-row align="center" justify="center" class="mx-auto mt-sm-12 mb-8">
<v-col cols="12" offset-md="4">
<form>
<v-row>
<!-- Customer logo -->
<v-col v-if="hasSmallLogo" cols="12" class="hidden-md-and-up">
<div class="text-center">
<img :src="smallLogoUrl" />
</div>
</v-col>
</template>
</v-row>
</form>
</v-col>
</v-row>
<v-col v-if="hasMediumLogo" cols="7" class="hidden-sm-and-down">
<div class="text-center">
<img :src="mediumLogoUrl" />
</div>
</v-col>
<!-- Small AyaNova logo -->
<v-col cols="12" class="hidden-md-and-up" v-if="!hasSmallLogo">
<v-img
:src="require('../assets/logo.svg')"
contain
height="64"
></v-img>
</v-col>
<!-- Large AyaNova logo -->
<v-col
cols="12"
md="7"
class="hidden-sm-and-down"
v-if="!hasMediumLogo"
>
<v-img
:src="require('../assets/logo.svg')"
contain
height="128"
></v-img>
</v-col>
<v-col cols="12" md="7" v-if="formState.errorBoxMessage">
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
</v-col>
<v-col cols="12" md="7" v-if="showEvalUsers == true">
<v-select
v-model="selectedTrialUserId"
:items="selectLists.trialUsers"
item-text="name"
item-value="l"
label="Trial mode example users"
prepend-icon="fa-question-circle"
@click:prepend="trialHelpClick"
@input="trialUserSelected"
return-object
:data-cy="!!$ay.dev ? 'selecttrialuser' : false"
>
</v-select>
</v-col>
<v-col cols="12" md="7">
<v-text-field
name="username"
id="username"
v-model="input.username"
prepend-icon="fa-user"
autofocus
autocomplete="off"
autocorrect="off"
autocapitalize="off"
spellcheck="false"
:error="errorBadCreds"
v-focus
v-on:keyup.enter="onEnterUserName"
></v-text-field>
</v-col>
<v-col cols="12" md="7">
<v-text-field
name="password"
id="password"
v-model="input.password"
:append-outer-icon="reveal ? 'fa-eye' : 'fa-eye-slash'"
prepend-icon="fa-key"
:type="reveal ? 'text' : 'password'"
:error="errorBadCreds"
v-on:keyup.enter="login"
@click:append-outer="reveal = !reveal"
></v-text-field>
</v-col>
<v-col cols="12" md="7" mt-1 mb-5>
<v-btn color="primary" v-on:click="login()" value="LOGIN">
<v-icon>fa-sign-in-alt</v-icon>
</v-btn>
</v-col>
<template v-if="$ay.dev">
<v-col cols="12">
<span class="subtitle-2 secondary--text">DEVELOPMENT MODE</span>
</v-col>
</template>
</v-row>
</form>
</v-col>
</v-row>
<v-footer color="primary" padless absolute>
<div style="text-align: center;" class="mx-auto pa-4">
<a
href="https://ayanova.com"
target="_blank"
style="text-decoration:none"
class="primary white--text text-caption"
>
<div style="width: 100%;" class="mx-auto" v-if="true">
<v-img
style="margin: 0 auto;"
:src="require('../assets/logo.svg')"
width="48px"
height="48px"
max-height="48px"
max-width="48px"
contain
></v-img>
</div>
<div class="mx-auto">AyaNova {{ version }}</div>
<div class="mx-auto">
<span class="primary white--text text-caption">{{
copyright
}}</span>
</div>
</a>
</div>
</v-footer>
</div>
</template>
<script>
/* xeslint-disable */
import { processLogin, processLogout } from "../api/authutil";
import ayaNovaVersion from "../api/ayanova-version";
export default {
data() {
@@ -274,7 +312,14 @@ export default {
//squash it, this isn't critical
}
},
computed: {
copyright() {
return ayaNovaVersion.copyright;
},
version() {
return ayaNovaVersion.version;
}
},
methods: {
trialUserSelected(item) {
this.input.password = item.p;
@@ -291,6 +336,7 @@ export default {
//move focus to password
document.getElementsByName("password")[0].focus();
},
async login() {
let vm = this;
if (vm.input.username != "" && vm.input.password != "") {