-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c55a103
commit 144e021
Showing
4 changed files
with
30 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
<SiteLogo></SiteLogo> | ||
<form @submit.prevent="login"> | ||
<OverlayLoader v-if="isLoading"></OverlayLoader> | ||
<div v-if="isDemo" class="login-page__demo-notice"> | ||
Welcome to Bar Assistant Demo instance. Use <code>[email protected]</code> as email, and <code>password</code> as password to login. | ||
</div> | ||
<div class="form-group"> | ||
<label class="form-label" for="email">{{ $t('email') }}:</label> | ||
<input id="email" v-model="email" class="form-input" type="email" required> | ||
|
@@ -62,6 +65,9 @@ export default { | |
baServerAvailable() { | ||
return this.server.version != null | ||
}, | ||
isDemo() { | ||
return window.srConfig.ENV === 'demo' | ||
} | ||
}, | ||
watch: { | ||
rememberMe: { | ||
|
@@ -76,6 +82,11 @@ export default { | |
ApiRequests.fetchApiVersion().then(data => { | ||
this.server = data | ||
this.isLoading = false | ||
if (this.isDemo) { | ||
this.email = '[email protected]' | ||
this.password = 'password' | ||
} | ||
}).catch(() => { | ||
this.isLoading = false | ||
}) | ||
|
@@ -141,4 +152,13 @@ export default { | |
.server-status__status { | ||
font-size: 0.85rem; | ||
} | ||
.login-page__demo-notice { | ||
font-size: 0.8rem; | ||
margin-bottom: 1rem; | ||
} | ||
.login-page__demo-notice code { | ||
color: var(--clr-accent-700); | ||
} | ||
</style> |