Remove python webserver
As Amber Web Authorization framework already provides callback webserver, python implementation is no longer needed. Signed-off-by: Ville Nummela <ville.nummela@jolla.com>
This commit is contained in:
parent
1244b85093
commit
1550be76f0
4 changed files with 0 additions and 72 deletions
|
@ -74,8 +74,6 @@ DISTFILES += qml/harbour-tooterb.qml \
|
|||
qml/pages/LoginPage.qml \
|
||||
qml/pages/Browser.qml \
|
||||
qml/lib/API.js \
|
||||
qml/lib/server.py \
|
||||
qml/lib/index.html \
|
||||
qml/images/icon-s-following \
|
||||
qml/images/icon-s-bookmark \
|
||||
qml/images/icon-m-bookmark \
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no"/>
|
||||
<style>
|
||||
body { font-family: sans-serif; background-color:black;}
|
||||
button { width: 32%; font-size: 20px; height: 40px; }
|
||||
#output { width: 100%; text-align: center; font-size: 120px; }
|
||||
</style>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function action(topic) {
|
||||
var output = document.getElementById('output');
|
||||
output.textContent = {"one": "1", "two": "2", "three": "3"}[topic]
|
||||
}
|
||||
function send(topic) {
|
||||
var customEvent = new CustomEvent("framescript:log",
|
||||
{detail: { topic: topic}});
|
||||
document.dispatchEvent(customEvent);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="output"><p>Login Complete</p></div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,43 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# POETASTER
|
||||
import sys
|
||||
sys.path.append('/usr/share/harbour-tooterb/qml')
|
||||
sys.path.append('/usr/share/harbour-tooterb/qml/lib')
|
||||
sys.path.append('/usr/share/harbour-tooterb/qml/pages')
|
||||
|
||||
# POETASTER
|
||||
|
||||
import pyotherside
|
||||
import threading
|
||||
import time
|
||||
import random
|
||||
import os
|
||||
import http.server
|
||||
import socketserver
|
||||
|
||||
PORT = 8000
|
||||
directory = '/usr/share/harbour-tooterb/qml/lib'
|
||||
Handler = http.server.SimpleHTTPRequestHandler
|
||||
os.chdir(directory)
|
||||
|
||||
def serveMe():
|
||||
with socketserver.TCPServer(("", PORT), Handler) as httpd:
|
||||
print("serving at port", PORT)
|
||||
pyotherside.send('finished', PORT)
|
||||
httpd.serve_forever()
|
||||
|
||||
class Downloader:
|
||||
def __init__(self):
|
||||
# Set bgthread to a finished thread so we never
|
||||
# have to check if it is None.
|
||||
self.bgthread = threading.Thread()
|
||||
self.bgthread.start()
|
||||
|
||||
def serve(self):
|
||||
if self.bgthread.is_alive():
|
||||
return
|
||||
self.bgthread = threading.Thread(target=serveMe)
|
||||
self.bgthread.start()
|
||||
|
||||
downloader = Downloader()
|
|
@ -22,7 +22,6 @@ Source0: %{name}-%{version}.tar.bz2
|
|||
Requires: sailfishsilica-qt5 >= 0.10.9
|
||||
Requires: nemo-qml-plugin-configuration-qt5
|
||||
Requires: nemo-qml-plugin-notifications-qt5
|
||||
Requires: pyotherside-qml-plugin-python3-qt5
|
||||
Requires: amber-web-authorization
|
||||
|
||||
BuildRequires: qt5-qttools-linguist
|
||||
|
|
Loading…
Reference in a new issue