From 51a12099e4f4f333a2275bbdc670b95f9639a53f Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 20 Apr 2016 21:25:19 -0700 Subject: [PATCH] Initial implementation of login control --- data/interfaces/default/base.html | 72 ++++---- data/interfaces/default/css/plexpy.css | 66 ++++++++ data/interfaces/default/graphs.html | 38 ++--- data/interfaces/default/history.html | 18 +- .../default/history_table_modal.html | 2 +- data/interfaces/default/home_stats.html | 40 ++--- data/interfaces/default/index.html | 2 +- data/interfaces/default/info.html | 28 ++-- data/interfaces/default/js/script.js | 58 +++---- .../interfaces/default/js/tables/libraries.js | 2 +- data/interfaces/default/js/tables/users.js | 2 +- data/interfaces/default/libraries.html | 18 +- data/interfaces/default/library.html | 20 +-- data/interfaces/default/login.html | 66 ++++++++ data/interfaces/default/logs.html | 18 +- data/interfaces/default/settings.html | 6 +- data/interfaces/default/sync.html | 16 +- data/interfaces/default/user.html | 22 +-- data/interfaces/default/users.html | 18 +- data/interfaces/default/welcome.html | 26 +-- plexpy/__init__.py | 2 + plexpy/webauth.py | 158 ++++++++++++++++++ plexpy/webserve.py | 14 +- plexpy/webstart.py | 53 +++--- 24 files changed, 541 insertions(+), 224 deletions(-) create mode 100644 data/interfaces/default/login.html create mode 100644 plexpy/webauth.py diff --git a/data/interfaces/default/base.html b/data/interfaces/default/base.html index e32ba5d3..7dc07bf0 100644 --- a/data/interfaces/default/base.html +++ b/data/interfaces/default/base.html @@ -12,14 +12,14 @@ from plexpy.helpers import anon_url - - + + - + ${next.headIncludes()} - - + + @@ -33,99 +33,99 @@ from plexpy.helpers import anon_url - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - - - - - - - - - @@ -158,7 +158,7 @@ from plexpy.helpers import anon_url - PlexPy + PlexPy - - - + + + - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + + + % if len(top_stat['rows']) > 1: @@ -672,7 +672,7 @@ DOCUMENTATION :: END
@@ -725,7 +725,7 @@ DOCUMENTATION :: END
% else:
-
+
% endif @@ -771,7 +771,7 @@ DOCUMENTATION :: END % else:
-
+
% endif @@ -807,7 +807,7 @@ DOCUMENTATION :: END
-
+
% if len(top_stat['rows']) > 1:
@@ -839,7 +839,7 @@ DOCUMENTATION :: END
-
+
% endif diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html index a430bfcc..59022365 100644 --- a/data/interfaces/default/index.html +++ b/data/interfaces/default/index.html @@ -65,7 +65,7 @@ <%def name="javascriptIncludes()"> - + - - - - - + + + + + + % if data: - + % if data['media_type'] == 'show' or data['media_type'] == 'artist': - - - - - + + + + + + - - - + + + + % if data: - - - + + + + + + + + \ No newline at end of file diff --git a/data/interfaces/default/logs.html b/data/interfaces/default/logs.html index 9bafbaab..d9304bbf 100644 --- a/data/interfaces/default/logs.html +++ b/data/interfaces/default/logs.html @@ -4,8 +4,8 @@ from plexpy import helpers %> <%def name="headIncludes()"> - - + + @@ -107,13 +107,13 @@ from plexpy import helpers <%def name="javascriptIncludes()"> - - - - - - - + + + + + + + - - + + + - - - - + + + + + - - - + + + + % if data: - - - - + + + + - - - - - + + + + + + - - - - + + + + +