Wait screen isn't possible without keeping the socket open and getting into fancy javascript stuff

main
Bob Mottram 2020-09-28 18:03:54 +01:00
parent 71a2799397
commit 6b09ff0edd
19 changed files with 16 additions and 171 deletions

View File

@ -152,7 +152,6 @@ from webinterface import rssHashtagSearch
from webinterface import htmlModerationInfo
from webinterface import htmlSearchSharedItems
from webinterface import htmlHashtagBlocked
from webinterface import htmlSendingPost
from shares import getSharesFeedForPerson
from shares import addShare
from shares import removeShare
@ -483,16 +482,6 @@ class PubServer(BaseHTTPRequestHandler):
return True
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,
callingDomain: str) -> None:
self.send_response(200)
@ -9711,13 +9700,6 @@ class PubServer(BaseHTTPRequestHandler):
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:
pageNumberStr = path.split('?page=')[1]
if '?' in pageNumberStr:

View File

@ -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;
}

View File

@ -15,7 +15,7 @@ from shutil import copyfile
def getThemeFiles() -> []:
return ('epicyon.css', 'login.css', 'follow.css',
'suspended.css', 'calendar.css', 'blog.css',
'options.css', 'search.css', 'send.css')
'options.css', 'search.css')
def getThemesList() -> []:

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "علامات التجزئة المُنشأة تلقائيًا",
"Autogenerated Content Warnings": "تحذيرات المحتوى المُنشأ تلقائيًا",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag محظور",
"Sending Post": "إرسال آخر",
"Please wait": "ارجوك انتظر"
"Hashtag Blocked": "Hashtag محظور"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Hashtags autogenerats",
"Autogenerated Content Warnings": "Advertiments de contingut autogenerats",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag bloquejat",
"Sending Post": "S'està enviant el missatge",
"Please wait": "Espereu, si us plau"
"Hashtag Blocked": "Hashtag bloquejat"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Hashtags awtogeneiddiedig",
"Autogenerated Content Warnings": "Rhybuddion Cynnwys Autogenerated",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag wedi'i Blocio",
"Sending Post": "Post Anfon",
"Please wait": "Arhoswch os gwelwch yn dda"
"Hashtag Blocked": "Hashtag wedi'i Blocio"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Automatisch generierte Hashtags",
"Autogenerated Content Warnings": "Warnungen vor automatisch generierten Inhalten",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag blockiert",
"Sending Post": "Post senden",
"Please wait": "Warten Sie mal"
"Hashtag Blocked": "Hashtag blockiert"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Autogenerated Hashtags",
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag Blocked",
"Sending Post": "Sending Post",
"Please wait": "Please wait"
"Hashtag Blocked": "Hashtag Blocked"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Hashtags autogenerados",
"Autogenerated Content Warnings": "Advertencias de contenido generado automáticamente",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag bloqueada",
"Sending Post": "Envío de publicación",
"Please wait": "por favor espera"
"Hashtag Blocked": "Hashtag bloqueada"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Hashtags générés automatiquement",
"Autogenerated Content Warnings": "Avertissements de contenu générés automatiquement",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag bloqué",
"Sending Post": "Envoi du message",
"Please wait": "S'il vous plaît, attendez"
"Hashtag Blocked": "Hashtag bloqué"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Hashtags uathghinte",
"Autogenerated Content Warnings": "Rabhaidh Ábhar Uathghinte",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag Blocáilte",
"Sending Post": "Post Seolta",
"Please wait": "Fán le do thoil"
"Hashtag Blocked": "Hashtag Blocáilte"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "ऑटोजेनरेटेड हैशटैग",
"Autogenerated Content Warnings": "स्वतः प्राप्त सामग्री चेतावनी",
"Indymedia": "Indymedia",
"Hashtag Blocked": "हैशटैग अवरुद्ध",
"Sending Post": "पोस्ट भेज रहा है",
"Please wait": "कृपया प्रतीक्षा कीजिये"
"Hashtag Blocked": "हैशटैग अवरुद्ध"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Hashtag generati automaticamente",
"Autogenerated Content Warnings": "Avvisi sui contenuti generati automaticamente",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag bloccato",
"Sending Post": "Invio di post",
"Please wait": "attendere prego"
"Hashtag Blocked": "Hashtag bloccato"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "自動生成されたハッシュタグ",
"Autogenerated Content Warnings": "自動生成されたコンテンツの警告",
"Indymedia": "Indymedia",
"Hashtag Blocked": "ハッシュタグがブロックされました",
"Sending Post": "投稿を送信する",
"Please wait": "お待ちください"
"Hashtag Blocked": "ハッシュタグがブロックされました"
}

View File

@ -283,7 +283,5 @@
"Autogenerated Hashtags": "Autogenerated Hashtags",
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag Blocked",
"Sending Post": "Sending Post",
"Please wait": "Please wait"
"Hashtag Blocked": "Hashtag Blocked"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Hashtags autogeradas",
"Autogenerated Content Warnings": "Avisos de conteúdo gerado automaticamente",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Hashtag bloqueada",
"Sending Post": "Enviando postagem",
"Please wait": "Por favor, espere"
"Hashtag Blocked": "Hashtag bloqueada"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "Автоматически сгенерированные хештеги",
"Autogenerated Content Warnings": "Автоматические предупреждения о содержании",
"Indymedia": "Indymedia",
"Hashtag Blocked": "Хештег заблокирован",
"Sending Post": "Отправка сообщения",
"Please wait": "пожалуйста, подождите"
"Hashtag Blocked": "Хештег заблокирован"
}

View File

@ -287,7 +287,5 @@
"Autogenerated Hashtags": "自动生成的标签",
"Autogenerated Content Warnings": "自动生成的内容警告",
"Indymedia": "Indymedia",
"Hashtag Blocked": "标签被阻止",
"Sending Post": "发送帖子",
"Please wait": "请稍候"
"Hashtag Blocked": "标签被阻止"
}

View File

@ -2006,27 +2006,6 @@ def htmlHashtagBlocked(baseDir: str, translate: {}) -> str:
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:
"""Show the screen for suspended accounts
"""