diff --git a/web/router.go b/web/router.go
index b685f9a..b91696c 100644
--- a/web/router.go
+++ b/web/router.go
@@ -3,6 +3,7 @@ package web
import (
"html/template"
"net/http"
+ "strconv"
"bytes"
"context"
@@ -87,8 +88,12 @@ func getDashboard(w http.ResponseWriter, req *http.Request) {
}
func getTransactionsPage(w http.ResponseWriter, req *http.Request) {
- component := transactions_page(1);
+ accounts := make([]string, 10);
+ for i := 0; i < 10; i++ {
+ accounts[i] = strconv.Itoa(i) + " Account";
+ }
+ component := transactions_page(1, &accounts);
_, ok := req.Header["Hx-Request"]
if ok {
err := component.Render(context.Background(), w);
diff --git a/web/sass/utility-classes.scss b/web/sass/utility-classes.scss
index 6a7b7c0..ec6a253 100644
--- a/web/sass/utility-classes.scss
+++ b/web/sass/utility-classes.scss
@@ -190,6 +190,21 @@ table.table-striped {
background-color: var(--#{$prefix}-overlay2);
color: var(--#{$prefix}-bg);
border-radius: 0px 0px $border-radius $border-radius;
- transition: all 0.2s linear;
- overflow: hidden;
+ border-style: solid;
+ border-color: var(--#{$prefix}-overlay2);
+ border-width: thin;
+ transition: max-height 0.2s linear;
}
+
+.popup-menu select {
+ font-size: 1em;
+ border: none;
+ border-radius: $border-radius;
+}
+.popup-menu input {
+ width: 5em;
+ font-size: 1em;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
diff --git a/web/static/dropdowns.js b/web/static/dropdowns.js
index ef64c63..af62d34 100644
--- a/web/static/dropdowns.js
+++ b/web/static/dropdowns.js
@@ -23,39 +23,31 @@ function update_position(button, dropdown_div) {
function setup_dropdown(button) {
const dropdown_div = document.querySelector("#" + button.dataset.dropdownTarget);
update_position(button, dropdown_div);
+ dropdown_div.style.display = "none";
+ dropdown_div.style.maxHeight = "0px";
return function () {
if (dropdown_div.style.display == "none") {
-
- dropdown_div.style.removeProperty("display");
- if (button.dataset.dropdownMotion == "expand-down") {
- dropdown_div.style.display = "block";
- dropdown_div.style.maxHeight = "0px";
-
- button.style.borderBottomLeftRadius = "0px";
- button.style.borderBottomRightRadius = "0px";
- }
-
update_position(button, dropdown_div);
+ button.style.borderBottomLeftRadius = "0px";
+ button.style.borderBottomRightRadius = "0px";
+
+ dropdown_div.style.overflow = "hidden";
+ dropdown_div.style.display = "block";
+ dropdown_div.style.maxHeight = "0px";
+
setTimeout(function () {
- if (button.dataset.dropdownMotion == "expand-down") {
- dropdown_div.style.maxHeight = "100px";
- } else {
- dropdown_div.style.opacity = 1;
- }
- }, 110);
+ dropdown_div.style.maxHeight = "150px";
+ dropdown_div.style.removeProperty("overflow");
+ }, 200);
} else {
- if (button.dataset.dropdownMotion == "expand-down") {
- dropdown_div.style.maxHeight = "0px";
- } else {
- dropdown_div.style.opacity = 0;
- }
+ dropdown_div.style.overflow = "hidden";
+ dropdown_div.style.maxHeight = "0px";
setTimeout(function () {
- if (button.dataset.dropdownMotion == "expand-down") {
- button.style.removeProperty("border-bottom-left-radius");
- button.style.removeProperty("border-bottom-right-radius");
- }
+ button.style.removeProperty("border-bottom-left-radius");
+ button.style.removeProperty("border-bottom-right-radius");
dropdown_div.style.display = "none";
+ dropdown_div.style.removeProperty("overflow");
}, 200);
}
};
diff --git a/web/templates/index.html b/web/templates/index.html
index 5cc5684..1965230 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -60,7 +60,6 @@
-