'
+ if actor.endswith('/users/'+contactNickname):
+ sharedItemsForm+=' '
+ sharedItemsForm+='
'
if not resultsExist and currPage>1:
# previous page link, needs to be a POST
sharedItemsForm+= \
@@ -1583,6 +1585,52 @@ def htmlPostReplies(baseDir: str,session,wfRequest: {},personCache: {}, \
return htmlHeader()+repliesStr+htmlFooter()
+def htmlRemoveSharedItem(baseDir: str,actor: str,shareName: str) -> str:
+ """Shows a screen asking to confirm the removal of a shared item
+ """
+ nickname=getNicknameFromActor(actor)
+ domain,port=getDomainFromActor(actor)
+ sharesFile=baseDir+'/accounts/'+nickname+'@'+domain+'/shares.json'
+ if not os.path.isfile(sharesFile):
+ return None
+ sharesJson=None
+ with open(sharesFile, 'r') as fp:
+ sharesJson=commentjson.load(fp)
+ if not sharesJson:
+ return None
+ if not sharesJson.get(shareName):
+ return None
+ sharedItemDisplayName=sharesJson[shareName]['displayName']
+ sharedItemImageUrl=None
+ if sharesJson[shareName].get('imageUrl'):
+ sharedItemImageUrl=sharesJson[shareName]['imageUrl']
+
+ if os.path.isfile(baseDir+'/img/shares-background.png'):
+ if not os.path.isfile(baseDir+'/accounts/shares-background.png'):
+ copyfile(baseDir+'/img/shares-background.png',baseDir+'/accounts/shares-background.png')
+
+ with open(baseDir+'/epicyon-follow.css', 'r') as cssFile:
+ profileStyle = cssFile.read()
+ sharesStr=htmlHeader(profileStyle)
+ sharesStr+='
'
+ sharesStr+='
'
+ sharesStr+='
'
+ if sharedItemImageUrl:
+ sharesStr+=' '
+ sharesStr+='