From d6a17f1209611cb53fd2f47b75fe17c129bd81b9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 2 Nov 2019 11:31:25 +0000 Subject: [PATCH] Shares timeline button --- webinterface.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/webinterface.py b/webinterface.py index 957091106..c1c544b3c 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2193,6 +2193,14 @@ def htmlTimeline(translate: {},pageNumber: int, \ if boxName=='tlreplies': os.remove(replyFile) + # should the Shares button be highlighted? + newShare=False + newShareFile=baseDir+'/accounts/.newShare' + if os.path.isfile(newShareFile): + newShare=True + if boxName=='tlshares': + os.remove(newShareFile) + iconsDir=getIconsDir(baseDir) cssFilename=baseDir+'/epicyon-profile.css' if os.path.isfile(baseDir+'/epicyon.css'): @@ -2213,6 +2221,7 @@ def htmlTimeline(translate: {},pageNumber: int, \ repliesButton='buttonhighlighted' mediaButton='button' sentButton='button' + sharesButton='button' moderationButton='button' if boxName=='inbox': inboxButton='buttonselected' @@ -2230,6 +2239,10 @@ def htmlTimeline(translate: {},pageNumber: int, \ sentButton='buttonselected' elif boxName=='moderation': moderationButton='buttonselected' + elif boxName=='tlshares': + sharesButton='buttonselected' + if newShare: + sharesButton='buttonselectedhighlighted' actor='/users/'+nickname showIndividualPostIcons=True @@ -2251,6 +2264,8 @@ def htmlTimeline(translate: {},pageNumber: int, \ if moderator: moderationButtonStr='' + sharesButtonStr='' + tlStr=htmlHeader(cssFilename,profileStyle) #if (boxName=='inbox' or boxName=='dm') and pageNumber==1: # refresh if on the first page of the inbox and dm timeline @@ -2275,7 +2290,7 @@ def htmlTimeline(translate: {},pageNumber: int, \ ' ' \ ' ' \ ' '+ \ - moderationButtonStr+newPostButtonStr+ \ + sharesButtonStr+moderationButtonStr+newPostButtonStr+ \ ' '+translate['Search and follow']+''+ \ ' '+translate['Calendar']+''+ \ ' '+translate['Refresh']+''+ \