Move peertube list into admin area

merge-requests/8/head
Bob Mottram 2020-12-24 11:56:17 +00:00
parent f16ae830b0
commit 98f5bab920
1 changed files with 17 additions and 15 deletions

View File

@ -1033,6 +1033,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
themesDropdown = ''
instanceStr = ''
editorsStr = ''
peertubeStr = ''
adminNickname = getConfigParam(baseDir, 'admin')
if adminNickname:
@ -1149,6 +1150,21 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
'<option value="' + themeName +
'" selected>')
peertubeStr = \
' <br><b><label class="labels">' + \
translate['Peertube Instances'] + '</label></b>\n'
idx = 'Show video previews for the following Peertube sites.'
peertubeStr += \
' <br><label class="labels">' + \
translate[idx] + '</label>\n'
peertubeInstancesStr = ''
for url in peertubeInstances:
peertubeInstancesStr += url + '\n'
peertubeStr += \
' <textarea id="message" name="ptInstances" ' + \
'style="height:200px">' + peertubeInstancesStr + \
'</textarea>\n'
editProfileForm = htmlHeaderWithExternalStyle(cssFilename)
# top banner
@ -1428,20 +1444,6 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
' <input type="text" name="ytdomain" value="' + \
YTReplacementDomain + '">\n'
editProfileForm += \
' <br><b><label class="labels">' + \
translate['Peertube Instances'] + '</label></b>\n'
idx = 'Show video previews for the following Peertube sites.'
editProfileForm += \
' <br><label class="labels">' + \
translate[idx] + '</label>\n'
peertubeInstancesStr = ''
for url in peertubeInstances:
peertubeInstancesStr += url + '\n'
editProfileForm += \
' <textarea id="message" name="ptInstances" ' + \
'style="height:200px">' + peertubeInstancesStr + '</textarea>\n'
editProfileForm += ' </div>\n'
editProfileForm += ' <div class="container">\n'
editProfileForm += \
@ -1454,7 +1456,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
editProfileForm += ' <label class="labels">' + \
translate[idx] + '</label>\n'
editProfileForm += skillsStr + themesDropdown
editProfileForm += moderatorsStr + editorsStr
editProfileForm += moderatorsStr + editorsStr + peertubeStr
editProfileForm += ' </div>\n' + instanceStr
editProfileForm += ' <div class="container">\n'
editProfileForm += ' <b><label class="labels">' + \