mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2026-10-27 09:40:40 +00:00
fix(ui): tighten header spacing, preserve body edits on retry, add over-limit warning
- Switch content panel from space-between to flex-start so header elements (title, subtitle, headline) pack tightly instead of spreading across the full height - Message area uses flex:1 to fill remaining space and keep footer at the bottom - Body editor now preserves user text when re-editing after exceeding the 1000 character limit (previously reset to default) - Show a yellow warning when user proceeds with over-limit body text - Add body_over_limit_warning locale key across all 14 languages Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
1 parent
445375e098
commit
ee5024678d
18 files changed
+52
-30
No files matched your search
+4
-4
@@ -398,15 +398,15 @@ def interactive_update(config_path: str):
|
||||
data.update(prompt(meta_qs))
|
||||
|
||||
console.rule(t("cli.init_body"))
|
||||
# Start with existing/default content; preserve user edits across retries
|
||||
body = _br_to_newlines(get_default("content"))
|
||||
while True:
|
||||
# Use existing content if present, else fallback to localized landing default
|
||||
initial_content = _br_to_newlines(get_default("content"))
|
||||
|
||||
body = open_editor(initial_content)
|
||||
body = open_editor(body)
|
||||
length = len(body)
|
||||
if length > 1000:
|
||||
console.print(f"{t('cli.body_length')}: {length}/1000 {t('cli.body_limit_exceeded')}", style="red")
|
||||
if not inquirer.confirm(message=t("cli.edit_again"), default=True).execute():
|
||||
console.print(t("cli.body_over_limit_warning"), style="yellow")
|
||||
break
|
||||
else:
|
||||
console.print(f"{t('cli.body_length')}: {length}/1000", style="green")
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- إنشاء من قالب ---",
|
||||
"template_select": "اختر قالباً:"
|
||||
"template_select": "اختر قالباً:",
|
||||
"body_over_limit_warning": "تحذير: نص المحتوى يتجاوز 1000 حرف. قد يتم قطعه في المنشور."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "استخدم متصفح Tor",
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- Aus Vorlage erstellen ---",
|
||||
"template_select": "Wählen Sie eine Vorlage:"
|
||||
"template_select": "Wählen Sie eine Vorlage:",
|
||||
"body_over_limit_warning": "Warnung: Der Textkörper überschreitet 1000 Zeichen. Er könnte auf dem Flyer abgeschnitten werden."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Tor-Browser verwenden",
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
"no_urls_qr_skip": "No URLs configured yet. QR codes will be generated after 'voxvera serve'",
|
||||
"input_file_not_found": "Input file {path} does not exist.",
|
||||
"manage_templates": "--- Create From Template ---",
|
||||
"template_select": "Select a template:"
|
||||
"template_select": "Select a template:",
|
||||
"body_over_limit_warning": "Warning: Body text exceeds 1000 characters. It may be cut off on the flyer."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Use Tor Browser",
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- Crear Desde Plantilla ---",
|
||||
"template_select": "Seleccione una plantilla:"
|
||||
"template_select": "Seleccione una plantilla:",
|
||||
"body_over_limit_warning": "Advertencia: El texto del cuerpo supera los 1000 caracteres. Puede cortarse en el volante."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Use el Navegador Tor",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- ایجاد از قالب ---",
|
||||
"template_select": "یک قالب انتخاب کنید:"
|
||||
"template_select": "یک قالب انتخاب کنید:",
|
||||
"body_over_limit_warning": "هشدار: متن بدنه از 1000 کاراکتر بیشتر است. ممکن است در بروشور بریده شود."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "از مرورگر Tor استفاده کنید",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- Créer à partir d'un modèle ---",
|
||||
"template_select": "Sélectionnez un modèle :"
|
||||
"template_select": "Sélectionnez un modèle :",
|
||||
"body_over_limit_warning": "Avertissement : Le texte dépasse 1000 caractères. Il pourrait être coupé sur le tract."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Utilisez le navigateur Tor",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- יצירה מתבנית ---",
|
||||
"template_select": "בחר תבנית:"
|
||||
"template_select": "בחר תבנית:",
|
||||
"body_over_limit_warning": "אזהרה: טקסט הגוף חורג מ-1000 תווים. הוא עלול להיחתך בעלון."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "השתמש בדפדפן Tor",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- टेम्पलेट से बनाएं ---",
|
||||
"template_select": "एक टेम्पलेट चुनें:"
|
||||
"template_select": "एक टेम्पलेट चुनें:",
|
||||
"body_over_limit_warning": "चेतावनी: मुख्य पाठ 1000 अक्षरों से अधिक है। यह पर्चे पर कटा हुआ दिख सकता है।"
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Tor Browser का उपयोग करें",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- テンプレートから作成 ---",
|
||||
"template_select": "テンプレートを選択してください:"
|
||||
"template_select": "テンプレートを選択してください:",
|
||||
"body_over_limit_warning": "警告:本文が1000文字を超えています。チラシ上で途切れる可能性があります。"
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Tor Browserを使用してください",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- Criar a partir de Modelo ---",
|
||||
"template_select": "Selecione um modelo:"
|
||||
"template_select": "Selecione um modelo:",
|
||||
"body_over_limit_warning": "Aviso: O texto do corpo excede 1000 caracteres. Pode ser cortado no panfleto."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Use o Tor Browser",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- Создать из шаблона ---",
|
||||
"template_select": "Выберите шаблон:"
|
||||
"template_select": "Выберите шаблон:",
|
||||
"body_over_limit_warning": "Предупреждение: Текст превышает 1000 символов. Он может быть обрезан на листовке."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Используйте Tor Browser",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- Tengeneza Kutoka Kiolezo ---",
|
||||
"template_select": "Chagua kiolezo:"
|
||||
"template_select": "Chagua kiolezo:",
|
||||
"body_over_limit_warning": "Onyo: Maandishi ya mwili yanazidi herufi 1000. Yanaweza kukatwa kwenye kipeperushi."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Tumia Kivinjari cha Tor",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- Şablondan Oluştur ---",
|
||||
"template_select": "Bir şablon seçin:"
|
||||
"template_select": "Bir şablon seçin:",
|
||||
"body_over_limit_warning": "Uyarı: Gövde metni 1000 karakteri aşıyor. El ilanında kesilebilir."
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "Tor Tarayıcı Kullanın",
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
"attachment_path_label": "Attachment file path (optional - will be served from Tor site)",
|
||||
"manage_action_edit": "Edit",
|
||||
"manage_templates": "--- 从模板创建 ---",
|
||||
"template_select": "选择一个模板:"
|
||||
"template_select": "选择一个模板:",
|
||||
"body_over_limit_warning": "警告:正文超过1000个字符。传单上可能会被截断。"
|
||||
},
|
||||
"web": {
|
||||
"tear_off_tor_browser": "使用 Tor 浏览器",
|
||||
|
||||
@@ -169,20 +169,21 @@
|
||||
|
||||
.content {
|
||||
width: calc(8.5in - 3.75in);
|
||||
padding: 20px;
|
||||
padding: 15px 20px;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
page-break-inside: avoid;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
margin-bottom: 10px;
|
||||
padding: 0;
|
||||
font-size: 24px;
|
||||
line-height: 1.2;
|
||||
letter-spacing: 2px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -192,7 +193,10 @@
|
||||
|
||||
.distribute {
|
||||
font-size: 18px;
|
||||
line-height: 1.2;
|
||||
letter-spacing: 6px;
|
||||
margin: 2px 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -204,8 +208,8 @@
|
||||
}
|
||||
|
||||
.message {
|
||||
height: 6in; /* Fixed height to prevent footer push-out */
|
||||
margin-top: 10px;
|
||||
flex: 1;
|
||||
margin-top: 4px;
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
text-align: left;
|
||||
@@ -265,7 +269,7 @@
|
||||
border: none;
|
||||
border-top: 1px solid #000;
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
||||
Reference in new issue
Block a user