diff --git a/lnbits/__init__.py b/lnbits/__init__.py index 8edaa4b..0002f25 100644 --- a/lnbits/__init__.py +++ b/lnbits/__init__.py @@ -27,13 +27,9 @@ Talisman( "'unsafe-eval'", "'unsafe-inline'", "blob:", - "cdnjs.cloudflare.com", - "code.ionicframework.com", - "code.jquery.com", "api.opennode.co", "fonts.googleapis.com", "fonts.gstatic.com", - "maxcdn.bootstrapcdn.com", "github.com", "avatars2.githubusercontent.com", ] diff --git a/lnbits/static/Gruntfile.js b/lnbits/static/Gruntfile.js deleted file mode 100644 index 8e2b46f..0000000 --- a/lnbits/static/Gruntfile.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; -module.exports = function (grunt) { - // load all grunt tasks - grunt.loadNpmTasks('grunt-contrib-less'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.initConfig({ - watch: { - // if any .less file changes in directory "build/less/" run the "less"-task. - files: ["build/less/*.less", "build/less/skins/*.less", "dist/js/app.js"], - tasks: ["less", "uglify"] - }, - // "less"-task configuration - //this task will compile all less files upon saving to create both AdminLTE.css and AdminLTE.min.css - less: { - //Development not compressed - development: { - options: { - //Wether to compress or not - compress: false - }, - files: { - // compilation.css : source.less - "dist/css/AdminLTE.css": "build/less/AdminLTE.less", - "dist/css/skins/skin-blue.css": "build/less/skins/skin-blue.less", - "dist/css/skins/skin-black.css": "build/less/skins/skin-black.less", - "dist/css/skins/skin-yellow.css": "build/less/skins/skin-yellow.less", - "dist/css/skins/skin-green.css": "build/less/skins/skin-green.less", - "dist/css/skins/skin-red.css": "build/less/skins/skin-red.less", - "dist/css/skins/skin-purple.css": "build/less/skins/skin-purple.less", - "dist/css/skins/_all-skins.css": "build/less/skins/_all-skins.less" - } - }, - //production compresses version - production: { - options: { - //Wether to compress or not - compress: true - }, - files: { - // compilation.css : source.less - "dist/css/AdminLTE.min.css": "build/less/AdminLTE.less", - "dist/css/skins/skin-blue.min.css": "build/less/skins/skin-blue.less", - "dist/css/skins/skin-black.min.css": "build/less/skins/skin-black.less", - "dist/css/skins/skin-yellow.min.css": "build/less/skins/skin-yellow.less", - "dist/css/skins/skin-green.min.css": "build/less/skins/skin-green.less", - "dist/css/skins/skin-red.min.css": "build/less/skins/skin-red.less", - "dist/css/skins/skin-purple.min.css": "build/less/skins/skin-purple.less", - "dist/css/skins/_all-skins.min.css": "build/less/skins/_all-skins.less" - } - } - }, - //Uglify task info. Compress the js files. - uglify: { - options: { - mangle: true, - preserveComments: 'some' - }, - my_target: { - files: { - 'dist/js/app.min.js': ['dist/js/app.js'] - } - } - } - }); - // the default task (running "grunt" in console) is "watch" - grunt.registerTask('default', ['watch']); -}; \ No newline at end of file diff --git a/lnbits/static/LICENSE b/lnbits/static/LICENSE deleted file mode 100644 index e1854e8..0000000 --- a/lnbits/static/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015 almasaeed2010 - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lnbits/static/README.md b/lnbits/static/README.md deleted file mode 100644 index 116ea28..0000000 --- a/lnbits/static/README.md +++ /dev/null @@ -1,145 +0,0 @@ -Introduction -============ - -**AdminLTE** -- is a fully responsive admin template. Based on **Bootstrap 3** framework. Highly customizable and easy to use. Fits many screen resolutions from small mobile devices to large desktops. Check out the live preview now and see for yourself. - -**Download & Preview on [Almsaeed Studio](http://almsaeedstudio.com)** - -Looking for Premium Templates? ------------------------------- -**Almsaeed studio just opened a new premium templates page. Hand picked to insure the best quality and the most affordable prices. Visit http://almsaeedstudio.com/premium for more information.** - - -!["AdminLTE Presentation"] (http://almsaeedstudio.com/AdminLTE2.png "AdminLTE Presentation") - -**AdminLTE** has been carefully coded with clear comments in all of its JS, LESS and HTML files. LESS has been used to increase code customizability. - -Installation ------------- -There are multiple ways to install AdminLTE. - -####Download: - -Download from Github or [visit Almsaeed Studio](http://almsaeedstudio.com) and download the lateset release. - -####Using The Command Line: - -**Github** - -- Fork the repository ([here is the guide](https://help.github.com/articles/fork-a-repo/)). -- Clone to your machine -``` -git clone https://github.com/YOUR_USERNAME/AdminLTE.git" -``` - -**Bower** - -``` -bower install git://github.com/almasaeed2010/AdminLTE.git -``` - -**Composer** - -``` -composer require "almasaeed2010/adminlte=~2.0" -``` - -Documentation -------------- -Visit the [online documentation](http://almsaeedstudio.com/themes/AdminLTE/documentation/index.html) for the most -updated guide. Information will be added on a weekly basis. - -Browser Support ---------------- -- IE 9+ -- Firefox (latest) -- Chrome (latest) -- Safari (latest) -- Opera (latest) - -Contribution ------------- -Contribution are always **welcome and recommended**! Here is how: - -- Fork the repository ([here is the guide](https://help.github.com/articles/fork-a-repo/)). -- Clone to your machine ```git clone https://github.com/YOUR_USERNAME/AdminLTE.git" -- Make your changes -- Create a pull request - -#### Contribution Requirements: - -- When you contribute, you agree to give a non-exclusive license to Almsaeed Studio to use that contribution in any context as we (Almsaeed Studio) see appropriate. -- If you use content provided by another party, it must be appropriately licensed using an [open source](http://opensource.org/licenses) license. -- Contributions are only accepted through Github pull requests. -- Finally, contributed code must work in all supported browsers (see above for browser support). - -License -------- -AdminLTE is an open source project by [Almsaeed Studio](http://almsaeedstudio.com) that is licensed under [MIT](http://opensource.org/licenses/MIT). Almsaeed Studio -reserves the right to change the license of future releases. - -Legacy Realeases ----------------- -AdminLTE 1.x can be easily upgraded to 2.x using [this guide](http://almsaeedstudio.com/themes/AdminLTE/documentation/index.html#browsers), but if you intend to keep using AdminLTE 1.x, you can download the latest release from the [releases](https://github.com/almasaeed2010/AdminLTE/releases) section above. - -Change log ----------- -**v2.0:** - -- Major layout bug fixes -- Change in layout mark up -- Added transitions to the sidebar -- New skins and modified previous skins -- Change in color scheme to a more complementing scheme -- Added footer support -- Removed pace.js from the main app.js -- Added support for collapsed sidebar as an initial state (add .sidebar-collapse to the body tag) -- Added boxed layout (.layout-boxed) -- Enhanced consistency in padding and margining -- Updated Bootstrap to 3.3.2 -- Fixed navbar dropdown menu on small screens positioning issues. -- Updated Ion Icons to 2.0.0 -- Updated FontAwesome to 4.3.0 -- Added ChartJS 1.0.1 -- Removed iCheck dependency -- Created Dashboard 2.0 -- Created new Chat widget (DirectChat) -- Added transitions to DirectChat -- Added contacts pane to DirectChat -- Changed .right-side to .content-wrapper -- Changed .navbar-right to .navbar-custom-menu -- Removed unused files -- Updated lockscreen style (HTML markup changed!) -- Updated Login & Registration pages (HTML markup changed!) -- Updated buttons style. -- Enhanced border-radius consistency -- Added mailbox: inbox, read, and compose pages -- Bootstrap & jQuery are now hosted locally -- Created documentation. - -**ver 1.2:** - -- Fixed the sidebar scroll issue when using the fixed layout. -- Added [Bootstrap Social Buttons](http://lipis.github.io/bootstrap-social/ "Bootstrap Social") plugin. -- Fixed RequireJS bug. Thanks to [StaticSphere](https://github.com/StaticSphere "github user"). - -**ver 1.1:** - -- Added new skin. class: .skin-black -- Added [pace](http://github.hubspot.com/pace/docs/welcome/ "pace") plugin. - -Image Credits -------------- -[Pixeden](http://www.pixeden.com/psd-web-elements/flat-responsive-showcase-psd) - -[Graphicsfuel](http://www.graphicsfuel.com/2013/02/13-high-resolution-blur-backgrounds/) - -[Pickaface](http://pickaface.net/) - -[Unsplash](https://unsplash.com/) - -Donations ---------- -Donations are **greatly appreciated!** - -[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif "AdminLTE Presentation")](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=629XCUSXBHCBC "Donate") diff --git a/lnbits/static/app.js b/lnbits/static/app.js deleted file mode 100644 index 2eb850a..0000000 --- a/lnbits/static/app.js +++ /dev/null @@ -1,516 +0,0 @@ -/** @format */ - -const user = window.user -const user_wallets = window.user_wallets -const wallet = window.wallet -const transactions = window.transactions - -var thehash = '' -var theinvoice = '' -var outamount = '' -var outmemo = '' - -// API CALLS - -function postAjax(url, data, thekey, success) { - var params = - typeof data == 'string' - ? data - : Object.keys(data) - .map(function(k) { - return encodeURIComponent(k) + '=' + encodeURIComponent(data[k]) - }) - .join('&') - var xhr = window.XMLHttpRequest - ? new XMLHttpRequest() - : new ActiveXObject('Microsoft.XMLHTTP') - xhr.open('POST', url) - xhr.onreadystatechange = function() { - if (xhr.readyState > 3 && xhr.status == 200) { - success(xhr.responseText) - } - } - xhr.setRequestHeader('Grpc-Metadata-macaroon', thekey) - xhr.setRequestHeader('Content-Type', 'application/json') - xhr.send(params) - return xhr -} - -function getAjax(url, thekey, success) { - var xhr = window.XMLHttpRequest - ? new XMLHttpRequest() - : new ActiveXObject('Microsoft.XMLHTTP') - xhr.open('GET', url, true) - xhr.onreadystatechange = function() { - if (xhr.readyState > 3 && xhr.status == 200) { - success(xhr.responseText) - } - } - xhr.setRequestHeader('Grpc-Metadata-macaroon', thekey) - xhr.setRequestHeader('Content-Type', 'application/json') - - xhr.send() - return xhr -} - - - -function sendfundsinput() { - document.getElementById('sendfunds').innerHTML = - "
" + - theinvoice + - '
' - - new QRCode(document.getElementById('qrcode'), { - text: theinvoice, - width: 300, - height: 300, - colorDark: '#000000', - colorLight: '#ffffff', - correctLevel: QRCode.CorrectLevel.M - }) - document.getElementById("qrcode").style.backgroundColor = "white"; - document.getElementById("qrcode").style.padding = "20px"; - - - setInterval(function(){ - getAjax('/api/v1/invoice/' + thehash, wallet.inkey, function(datab) { - console.log(JSON.parse(datab).PAID) - if (JSON.parse(datab).PAID == 'TRUE') { - window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user - } - })}, 3000); - - - } - ) -} - -function cancelsend() { - window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user -} - -function processing() { - document.getElementById('processing').innerHTML = - "