diff --git a/templates/dashboard.html b/templates/dashboard.html
index 975b57b..f7dbb0a 100644
--- a/templates/dashboard.html
+++ b/templates/dashboard.html
@@ -1,15 +1,16 @@
{{ define "main" }}
-
Ledger Quick Note
+Ledger 速記
{{ template "scripts" .Scripts }}
{{ end }}
diff --git a/templates/layouts/scripts.html b/templates/layouts/scripts.html
index b049d4d..bdfd6d9 100644
--- a/templates/layouts/scripts.html
+++ b/templates/layouts/scripts.html
@@ -1,5 +1,5 @@
{{ define "scripts" }}
-常用指令
+快速查詢
{{ range $k, $v := . }}
- {{ $k }}
diff --git a/tx.go b/tx.go
index 34deb33..a93eead 100644
--- a/tx.go
+++ b/tx.go
@@ -9,11 +9,12 @@ import (
)
type TxData struct {
- Action string `form:"action" binding:"required"`
- Name string `form:"name"`
- Date string
- Amount string `form:"amount" binding:"required"`
- Account string `form:"account"`
+ Action string `form:"action" binding:"required"`
+ Name string `form:"name"`
+ Date string
+ Amount string `form:"amount" binding:"required"`
+ Destination string `form:"dest"`
+ Source string `form:"src"`
}
func newTx(data TxData) (result string, err error) {
diff --git a/tx/expense.txt b/tx/expense.txt
index a7cf3b5..e2f2ce6 100644
--- a/tx/expense.txt
+++ b/tx/expense.txt
@@ -1,4 +1,4 @@
-{{ .Date }} {{ with .Name }}{{ . }}{{ else }}{{ .Account }}{{ end }}
- {{ .Account }} ${{ .Amount }}
- cash
+{{ .Date }} {{ with .Name }}{{ . }}{{ else }}{{ .Destination }}{{ end }}
+ {{ .Destination }} ${{ .Amount }}
+ {{ with .Source }}{{ . }}{{ else }}cash{{ end }}