From 4b43117ebfa70e2f6fe391822bca936731dd9956 Mon Sep 17 00:00:00 2001 From: Jonathan Krauss Date: Wed, 2 Dec 2020 14:23:30 -0800 Subject: [PATCH] UI Improvements --- package.json | 4 +-- src/components/Navbar.vue | 6 +++- src/layouts/JtSidebarLayout.vue | 2 +- src/main.ts | 1 + src/pages/DashboardPage.vue | 56 +++++++++++++++++++++--------- src/pages/TransactionPage.vue | 49 +++++++++++++++++++++----- src/router.ts | 9 +++++ src/store/modules/budget.module.ts | 2 +- yarn.lock | 18 +++------- 9 files changed, 103 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index 031e89a..0ee3486 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jadetree/frontend", - "version": "0.9.10-alpha", + "version": "0.9.11-alpha", "private": true, "scripts": { "serve": "vue-cli-service serve", @@ -9,7 +9,7 @@ }, "dependencies": { "@braid/vue-formulate": "^2.4.5", - "@jadetree/controls": "^0.9.2", + "@jadetree/controls": "^0.9.4", "@jadetree/currency": "^0.8.15", "cldr-localenames-modern": "^37.0.0", "core-js": "^3.6.5", diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index 72237b1..fb88592 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -41,7 +41,7 @@
Profile Settings - Log Out + Log Out
@@ -79,6 +79,9 @@ import { UserSchema } from '@/api/types'; ...mapState({ needsSetup: 'needsSetup', }), + ...mapState('api', { + serverMode: 'serverMode', + }), }, directives: { clickAway }, }) @@ -87,6 +90,7 @@ export default class Navbar extends Vue { private apiLoaded!: boolean; private loggedIn!: boolean; private needsSetup!: boolean; + private serverMode!: string; private user!: UserSchema; /* eslint-enable lines-between-class-members */ diff --git a/src/layouts/JtSidebarLayout.vue b/src/layouts/JtSidebarLayout.vue index 3214524..3448419 100644 --- a/src/layouts/JtSidebarLayout.vue +++ b/src/layouts/JtSidebarLayout.vue @@ -6,7 +6,7 @@ />
-
+
diff --git a/src/main.ts b/src/main.ts index 5b7b9b1..bb7c32b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -66,6 +66,7 @@ Vue.use(VueFormulate, { }, }); +Vue.config.performance = true; Vue.config.productionTip = false; async function startup() { diff --git a/src/pages/DashboardPage.vue b/src/pages/DashboardPage.vue index 1662b37..6d1eba4 100644 --- a/src/pages/DashboardPage.vue +++ b/src/pages/DashboardPage.vue @@ -7,7 +7,9 @@
-
All Accounts
+
+ All Accounts +
-
{{ account.name }}
+
+ + {{ account.name }} + +
- - Add Account - -
-

- {{ currentBudget ? currentBudget.name : '' }} -

+
+

+ {{ currentBudget ? currentBudget.name : '' }} +

+
+ + + Add Transaction + +
+
Income
@@ -220,6 +229,7 @@ import { } from '@/api/types'; import AddAccountDialog from '../dialogs/AddAccountDialog.vue'; +import AddTransactionDialog from '../dialogs/AddTransactionDialog.vue'; import JtStandardLayout from '../layouts/JtStandardLayout.vue'; @Component({ @@ -353,6 +363,14 @@ export default class DashboardPage extends Vue { }); } + /** Show the Add Transaction dialog */ + openTransactionDialog() { + this.$modalEventBus.$emit('open', { + component: AddTransactionDialog, + options: { lockFocus: true }, + }); + } + /** Sum Balances of Accounts */ sumBalances(accounts: AccountSchema[]): Money { return accounts.reduce( @@ -375,3 +393,9 @@ export default class DashboardPage extends Vue { } } + + diff --git a/src/pages/TransactionPage.vue b/src/pages/TransactionPage.vue index dfa2253..76a0628 100644 --- a/src/pages/TransactionPage.vue +++ b/src/pages/TransactionPage.vue @@ -160,14 +160,23 @@