From 0ea117c7b04e12790650201d9e2c05170955f6f1 Mon Sep 17 00:00:00 2001 From: benarc Date: Wed, 16 Sep 2020 09:39:48 +0100 Subject: [PATCH] Admin form mockup Access from /admin --- lnbits/core/static/js/admin.js | 40 +++ lnbits/core/templates/core/admin.html | 453 ++++++++++++++++++++++++++ lnbits/core/views/generic.py | 4 + lnbits/static/css/base.css | 125 ++++--- 4 files changed, 572 insertions(+), 50 deletions(-) create mode 100644 lnbits/core/static/js/admin.js create mode 100644 lnbits/core/templates/core/admin.html diff --git a/lnbits/core/static/js/admin.js b/lnbits/core/static/js/admin.js new file mode 100644 index 0000000..42b52a1 --- /dev/null +++ b/lnbits/core/static/js/admin.js @@ -0,0 +1,40 @@ +new Vue({ + el: '#vue', + mixins: [windowMixin], + data: function () { + return { + disclaimerDialog: { + show: false, + data: {} + }, + walletName: '', + primaryColor: '#FF00FF', + secondColor: '#027be3', + multiple: null, + + options: [ + 'lnurlw (mint LNURL withdraws) ', + 'lnurlp (mint LNURL pays)', + 'usermanager (API for managing users/wallets)', + 'events (manage payments & registration for an event)', + 'lndhub (link LNbits wallet to Zeus or BlueWallet)', + 'lntickets (pay per words support ticket system)', + 'paywall (paywall content)', + 'tpos (quick, shareable point of sale terminal)', + 'amilk (lnurl milker *warning extremely resource heavy)' + ] + } + }, + methods: { + createWallet: function () { + LNbits.href.createWallet(this.walletName) + }, + processing: function () { + this.$q.notify({ + timeout: 0, + message: 'Processing...', + icon: null + }) + } + } +}) diff --git a/lnbits/core/templates/core/admin.html b/lnbits/core/templates/core/admin.html new file mode 100644 index 0000000..b9f4327 --- /dev/null +++ b/lnbits/core/templates/core/admin.html @@ -0,0 +1,453 @@ +{% extends "public.html" %} {% block scripts %} {% assets filters='rjsmin', +output='__bundle__/core/admin.js', 'core/js/admin.js' %} + +{% endassets %} {% endblock %} {% block page %} +
+
+ + +

+
Welcome to LNbits
+

+
+ Fill in the information below to setup you LNbits instance. Details + can be changed later. +
+

+ + +
+ +
Branding
+
+
+ +
+
+ +
+
+
+
+ + + +
+
+ + + +
+
+ +
Service settings
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
Funding source information (at least one required).
+ + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+ + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+ + + + +
+
+ +
+
+ +
+
+
+
+
+ + + + +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+ + + + +
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+
+ + + + +
+
+ +
+
+ +
+
+
+
+
+
+ +
+ + +
+
+
+
+ View project in GitHub + Donate +
+
+
+
+
+{% endblock %} diff --git a/lnbits/core/views/generic.py b/lnbits/core/views/generic.py index 09a1edf..8376a06 100644 --- a/lnbits/core/views/generic.py +++ b/lnbits/core/views/generic.py @@ -100,3 +100,7 @@ def deletewallet(): return redirect(url_for("core.wallet", usr=g.user.id, wal=user_wallet_ids[0])) return redirect(url_for("core.home")) + +@core_app.route("/admin") +def admin_setup(): + return render_template("core/admin.html") \ No newline at end of file diff --git a/lnbits/static/css/base.css b/lnbits/static/css/base.css index ffd5309..966e659 100644 --- a/lnbits/static/css/base.css +++ b/lnbits/static/css/base.css @@ -1,71 +1,92 @@ [v-cloak] { - display: none; } + display: none; +} - .bg-lnbits-dark { - background-color: #1f2234; } +.bg-lnbits-dark { + background-color: #1f2234; +} - body.body--dark, body.body--dark .q-drawer--dark, body.body--dark .q-menu--dark { - background: #1f2234; } +body.body--dark, +body.body--dark .q-drawer--dark, +body.body--dark .q-menu--dark { + background: #1f2234; +} - body.body--dark .q-card--dark { - background: #333646; } +body.body--dark .q-card--dark { + background: #333646; +} - body.body--dark .q-table--dark { - background: transparent; } +body.body--dark .q-table--dark { + background: transparent; +} - body.body--light, body.body--light .q-drawer { - background: whitesmoke; } +body.body--light, +body.body--light .q-drawer { + background: whitesmoke; +} - body.body--dark .q-field--error .text-negative, - body.body--dark .q-field--error .q-field__messages { - color: yellow !important; } +body.body--dark .q-field--error .text-negative, +body.body--dark .q-field--error .q-field__messages { + color: yellow !important; +} .lnbits-drawer__q-list .q-item { padding-top: 5px !important; padding-bottom: 5px !important; border-top-right-radius: 3px; - border-bottom-right-radius: 3px; } - .lnbits-drawer__q-list .q-item.q-item--active { - color: inherit; - font-weight: bold; } + border-bottom-right-radius: 3px; +} +.lnbits-drawer__q-list .q-item.q-item--active { + color: inherit; + font-weight: bold; +} .lnbits__dialog-card { - width: 500px; } + width: 500px; +} - .q-table--dense th:first-child, .q-table--dense td:first-child, - .q-table--dense .q-table__bottom { - padding-left: 6px !important; } - .q-table--dense th:last-child, .q-table--dense td:last-child, - .q-table--dense .q-table__bottom { - padding-right: 6px !important; } +.q-table--dense th:first-child, +.q-table--dense td:first-child, +.q-table--dense .q-table__bottom { + padding-left: 6px !important; +} +.q-table--dense th:last-child, +.q-table--dense td:last-child, +.q-table--dense .q-table__bottom { + padding-right: 6px !important; +} a.inherit { color: inherit; - text-decoration: none; } - - video { - border-radius: 3px; } - - @font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: url(../fonts/material-icons-v50.woff2) format('woff2'); } - - .material-icons { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 24px; - line-height: 1; - letter-spacing: normal; - text-transform: none; - display: inline-block; - white-space: nowrap; - word-wrap: normal; - direction: ltr; - -moz-font-feature-settings: 'liga'; - -moz-osx-font-smoothing: grayscale; } + text-decoration: none; +} + +video { + border-radius: 3px; +} + +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url(../fonts/material-icons-v50.woff2) format('woff2'); +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -moz-font-feature-settings: 'liga'; + -moz-osx-font-smoothing: grayscale; +} .text-wrap { word-wrap: break-word; @@ -75,3 +96,7 @@ a.inherit { .mono { font-family: monospace; } + +.bg-primary { + background: #000000 !important; +}