Skip to content

Commit

Permalink
Show version number on log-in page
Browse files Browse the repository at this point in the history
  • Loading branch information
range-of-motion committed Dec 4, 2023
1 parent 0f51dcb commit 9db9d8f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 2 additions & 0 deletions resources/assets/js/prototype/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import TransactionsIndex from './screens/Transactions/Index.vue';
import TransactionsCreate from './screens/Transactions/Create.vue';
import SettingsPreferences from './screens/Settings/Preferences.vue';

Vue.prototype.versionNumber = window.versionNumber;

Vue.use(VueRouter);

const routes = [
Expand Down
21 changes: 12 additions & 9 deletions resources/assets/js/prototype/screens/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,19 @@ const logIn = () => {

<template>
<div class="flex items-center justify-center min-h-screen">
<div class="flex-1 max-w-sm p-5 space-y-5 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg">
<div>
<label class="block mb-2 text-sm dark:text-white">E-mail</label>
<input class="w-full px-3.5 py-2.5 text-sm dark:text-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg" type="email" v-model="email" />
<div class="flex-1 max-w-sm">
<div class="p-5 space-y-5 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg">
<div>
<label class="block mb-2 text-sm dark:text-white">E-mail</label>
<input class="w-full px-3.5 py-2.5 text-sm dark:text-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg" type="email" v-model="email" />
</div>
<div>
<label class="block mb-2 text-sm dark:text-white">Password</label>
<input class="w-full px-3.5 py-2.5 text-sm dark:text-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg" type="password" v-model="password" @keyup.enter="logIn" />
</div>
<button class="w-full py-3 text-sm text-white bg-gray-900 dark:bg-gray-950 rounded-lg" @click="logIn">Log in</button>
</div>
<div>
<label class="block mb-2 text-sm dark:text-white">Password</label>
<input class="w-full px-3.5 py-2.5 text-sm dark:text-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg" type="password" v-model="password" @keyup.enter="logIn" />
</div>
<button class="w-full py-3 text-sm text-white bg-gray-900 dark:bg-gray-950 rounded-lg" @click="logIn">Log in</button>
<div class="mt-5 text-sm text-center dark:text-white">{{ versionNumber }}</div>
</div>
</div>
</template>
3 changes: 3 additions & 0 deletions resources/views/prototype.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
<body class="bg-gray-50 dark:bg-gray-900">
<div id="app"></div>
@vite('resources/assets/js/prototype/app.js')
<script>
window.versionNumber = '{{ $versionNumber }}';
</script>
</body>
</html>

0 comments on commit 9db9d8f

Please sign in to comment.