app version step 1

This commit is contained in:
ogerly 2021-04-08 09:50:10 +02:00
parent 7b42a2e278
commit 9bffdd7334
4 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,5 @@
LOGIN_API_URL=http://localhost/login_api/
COMMUNITY_API_STATE_BALANCE_URL=http://localhost/state-balances/
COMMUNITY_API_TRANSACTION_CREATION_URL=http://localhost/transaction-creations/
VUE_PATH=/vue
VUE_PATH=/vue
VUE_APP_VERSION=0

View File

@ -26,8 +26,13 @@ export const store = new Vuex.Store({
'Access-Control-Allow-Credentials': 'true',
},
},
packageVersion: process.env.VUE_APP_VERSION|| '0',
},
getters: {
appVersion: (state) => {
return state.packageVersion
}
},
getters: {},
// Syncronous mutation of the state
mutations: {
language: (state, language) => {

View File

@ -25,6 +25,7 @@
</b-nav-item> -->
</b-nav>
</b-col>
My Awesome App version {{ $store.getters.appVersion }}
</b-row>
</footer>
</template>

View File

@ -1,5 +1,7 @@
const path = require('path')
const dotenv = require('dotenv-webpack')
process.env.VUE_APP_VERSION = require('./package.json').version
function resolveSrc(_path) {
return path.join(__dirname, _path)