Merge branch 'main' of gitlab.com:bashrc2/epicyon
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 202 KiB |
|
|
@ -159,6 +159,12 @@
|
||||||
--header-font: 'Arial, Helvetica, sans-serif';
|
--header-font: 'Arial, Helvetica, sans-serif';
|
||||||
--button-bottom-margin: 10px;
|
--button-bottom-margin: 10px;
|
||||||
--rendering: normal;
|
--rendering: normal;
|
||||||
|
--voteresult-color: #dddddd;
|
||||||
|
--voteresult-border-color: #aaaaaa;
|
||||||
|
--voteresult-height: 32px;
|
||||||
|
--voteresult-height-mobile: 32px;
|
||||||
|
--voteresult-width: 80%;
|
||||||
|
--voteresult-width-mobile: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
|
@ -1724,6 +1730,16 @@ div.container {
|
||||||
}
|
}
|
||||||
.pageslist {
|
.pageslist {
|
||||||
}
|
}
|
||||||
|
.voteresult {
|
||||||
|
width: var(--voteresult-width);
|
||||||
|
height: var(--voteresult-height);
|
||||||
|
}
|
||||||
|
.voteresultbar {
|
||||||
|
height: var(--voteresult-height);
|
||||||
|
fill: var(--voteresult-color);
|
||||||
|
stroke-width: 10;
|
||||||
|
stroke: var(--voteresult-border-color)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 2200px) {
|
@media screen and (min-width: 2200px) {
|
||||||
|
|
@ -2429,4 +2445,14 @@ div.container {
|
||||||
}
|
}
|
||||||
.pageslist {
|
.pageslist {
|
||||||
}
|
}
|
||||||
|
.voteresult {
|
||||||
|
width: var(--voteresult-width-mobile);
|
||||||
|
height: var(--voteresult-height-mobile);
|
||||||
|
}
|
||||||
|
.voteresultbar {
|
||||||
|
height: var(--voteresult-height-mobile);
|
||||||
|
fill: var(--voteresult-color);
|
||||||
|
stroke-width: 10;
|
||||||
|
stroke: var(--voteresult-border-color)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
56
inbox.py
|
|
@ -2553,7 +2553,16 @@ def _receiveQuestionVote(baseDir: str, nickname: str, domain: str,
|
||||||
session, onionDomain: str, i2pDomain: str, port: int,
|
session, onionDomain: str, i2pDomain: str, port: int,
|
||||||
federationList: [], sendThreads: [], postLog: [],
|
federationList: [], sendThreads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
signingPrivateKeyPem: str) -> None:
|
signingPrivateKeyPem: str,
|
||||||
|
maxRecentPosts: int, translate: {},
|
||||||
|
allowDeletion: bool,
|
||||||
|
YTReplacementDomain: str,
|
||||||
|
twitterReplacementDomain: str,
|
||||||
|
peertubeInstances: [],
|
||||||
|
allowLocalNetworkAccess: bool,
|
||||||
|
themeName: str, systemLanguage: str,
|
||||||
|
maxLikeCount: int,
|
||||||
|
CWlists: {}, listsEnabled: bool) -> None:
|
||||||
"""Updates the votes on a Question/poll
|
"""Updates the votes on a Question/poll
|
||||||
"""
|
"""
|
||||||
# if this is a reply to a question then update the votes
|
# if this is a reply to a question then update the votes
|
||||||
|
|
@ -2565,9 +2574,6 @@ def _receiveQuestionVote(baseDir: str, nickname: str, domain: str,
|
||||||
return
|
return
|
||||||
|
|
||||||
removePostFromCache(questionJson, recentPostsCache)
|
removePostFromCache(questionJson, recentPostsCache)
|
||||||
# add id to inbox index
|
|
||||||
inboxUpdateIndex('inbox', baseDir, handle,
|
|
||||||
questionPostFilename, debug)
|
|
||||||
# ensure that the cached post is removed if it exists, so
|
# ensure that the cached post is removed if it exists, so
|
||||||
# that it then will be recreated
|
# that it then will be recreated
|
||||||
cachedPostFilename = \
|
cachedPostFilename = \
|
||||||
|
|
@ -2579,6 +2585,37 @@ def _receiveQuestionVote(baseDir: str, nickname: str, domain: str,
|
||||||
except BaseException:
|
except BaseException:
|
||||||
print('EX: replytoQuestion unable to delete ' +
|
print('EX: replytoQuestion unable to delete ' +
|
||||||
cachedPostFilename)
|
cachedPostFilename)
|
||||||
|
|
||||||
|
pageNumber = 1
|
||||||
|
showPublishedDateOnly = False
|
||||||
|
showIndividualPostIcons = True
|
||||||
|
manuallyApproveFollowers = \
|
||||||
|
followerApprovalActive(baseDir, nickname, domain)
|
||||||
|
notDM = not isDM(questionJson)
|
||||||
|
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||||
|
recentPostsCache, maxRecentPosts,
|
||||||
|
translate, pageNumber, baseDir,
|
||||||
|
session, cachedWebfingers, personCache,
|
||||||
|
nickname, domain, port, questionJson,
|
||||||
|
None, True, allowDeletion,
|
||||||
|
httpPrefix, __version__,
|
||||||
|
'inbox',
|
||||||
|
YTReplacementDomain,
|
||||||
|
twitterReplacementDomain,
|
||||||
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
|
allowLocalNetworkAccess,
|
||||||
|
themeName, systemLanguage,
|
||||||
|
maxLikeCount, notDM,
|
||||||
|
showIndividualPostIcons,
|
||||||
|
manuallyApproveFollowers,
|
||||||
|
False, True, False, CWlists,
|
||||||
|
listsEnabled)
|
||||||
|
|
||||||
|
# add id to inbox index
|
||||||
|
inboxUpdateIndex('inbox', baseDir, handle,
|
||||||
|
questionPostFilename, debug)
|
||||||
|
|
||||||
# Is this a question created by this instance?
|
# Is this a question created by this instance?
|
||||||
idPrefix = httpPrefix + '://' + domain
|
idPrefix = httpPrefix + '://' + domain
|
||||||
if not questionJson['object']['id'].startswith(idPrefix):
|
if not questionJson['object']['id'].startswith(idPrefix):
|
||||||
|
|
@ -2940,7 +2977,16 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
session, onionDomain, i2pDomain, port,
|
session, onionDomain, i2pDomain, port,
|
||||||
federationList, sendThreads, postLog,
|
federationList, sendThreads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
signingPrivateKeyPem)
|
signingPrivateKeyPem,
|
||||||
|
maxRecentPosts, translate,
|
||||||
|
allowDeletion,
|
||||||
|
YTReplacementDomain,
|
||||||
|
twitterReplacementDomain,
|
||||||
|
peertubeInstances,
|
||||||
|
allowLocalNetworkAccess,
|
||||||
|
themeName, systemLanguage,
|
||||||
|
maxLikeCount,
|
||||||
|
CWlists, listsEnabled)
|
||||||
|
|
||||||
isReplyToMutedPost = False
|
isReplyToMutedPost = False
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ def insertQuestion(baseDir: str, translate: {},
|
||||||
votes = int(questionOption['replies']['totalItems'])
|
votes = int(questionOption['replies']['totalItems'])
|
||||||
except BaseException:
|
except BaseException:
|
||||||
print('EX: insertQuestion unable to convert to int')
|
print('EX: insertQuestion unable to convert to int')
|
||||||
pass
|
|
||||||
if votes > maxVotes:
|
if votes > maxVotes:
|
||||||
maxVotes = int(votes+1)
|
maxVotes = int(votes+1)
|
||||||
|
|
||||||
|
|
@ -91,18 +90,19 @@ def insertQuestion(baseDir: str, translate: {},
|
||||||
votes = int(questionOption['replies']['totalItems'])
|
votes = int(questionOption['replies']['totalItems'])
|
||||||
except BaseException:
|
except BaseException:
|
||||||
print('EX: insertQuestion unable to convert to int 2')
|
print('EX: insertQuestion unable to convert to int 2')
|
||||||
pass
|
|
||||||
votesPercent = str(int(votes * 100 / maxVotes))
|
votesPercent = str(int(votes * 100 / maxVotes))
|
||||||
|
|
||||||
content += \
|
content += \
|
||||||
'<p><input type="text" title="' + str(votes) + \
|
'<p>\n' + \
|
||||||
'" name="skillName' + str(questionCtr) + \
|
' <label class="labels">' + \
|
||||||
'" value="' + questionOption['name'] + \
|
questionOption['name'] + '</label><br>\n' + \
|
||||||
' (' + str(votes) + ')" style="width:40%">\n'
|
' <svg class="voteresult">\n' + \
|
||||||
content += \
|
' <rect width="' + votesPercent + \
|
||||||
'<input type="range" min="1" max="100" ' + \
|
'%" class="voteresultbar" />\n' + \
|
||||||
'class="slider" title="' + \
|
' </svg>' + \
|
||||||
str(votes) + '" name="skillValue' + str(questionCtr) + \
|
' <label class="labels">' + votesPercent + '%</label>\n' + \
|
||||||
'" value="' + votesPercent + '"></p>\n'
|
'</p>\n'
|
||||||
|
|
||||||
questionCtr += 1
|
questionCtr += 1
|
||||||
content += '</div>\n'
|
content += '</div>\n'
|
||||||
return content
|
return content
|
||||||
|
|
|
||||||