diff --git a/epicyon-profile.css b/epicyon-profile.css index 555717bb..16bb3c3c 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -33,6 +33,10 @@ body, html { color: white; } +.highlight { + width: 2%; +} + .roles { text-align: center; left: 35%; @@ -73,7 +77,7 @@ body, html { text-align: center; font-size: 18px; padding: 10px; - width: 20%; + width: 25%; max-width: 200px; min-width: 100px; transition: all 0.5s; @@ -81,6 +85,42 @@ body, html { margin: 5px; } +.followApprove { + border-radius: 4px; + background-color: darkgreen; + border: none; + color: #FFFFFF; + text-align: center; + font-size: 18px; + padding: 10px; + width: 15%; + max-width: 150px; + min-width: 100px; + cursor: pointer; + margin: 0 15px; + float: right; +} + +.followDeny { + border-radius: 4px; + background-color: darkred; + border: none; + color: #FFFFFF; + text-align: center; + font-size: 18px; + padding: 10px; + width: 15%; + max-width: 150px; + min-width: 100px; + cursor: pointer; + margin: 0 15px; + float: right; +} + +.followRequestHandle { + padding: 0px 20px; +} + .button span { cursor: pointer; display: inline-block; @@ -116,7 +156,7 @@ body, html { padding: 10px; width: 20%; max-width: 200px; - min-width: 100px; + min-width: 140px; transition: all 0.5s; cursor: pointer; margin: 5px; @@ -169,7 +209,7 @@ body, html { .container img { float: left; max-width: 60px; - width: 100%; + width: 10%; margin-right: 20px; border-radius: 10%; } diff --git a/img/icons/new.png b/img/icons/new.png new file mode 100644 index 00000000..2ffba428 Binary files /dev/null and b/img/icons/new.png differ diff --git a/webinterface.py b/webinterface.py index ff1d363c..3f5a6508 100644 --- a/webinterface.py +++ b/webinterface.py @@ -296,8 +296,41 @@ def htmlProfile(baseDir: str,httpPrefix: str,authorized: bool, \ elif selected=='shares': sharesButton='buttonselected' loginButton='' + + followApprovalsSection='' + followApprovals='' + if not authorized: loginButton='
' + else: + # are there any follow requests? + followRequestsFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/followrequests.txt' + if os.path.isfile(followRequestsFilename): + with open(followRequestsFilename,'r') as f: + for line in f: + if len(line)>0: + # show a star on the followers tab + followApprovals='' + break + if selected=='followers': + if len(followApprovals)>0: + with open(followRequestsFilename,'r') as f: + for followerHandle in f: + if len(line)>0: + if '://' in followerHandle: + followerActor=followerHandle + else: + followerActor=httpPrefix+'://'+followerHandle.split('@')[1]+'/users/'+followerHandle.split('@')[0] + basePath=httpPrefix+'://'+domainFull+'/users/'+nickname + followApprovalsSection+='
' + followApprovalsSection+='' + followApprovalsSection+=''+followerHandle+'' + followApprovalsSection+='' + followApprovalsSection+='' + followApprovalsSection+='' + followApprovalsSection+='' + followApprovalsSection+='
' + actor=profileJson['id'] profileStr= \ '
' \ @@ -313,13 +346,15 @@ def htmlProfile(baseDir: str,httpPrefix: str,authorized: bool, \ '
' \ ' ' \ ' ' \ - ' ' \ + ' ' \ ' ' \ ' ' \ ' ' \ '
' \ '
' + profileStr+=followApprovalsSection + with open(baseDir+'/epicyon-profile.css', 'r') as cssFile: profileStyle = cssFile.read().replace('image.png',actor+'/image.png')