From 77a5ccd7965329ebba58efc167eb57ca686e6185 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 4 Aug 2024 23:21:11 +0800 Subject: [PATCH] support editing templates for mobile version --- src/router/mobile.js | 10 + src/views/mobile/SettingsPage.vue | 1 + src/views/mobile/templates/ListPage.vue | 328 ++++++++++++++++++++- src/views/mobile/transactions/EditPage.vue | 208 ++++++++++--- 4 files changed, 499 insertions(+), 48 deletions(-) diff --git a/src/router/mobile.js b/src/router/mobile.js index 2e54ed66..a3fad734 100644 --- a/src/router/mobile.js +++ b/src/router/mobile.js @@ -297,6 +297,16 @@ const routes = [ async: asyncResolve(TemplateListPage), beforeEnter: [checkLogin] }, + { + path: '/template/add', + async: asyncResolve(TransactionEditPage), + beforeEnter: [checkLogin] + }, + { + path: '/template/edit', + async: asyncResolve(TransactionEditPage), + beforeEnter: [checkLogin] + }, { path: '(.*)', redirect: '/' diff --git a/src/views/mobile/SettingsPage.vue b/src/views/mobile/SettingsPage.vue index df54c10c..350756a2 100644 --- a/src/views/mobile/SettingsPage.vue +++ b/src/views/mobile/SettingsPage.vue @@ -7,6 +7,7 @@ + diff --git a/src/views/mobile/templates/ListPage.vue b/src/views/mobile/templates/ListPage.vue index 9eab22b6..5121acaa 100644 --- a/src/views/mobile/templates/ListPage.vue +++ b/src/views/mobile/templates/ListPage.vue @@ -1,16 +1,340 @@ diff --git a/src/views/mobile/transactions/EditPage.vue b/src/views/mobile/transactions/EditPage.vue index b5aa256a..80a21291 100644 --- a/src/views/mobile/transactions/EditPage.vue +++ b/src/views/mobile/transactions/EditPage.vue @@ -9,35 +9,36 @@ - + + v-if="type === 'transaction' && transaction.type === allTransactionTypes.ModifyBalance"> + - - - + + +