From 6a08d20fe892a594ecab9eb55ba3c5486215cb84 Mon Sep 17 00:00:00 2001 From: Arc <33088785+arcbtc@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:23:34 +0000 Subject: [PATCH] v1 feat: Vue Routes (#2872) --- .gitignore | 2 + lnbits/core/templates/admin/index.html | 122 ++-- lnbits/core/templates/audit/index.html | 46 +- lnbits/core/templates/core/account.html | 9 +- lnbits/core/templates/core/extensions.html | 693 +------------------ lnbits/core/templates/core/wallet.html | 107 +-- lnbits/core/templates/node/index.html | 367 +--------- lnbits/core/templates/users/index.html | 45 +- lnbits/core/views/generic.py | 38 +- lnbits/static/bundle-components.min.js | 2 +- lnbits/static/bundle.min.js | 2 +- lnbits/static/js/account.js | 60 +- lnbits/static/js/admin.js | 27 +- lnbits/static/js/audit.js | 21 +- lnbits/static/js/base.js | 160 ++++- lnbits/static/js/components.js | 112 ++- lnbits/static/js/components/payment-chart.js | 2 +- lnbits/static/js/components/payment-list.js | 19 +- lnbits/static/js/event-reactions.js | 68 +- lnbits/static/js/extensions.js | 650 +++++++++++++++++ lnbits/static/js/init-app.js | 202 ++++++ lnbits/static/js/node.js | 363 +++++++++- lnbits/static/js/users.js | 5 +- lnbits/static/js/wallet.js | 130 ++-- lnbits/static/vendor/vue.js | 8 +- lnbits/templates/base.html | 154 ++++- lnbits/templates/components.vue | 81 +-- lnbits/templates/macros.jinja | 21 +- 28 files changed, 1919 insertions(+), 1597 deletions(-) create mode 100644 lnbits/static/js/extensions.js diff --git a/.gitignore b/.gitignore index 5d44d76e..fac45f3a 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,8 @@ lnbits/static/bundle-components.js lnbits/static/bundle.css lnbits/static/bundle.min.js.old lnbits/static/bundle.min.css.old +lnbits/static/bundle-components.min.js.old +lnbits/upgrades docker # Nix diff --git a/lnbits/core/templates/admin/index.html b/lnbits/core/templates/admin/index.html index b5183b61..d935a54d 100644 --- a/lnbits/core/templates/admin/index.html +++ b/lnbits/core/templates/admin/index.html @@ -1,60 +1,75 @@ -{% extends "base.html" %} {% from "macros.jinja" import window_vars with context -%} {% block page %} -
-
- - - - +{% if not ajax %} {% extends "base.html" %} {% endif %} {% from "macros.jinja" +import window_vars with context %} {% block scripts %} {{ window_vars(user) }} +{% endblock %} {% block page %} - - +
+
+ +
+
+
+ + + + - - - - + + - - + + + + - + + - - - - - + + + + + + + +
+
+
+
+
@@ -213,7 +228,4 @@
- -{% endblock %} {% block scripts %} {{ window_vars(user) }} - {% endblock %} diff --git a/lnbits/core/templates/audit/index.html b/lnbits/core/templates/audit/index.html index ed0e8bbc..1626ca6a 100644 --- a/lnbits/core/templates/audit/index.html +++ b/lnbits/core/templates/audit/index.html @@ -1,12 +1,39 @@ -{% extends "base.html" %} {% from "macros.jinja" import window_vars with context -%} {% block page %} +{% if not ajax %} {% extends "base.html" %} {% endif %} + +{% from "macros.jinja" import window_vars with context %} + +{% block scripts %} {{ window_vars(user) }} {% endblock %} {% block page %} +
+
+ +
+
+
+ +
+
+ + + +
+
+
+
+
+
- +
@@ -14,7 +41,7 @@
- +
@@ -22,7 +49,7 @@
- +
@@ -30,7 +57,7 @@
- +
@@ -83,11 +110,6 @@ - - - - @@ -128,7 +128,7 @@ - - - + + + - {% block page %}{% endblock %} + +
+ + +
+ + + +
+
+
+
+ + {{LNBITS_DENOMINATION}} +
+
+
+
+
+
+ + + + +
{% block page %}{% endblock %}
{% endblock %} {% block footer %} @@ -241,33 +321,43 @@ {% endfor %} {% block scripts %}{% endblock %} {% for url in INCLUDED_COMPONENTS %} diff --git a/lnbits/templates/components.vue b/lnbits/templates/components.vue index dd0cfa30..1fee4aab 100644 --- a/lnbits/templates/components.vue +++ b/lnbits/templates/components.vue @@ -1,23 +1,21 @@