mirror of https://gitlab.com/bashrc2/epicyon
Link follow confirmation to search screen
parent
82a8032b6c
commit
dffe45afda
|
@ -1363,7 +1363,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
return
|
||||
|
||||
# remove any trailing slashes from the path
|
||||
self.path=self.path.replace('/outbox/','/outbox').replace('/inbox/','/inbox').replace('/shares/','/shares').replace('/sharedInbox/','/sharedInbox')
|
||||
if not self.path.endswith('confirm'):
|
||||
self.path=self.path.replace('/outbox/','/outbox').replace('/inbox/','/inbox').replace('/shares/','/shares').replace('/sharedInbox/','/sharedInbox')
|
||||
|
||||
cookie=None
|
||||
if self.headers.get('Cookie'):
|
||||
|
|
|
@ -768,6 +768,12 @@ def htmlProfileAfterSearch(baseDir: str,path: str,httpPrefix: str, \
|
|||
|
||||
profileStyle = cssFile.read().replace('image.png',profileBackgroundImage)
|
||||
|
||||
# url to return to
|
||||
backUrl=path
|
||||
if not backUrl.endswith('/inbox'):
|
||||
backUrl+='/inbox'
|
||||
|
||||
print('************************ <form method="POST" action="'+backUrl+'/followconfirm">')
|
||||
profileStr= \
|
||||
' <div class="hero-image">' \
|
||||
' <div class="hero-text">' \
|
||||
|
@ -778,10 +784,13 @@ def htmlProfileAfterSearch(baseDir: str,path: str,httpPrefix: str, \
|
|||
' </div>' \
|
||||
'</div>'+ \
|
||||
'<div class="container">\n' \
|
||||
' <center>' \
|
||||
' <a href="'+path+'"><button class="button"><span>Follow </span></button></a>' \
|
||||
' <a href="'+path+'"><button class="button"><span>Go Back </span></button></a>' \
|
||||
' </center>' \
|
||||
' <form method="POST" action="'+backUrl+'/followconfirm">' \
|
||||
' <center>' \
|
||||
' <input type="hidden" name="actor" value="'+personUrl+'">' \
|
||||
' <button type="submit" class="button" name="submitYes">Follow</button>' \
|
||||
' <a href="'+backUrl+'"><button class="button">Go Back</button></a>' \
|
||||
' </center>' \
|
||||
' </form>' \
|
||||
'</div>'
|
||||
|
||||
result = []
|
||||
|
|
Loading…
Reference in New Issue