mirror of https://gitlab.com/bashrc2/epicyon
Wait screen isn't possible without keeping the socket open and getting into fancy javascript stuff
parent
71a2799397
commit
6b09ff0edd
18
daemon.py
18
daemon.py
|
@ -152,7 +152,6 @@ from webinterface import rssHashtagSearch
|
||||||
from webinterface import htmlModerationInfo
|
from webinterface import htmlModerationInfo
|
||||||
from webinterface import htmlSearchSharedItems
|
from webinterface import htmlSearchSharedItems
|
||||||
from webinterface import htmlHashtagBlocked
|
from webinterface import htmlHashtagBlocked
|
||||||
from webinterface import htmlSendingPost
|
|
||||||
from shares import getSharesFeedForPerson
|
from shares import getSharesFeedForPerson
|
||||||
from shares import addShare
|
from shares import addShare
|
||||||
from shares import removeShare
|
from shares import removeShare
|
||||||
|
@ -483,16 +482,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _headers_without_response(self, fileFormat: str, length: int,
|
|
||||||
callingDomain: str) -> None:
|
|
||||||
self.send_header('Content-type', fileFormat)
|
|
||||||
self.send_header('Content-Length', str(length))
|
|
||||||
self.send_header('Host', callingDomain)
|
|
||||||
self.send_header('WWW-Authenticate',
|
|
||||||
'title="Login to Epicyon", Basic realm="epicyon"')
|
|
||||||
self.send_header('X-Robots-Tag', 'noindex')
|
|
||||||
self.end_headers()
|
|
||||||
|
|
||||||
def _login_headers(self, fileFormat: str, length: int,
|
def _login_headers(self, fileFormat: str, length: int,
|
||||||
callingDomain: str) -> None:
|
callingDomain: str) -> None:
|
||||||
self.send_response(200)
|
self.send_response(200)
|
||||||
|
@ -9711,13 +9700,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
print('New post begins: ' + postType + ' ' + path)
|
print('New post begins: ' + postType + ' ' + path)
|
||||||
|
|
||||||
msg = \
|
|
||||||
htmlSendingPost(self.server.baseDir,
|
|
||||||
self.server.translate).encode('utf-8')
|
|
||||||
self._headers_without_response('text/html', len(msg), callingDomain)
|
|
||||||
self._write(msg)
|
|
||||||
self.wfile.flush()
|
|
||||||
|
|
||||||
if '?page=' in path:
|
if '?page=' in path:
|
||||||
pageNumberStr = path.split('?page=')[1]
|
pageNumberStr = path.split('?page=')[1]
|
||||||
if '?' in pageNumberStr:
|
if '?' in pageNumberStr:
|
||||||
|
|
|
@ -1,86 +0,0 @@
|
||||||
@charset "UTF-8";
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--main-bg-color: #282c37;
|
|
||||||
--link-bg-color: #282c37;
|
|
||||||
--main-bg-color-darker: #232c37;
|
|
||||||
--main-bg-color-report: #221c27;
|
|
||||||
--main-header-color-roles: #282237;
|
|
||||||
--main-fg-color: #dddddd;
|
|
||||||
--main-link-color: #999;
|
|
||||||
--main-visited-color: #888;
|
|
||||||
--border-color: #505050;
|
|
||||||
--font-size-header: 18px;
|
|
||||||
--font-color-header: #ccc;
|
|
||||||
--font-size: 22px;
|
|
||||||
--text-entry-foreground: #ccc;
|
|
||||||
--text-entry-background: #111;
|
|
||||||
--time-color: #aaa;
|
|
||||||
--button-text: #FFFFFF;
|
|
||||||
--button-background: #999;
|
|
||||||
--button-selected: #666;
|
|
||||||
--focus-color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Bedstead';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: normal;
|
|
||||||
font-display: block;
|
|
||||||
src: url('./fonts/bedstead.otf') format('opentype');
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Bedstead';
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: normal;
|
|
||||||
font-display: block;
|
|
||||||
src: url('./fonts/bedstead.otf') format('opentype');
|
|
||||||
}
|
|
||||||
|
|
||||||
body, html {
|
|
||||||
background-color: var(--main-bg-color);
|
|
||||||
color: var(--main-fg-color);
|
|
||||||
|
|
||||||
height: 100%;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
max-width: 80%;
|
|
||||||
min-width: 600px;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-size: var(--font-size);
|
|
||||||
}
|
|
||||||
|
|
||||||
a, u {
|
|
||||||
color: var(--main-fg-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
a:visited{
|
|
||||||
color: var(--main-visited-color);
|
|
||||||
background: var(--link-bg-color);
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:link {
|
|
||||||
color: var(--main-link-color);
|
|
||||||
background: var(--link-bg-color);
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:focus {
|
|
||||||
border: 2px solid var(--focus-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.screentitle {
|
|
||||||
font-size: 30px;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
div {
|
|
||||||
height: 300px;
|
|
||||||
width: 400px;
|
|
||||||
background: var(--main-bg-color);
|
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
margin-top: -100px;
|
|
||||||
margin-left: -200px;
|
|
||||||
}
|
|
2
theme.py
2
theme.py
|
@ -15,7 +15,7 @@ from shutil import copyfile
|
||||||
def getThemeFiles() -> []:
|
def getThemeFiles() -> []:
|
||||||
return ('epicyon.css', 'login.css', 'follow.css',
|
return ('epicyon.css', 'login.css', 'follow.css',
|
||||||
'suspended.css', 'calendar.css', 'blog.css',
|
'suspended.css', 'calendar.css', 'blog.css',
|
||||||
'options.css', 'search.css', 'send.css')
|
'options.css', 'search.css')
|
||||||
|
|
||||||
|
|
||||||
def getThemesList() -> []:
|
def getThemesList() -> []:
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "علامات التجزئة المُنشأة تلقائيًا",
|
"Autogenerated Hashtags": "علامات التجزئة المُنشأة تلقائيًا",
|
||||||
"Autogenerated Content Warnings": "تحذيرات المحتوى المُنشأ تلقائيًا",
|
"Autogenerated Content Warnings": "تحذيرات المحتوى المُنشأ تلقائيًا",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag محظور",
|
"Hashtag Blocked": "Hashtag محظور"
|
||||||
"Sending Post": "إرسال آخر",
|
|
||||||
"Please wait": "ارجوك انتظر"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Hashtags autogenerats",
|
"Autogenerated Hashtags": "Hashtags autogenerats",
|
||||||
"Autogenerated Content Warnings": "Advertiments de contingut autogenerats",
|
"Autogenerated Content Warnings": "Advertiments de contingut autogenerats",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloquejat",
|
"Hashtag Blocked": "Hashtag bloquejat"
|
||||||
"Sending Post": "S'està enviant el missatge",
|
|
||||||
"Please wait": "Espereu, si us plau"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Hashtags awtogeneiddiedig",
|
"Autogenerated Hashtags": "Hashtags awtogeneiddiedig",
|
||||||
"Autogenerated Content Warnings": "Rhybuddion Cynnwys Autogenerated",
|
"Autogenerated Content Warnings": "Rhybuddion Cynnwys Autogenerated",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag wedi'i Blocio",
|
"Hashtag Blocked": "Hashtag wedi'i Blocio"
|
||||||
"Sending Post": "Post Anfon",
|
|
||||||
"Please wait": "Arhoswch os gwelwch yn dda"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Automatisch generierte Hashtags",
|
"Autogenerated Hashtags": "Automatisch generierte Hashtags",
|
||||||
"Autogenerated Content Warnings": "Warnungen vor automatisch generierten Inhalten",
|
"Autogenerated Content Warnings": "Warnungen vor automatisch generierten Inhalten",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag blockiert",
|
"Hashtag Blocked": "Hashtag blockiert"
|
||||||
"Sending Post": "Post senden",
|
|
||||||
"Please wait": "Warten Sie mal"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Autogenerated Hashtags",
|
"Autogenerated Hashtags": "Autogenerated Hashtags",
|
||||||
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
|
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag Blocked",
|
"Hashtag Blocked": "Hashtag Blocked"
|
||||||
"Sending Post": "Sending Post",
|
|
||||||
"Please wait": "Please wait"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Hashtags autogenerados",
|
"Autogenerated Hashtags": "Hashtags autogenerados",
|
||||||
"Autogenerated Content Warnings": "Advertencias de contenido generado automáticamente",
|
"Autogenerated Content Warnings": "Advertencias de contenido generado automáticamente",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloqueada",
|
"Hashtag Blocked": "Hashtag bloqueada"
|
||||||
"Sending Post": "Envío de publicación",
|
|
||||||
"Please wait": "por favor espera"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Hashtags générés automatiquement",
|
"Autogenerated Hashtags": "Hashtags générés automatiquement",
|
||||||
"Autogenerated Content Warnings": "Avertissements de contenu générés automatiquement",
|
"Autogenerated Content Warnings": "Avertissements de contenu générés automatiquement",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloqué",
|
"Hashtag Blocked": "Hashtag bloqué"
|
||||||
"Sending Post": "Envoi du message",
|
|
||||||
"Please wait": "S'il vous plaît, attendez"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Hashtags uathghinte",
|
"Autogenerated Hashtags": "Hashtags uathghinte",
|
||||||
"Autogenerated Content Warnings": "Rabhaidh Ábhar Uathghinte",
|
"Autogenerated Content Warnings": "Rabhaidh Ábhar Uathghinte",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag Blocáilte",
|
"Hashtag Blocked": "Hashtag Blocáilte"
|
||||||
"Sending Post": "Post Seolta",
|
|
||||||
"Please wait": "Fán le do thoil"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "ऑटोजेनरेटेड हैशटैग",
|
"Autogenerated Hashtags": "ऑटोजेनरेटेड हैशटैग",
|
||||||
"Autogenerated Content Warnings": "स्वतः प्राप्त सामग्री चेतावनी",
|
"Autogenerated Content Warnings": "स्वतः प्राप्त सामग्री चेतावनी",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "हैशटैग अवरुद्ध",
|
"Hashtag Blocked": "हैशटैग अवरुद्ध"
|
||||||
"Sending Post": "पोस्ट भेज रहा है",
|
|
||||||
"Please wait": "कृपया प्रतीक्षा कीजिये"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Hashtag generati automaticamente",
|
"Autogenerated Hashtags": "Hashtag generati automaticamente",
|
||||||
"Autogenerated Content Warnings": "Avvisi sui contenuti generati automaticamente",
|
"Autogenerated Content Warnings": "Avvisi sui contenuti generati automaticamente",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloccato",
|
"Hashtag Blocked": "Hashtag bloccato"
|
||||||
"Sending Post": "Invio di post",
|
|
||||||
"Please wait": "attendere prego"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "自動生成されたハッシュタグ",
|
"Autogenerated Hashtags": "自動生成されたハッシュタグ",
|
||||||
"Autogenerated Content Warnings": "自動生成されたコンテンツの警告",
|
"Autogenerated Content Warnings": "自動生成されたコンテンツの警告",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "ハッシュタグがブロックされました",
|
"Hashtag Blocked": "ハッシュタグがブロックされました"
|
||||||
"Sending Post": "投稿を送信する",
|
|
||||||
"Please wait": "お待ちください"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -283,7 +283,5 @@
|
||||||
"Autogenerated Hashtags": "Autogenerated Hashtags",
|
"Autogenerated Hashtags": "Autogenerated Hashtags",
|
||||||
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
|
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag Blocked",
|
"Hashtag Blocked": "Hashtag Blocked"
|
||||||
"Sending Post": "Sending Post",
|
|
||||||
"Please wait": "Please wait"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Hashtags autogeradas",
|
"Autogenerated Hashtags": "Hashtags autogeradas",
|
||||||
"Autogenerated Content Warnings": "Avisos de conteúdo gerado automaticamente",
|
"Autogenerated Content Warnings": "Avisos de conteúdo gerado automaticamente",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloqueada",
|
"Hashtag Blocked": "Hashtag bloqueada"
|
||||||
"Sending Post": "Enviando postagem",
|
|
||||||
"Please wait": "Por favor, espere"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "Автоматически сгенерированные хештеги",
|
"Autogenerated Hashtags": "Автоматически сгенерированные хештеги",
|
||||||
"Autogenerated Content Warnings": "Автоматические предупреждения о содержании",
|
"Autogenerated Content Warnings": "Автоматические предупреждения о содержании",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Хештег заблокирован",
|
"Hashtag Blocked": "Хештег заблокирован"
|
||||||
"Sending Post": "Отправка сообщения",
|
|
||||||
"Please wait": "пожалуйста, подождите"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,5 @@
|
||||||
"Autogenerated Hashtags": "自动生成的标签",
|
"Autogenerated Hashtags": "自动生成的标签",
|
||||||
"Autogenerated Content Warnings": "自动生成的内容警告",
|
"Autogenerated Content Warnings": "自动生成的内容警告",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "标签被阻止",
|
"Hashtag Blocked": "标签被阻止"
|
||||||
"Sending Post": "发送帖子",
|
|
||||||
"Please wait": "请稍候"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2006,27 +2006,6 @@ def htmlHashtagBlocked(baseDir: str, translate: {}) -> str:
|
||||||
return blockedHashtagForm
|
return blockedHashtagForm
|
||||||
|
|
||||||
|
|
||||||
def htmlSendingPost(baseDir: str, translate: {}) -> str:
|
|
||||||
"""A wait screen while sending a post
|
|
||||||
"""
|
|
||||||
sendForm = ''
|
|
||||||
cssFilename = baseDir + '/epicyon-send.css'
|
|
||||||
if os.path.isfile(baseDir + '/send.css'):
|
|
||||||
cssFilename = baseDir + '/send.css'
|
|
||||||
with open(cssFilename, 'r') as cssFile:
|
|
||||||
sendingCSS = cssFile.read()
|
|
||||||
sendForm = htmlHeader(cssFilename, sendingCSS)
|
|
||||||
sendForm += '<div><center>\n'
|
|
||||||
sendForm += \
|
|
||||||
' <p class="screentitle">' + \
|
|
||||||
translate['Sending Post'] + '</p>\n'
|
|
||||||
sendForm += \
|
|
||||||
' <p>' + translate['Please wait'] + '</p>\n'
|
|
||||||
sendForm += '</center></div>\n'
|
|
||||||
sendForm += htmlFooter()
|
|
||||||
return sendForm
|
|
||||||
|
|
||||||
|
|
||||||
def htmlSuspended(baseDir: str) -> str:
|
def htmlSuspended(baseDir: str) -> str:
|
||||||
"""Show the screen for suspended accounts
|
"""Show the screen for suspended accounts
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue