diff --git a/daemon.py b/daemon.py
index 4a7df439b..2b92478af 100644
--- a/daemon.py
+++ b/daemon.py
@@ -383,7 +383,9 @@ class PubServer(BaseHTTPRequestHandler):
# if not authorized then show the login screen
if self.headers.get('Accept'):
if 'text/html' in self.headers['Accept'] and self.path!='/login':
- if '/media/' not in self.path and 'sharefiles' not in self.path:
+ if '/media/' not in self.path and \
+ '/sharefiles/' not in self.path and \
+ '/icons/' not in self.path:
if not authorized:
self.send_response(303)
self.send_header('Location', '/login')
@@ -466,7 +468,7 @@ class PubServer(BaseHTTPRequestHandler):
return
# icon images
# Note that this comes before the busy flag to avoid conflicts
- if '/icons/' in self.path:
+ if self.path.startswith('/icons/'):
if self.path.endswith('.png'):
mediaStr=self.path.split('/icons/')[1]
mediaFilename= \
@@ -538,7 +540,12 @@ class PubServer(BaseHTTPRequestHandler):
self.server.GETbusy=False
return
- if '/users/' in self.path and self.path.endswith('/newpost'):
+ if '/users/' in self.path and \
+ (self.path.endswith('/newpost') or \
+ self.path.endswith('/newunlisted') or \
+ self.path.endswith('/newfollowers') or \
+ self.path.endswith('/newdm') or \
+ self.path.endswith('/newshare')):
self._login_headers('text/html')
self.wfile.write(htmlNewPost(self.server.baseDir,self.path).encode('utf-8'))
self.server.GETbusy=False
diff --git a/epicyon-profile.css b/epicyon-profile.css
index 55c639919..dcc331921 100644
--- a/epicyon-profile.css
+++ b/epicyon-profile.css
@@ -264,37 +264,51 @@ input[type=submit]:hover {
}
.dropbtn {
- background-color: #555;
- color: white;
- padding: 12px 20px;
- border: none;
- border-radius: 4px;
- cursor: pointer;
- font-size: 18px;
+ opacity: 1.0;
}
/* The container
- needed to position the dropdown content */
.dropdown {
- position: relative;
- display: inline-block;
+ padding: 0px 14px;
+ position: relative;
+ display: inline-block;
+}
+
+.dropdown img {
+ opacity: 1.0;
+ width: 24px;
+ height: 24px;
+ padding: 0px 16px;
+ -ms-transform: translateY(-10%);
+ transform: translateY(-10%);
+}
+
+.scope-desc {
+ font-size: 18px;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
- display: none;
- position: absolute;
- background-color: #f1f1f1;
- min-width: 260px;
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
- z-index: 1;
+ display: none;
+ position: absolute;
+ background-color: #f1f1f1;
+ min-width: 300px;
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+ z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
- color: black;
- padding: 12px 16px;
- text-decoration: none;
- display: block;
+ color: black;
+ padding: 12px 16px;
+ text-decoration: none;
+ display: block;
+}
+
+.dropdown-content img {
+ width: 24px;
+ height: 24px;
+ padding: 0px 0px;
}
/* Change color of dropdown links on hover */
diff --git a/webinterface.py b/webinterface.py
index 482d2c497..b927b7ccb 100644
--- a/webinterface.py
+++ b/webinterface.py
@@ -83,26 +83,47 @@ def htmlNewPost(baseDir: str,path: str) -> str:
with open(baseDir+'/epicyon-profile.css', 'r') as cssFile:
newPostCSS = cssFile.read()
+ pathBase=path.replace('/newpost','').replace('/newshare','').replace('/newunlisted','').replace('/newfollowers','').replace('/newdm','')
+
+ scopeIcon='scope_public.png'
+ scopeDescription='Public'
+ placeholderSubject='Subject or Content Warning (optional)...'
+ placeholderMessage='Write something...'
+ if path.endswith('/newunlisted'):
+ scopeIcon='scope_unlisted.png'
+ scopeDescription='Unlisted'
+ if path.endswith('/newfollowers'):
+ scopeIcon='scope_followers.png'
+ scopeDescription='Followers Only'
+ if path.endswith('/newdm'):
+ scopeIcon='scope_dm.png'
+ scopeDescription='Direct Message'
+ if path.endswith('/newshare'):
+ scopeIcon='scope_share.png'
+ scopeDescription='Shared Item'
+ placeholderSubject='Name of the shared item...'
+ placeholderMessage='Description of the item being shared...'
+
newPostForm=htmlHeader(newPostCSS)
newPostForm+= \
'