Skip to content

Commit

Permalink
Add demo instance notice
Browse files Browse the repository at this point in the history
  • Loading branch information
karlomikus committed Nov 17, 2023
1 parent c55a103 commit 144e021
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v2.1.2
## Changes
- Removed unused docker vars
- Added demo instance notice

# v2.1.1
## Fixes
- Added missing ingredient optional mark on shared recipes

# v2.1.0
## New
- You can now share specific collections with rest of the bar members
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ FROM node:current-alpine3.15 as build

ARG BUILD_VERSION
ENV BUILD_VERSION=${BUILD_VERSION:-develop}
ARG ANALYTICS_SCRIPT=""
ENV ANALYTICS_SCRIPT=${ANALYTICS_SCRIPT}
ARG APP_ENV="production"
ENV APP_ENV=${APP_ENV}

WORKDIR /app
COPY package*.json .
Expand Down
1 change: 1 addition & 0 deletions docker/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ window.srConfig.VERSION = "{{VERSION}}"
window.srConfig.API_URL = "$API_URL"
window.srConfig.MEILISEARCH_URL = "$MEILISEARCH_URL";
window.srConfig.DEFAULT_LOCALE = "$DEFAULT_LOCALE";
window.srConfig.ENV = "$SALT_RIM_ENV";
20 changes: 20 additions & 0 deletions src/components/Auth/AuthLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -62,6 +65,9 @@ export default {
baServerAvailable() {
return this.server.version != null
},
isDemo() {
return window.srConfig.ENV === 'demo'
}
},
watch: {
rememberMe: {
Expand All @@ -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
})
Expand Down Expand Up @@ -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>

0 comments on commit 144e021

Please sign in to comment.