mirror of https://github.com/lukechilds/lnbits.git
committed by
GitHub
16 changed files with 451 additions and 94 deletions
@ -1,5 +1,5 @@ |
|||
{ |
|||
"name": "LNEVENTS", |
|||
"short_description": "Make LNURL withdraw links.", |
|||
"ion_icon": "calendar-outline" |
|||
"ion_icon": "calendar" |
|||
} |
@ -0,0 +1,8 @@ |
|||
from flask import Blueprint |
|||
|
|||
|
|||
example_ext = Blueprint("example", __name__, static_folder="static", template_folder="templates") |
|||
|
|||
|
|||
from .views_api import * # noqa |
|||
from .views import * # noqa |
@ -0,0 +1,5 @@ |
|||
{ |
|||
"name": "SHORT-NAME-FOR-EXTENSIONS-PAGE", |
|||
"short_description": "BLah blah blah.", |
|||
"ion_icon": "calendar" |
|||
} |
@ -0,0 +1,7 @@ |
|||
/* create your extensions table and the variables needed here */ |
|||
CREATE TABLE IF NOT EXISTS example ( |
|||
key INTEGER PRIMARY KEY AUTOINCREMENT, |
|||
usr TEXT, |
|||
wal TEXT, |
|||
walnme TEXT |
|||
); |
@ -0,0 +1,102 @@ |
|||
<!-- @format --> |
|||
|
|||
{% extends "base.html" %} {% block messages %} |
|||
|
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> |
|||
<i class="fa fa-bell-o"></i> |
|||
<span class="label label-danger">!</span> |
|||
</a> |
|||
<ul class="dropdown-menu"> |
|||
<li class="header"><b>Instant wallet, bookmark to save</b></li> |
|||
<li></li> |
|||
</ul> |
|||
{% endblock %} {% block menuitems %} |
|||
<li class="treeview"> |
|||
<a href="#"> |
|||
<i class="fa fa-bitcoin"></i> <span>Wallets</span> |
|||
<i class="fa fa-angle-left pull-right"></i> |
|||
</a> |
|||
<ul class="treeview-menu"> |
|||
{% for w in user_wallets %} |
|||
<li> |
|||
<a href="{{ url_for('wallet') }}?wal={{ w.id }}&usr={{ w.user }}" |
|||
><i class="fa fa-bolt"></i> {{ w.name }}</a |
|||
> |
|||
</li> |
|||
{% endfor %} |
|||
<li><a onclick="sidebarmake()">Add a wallet +</a></li> |
|||
<div id="sidebarmake"></div> |
|||
</ul> |
|||
</li> |
|||
|
|||
<li class="active treeview"> |
|||
<a href="#"> |
|||
<i class="fa fa-th"></i> <span>Extensions</span> |
|||
<i class="fa fa-angle-left pull-right"></i> |
|||
</a> |
|||
<ul class="treeview-menu"> |
|||
{% for extension in EXTENSIONS %} |
|||
{% if extension.code in user_ext %} |
|||
<li> |
|||
<a href="{{ url_for(extension.code + '.index') }}?usr={{ user }}"><i class="fa fa-plus"></i> {{ extension.name }}</a> |
|||
</li> |
|||
{% endif %} |
|||
{% endfor %} |
|||
<li> |
|||
<a href="{{ url_for('extensions') }}?usr={{ user }}">Manager </a></li> |
|||
</ul> |
|||
</li> |
|||
|
|||
{% endblock %} {% block body %} |
|||
<!-- Right side column. Contains the navbar and content of the page --> |
|||
<div class="content-wrapper"> |
|||
<!-- Content Header (Page header) --> |
|||
<section class="content-header"> |
|||
<h1> |
|||
Withdraw link maker |
|||
<small>powered by LNURL</small> |
|||
|
|||
</h1> |
|||
<ol class="breadcrumb"> |
|||
<li> |
|||
<a href="{{ url_for('wallet') }}?usr={{ user }}"><i class="fa fa-dashboard"></i> Home</a> |
|||
</li> |
|||
<li> |
|||
<a href="{{ url_for('extensions') }}?usr={{ user }}"><li class="fa fa-dashboard">Extensions</li></a> |
|||
</li> |
|||
<li> |
|||
<i class="active" class="fa fa-dashboard">example</i> |
|||
</li> |
|||
</ol> |
|||
<br /><br /> |
|||
|
|||
|
|||
|
|||
<!-- DOWNLOAD AND SEARCH ADMINLITE2 FOR HTML--> |
|||
|
|||
</section> |
|||
<!-- Main content --> |
|||
<section class="content"> |
|||
<!-- Small boxes (Stat box) --> |
|||
<div class="row"> |
|||
<div class="col-md-6"> |
|||
<!-- general form elements --> |
|||
<div class="box box-primary"> |
|||
<div class="box-header"> |
|||
<h3 class="box-title"> EXAMPLE BOX HEADING</h3> |
|||
</div><!-- /.box-header --> |
|||
<div class="box-body"> |
|||
<p>*Some content in here</p> |
|||
</div> |
|||
</div><!-- /.box --> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<script> |
|||
|
|||
//ADD YOUR JAVASCIPT HERE// |
|||
|
|||
</script> |
|||
</div> |
|||
{% endblock %} |
@ -0,0 +1,14 @@ |
|||
#add your dependencies here |
|||
|
|||
from flask import jsonify, render_template, request, redirect, url_for |
|||
from lnbits.db import open_db, open_ext_db |
|||
from lnbits.extensions.example import example_ext |
|||
|
|||
#add your endpoints here |
|||
|
|||
@example_ext.route("/") |
|||
def index(): |
|||
"""Try to add descriptions for others.""" |
|||
return render_template( |
|||
"example/index.html" |
|||
) |
@ -0,0 +1,18 @@ |
|||
#views_api.py is for you API endpoints that could be hit by another service |
|||
|
|||
#add your dependencies here |
|||
|
|||
import json |
|||
import requests |
|||
from flask import jsonify, render_template, request, redirect, url_for |
|||
from lnbits.db import open_db, open_ext_db |
|||
from lnbits.extensions.example import example_ext |
|||
|
|||
#add your endpoints here |
|||
|
|||
@example_ext.route("/api/v1/example", methods=["GET","POST"]) |
|||
def api_example(): |
|||
"""Try to add descriptions for others.""" |
|||
#YOUR-CODE |
|||
|
|||
return jsonify({"status": "TRUE"}), 200 |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue