From 9323878936f2939347e29cadc2c61a846dd4c73a Mon Sep 17 00:00:00 2001
From: Bob Mottram
Date: Wed, 8 Jun 2022 10:20:56 +0100
Subject: [PATCH 1/4] Use textarea for image description
---
webapp_create_post.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/webapp_create_post.py b/webapp_create_post.py
index 31502b17e..e940c8ada 100644
--- a/webapp_create_post.py
+++ b/webapp_create_post.py
@@ -236,8 +236,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
if not is_new_reminder:
date_and_time_str += \
'
\n'
+ 'class="emojicalendar" src="/icons/calendar.png"/>\n'
# select a date and time for this post
date_and_time_str += '\n'
@@ -253,6 +252,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
show_public_on_dropdown = True
message_box_height = 400
+ image_description_height = 100
# filename of the banner shown at the top
banner_file, _ = \
@@ -382,8 +382,10 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
new_post_image_section += \
' accept="' + formats_string + '">\n'
new_post_image_section += \
- edit_text_field(translate['Describe your attachment'],
- 'imageDescription', '')
+ ' \n'
+
new_post_image_section += end_edit_section()
new_post_emoji_section = ''
From c337857376ba93cc50b358a40b0232bef5be1a15 Mon Sep 17 00:00:00 2001
From: Bob Mottram
Date: Wed, 8 Jun 2022 10:23:34 +0100
Subject: [PATCH 2/4] Snake case
---
webapp_create_post.py | 56 +++++++++++++++++++++----------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/webapp_create_post.py b/webapp_create_post.py
index e940c8ada..5b081699b 100644
--- a/webapp_create_post.py
+++ b/webapp_create_post.py
@@ -197,7 +197,7 @@ def _html_new_post_drop_down(scope_icon: str, scope_description: str,
def html_new_post(css_cache: {}, media_instance: bool, translate: {},
base_dir: str, http_prefix: str,
- path: str, inReplyTo: str,
+ path: str, in_reply_to: str,
mentions: [],
share_description: str,
report_url: str, page_number: int,
@@ -207,7 +207,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
default_timeline: str, newswire: {},
theme: str, no_drop_down: bool,
access_keys: {}, custom_submit_text: str,
- conversationId: str,
+ conversation_id: str,
recent_posts_cache: {}, max_recent_posts: int,
session, cached_webfingers: {},
person_cache: {}, port: int,
@@ -221,7 +221,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
system_language: str,
max_like_count: int, signing_priv_key_pem: str,
cw_lists: {}, lists_enabled: str,
- boxName: str,
+ box_name: str,
reply_is_chat: bool, bold_reading: bool) -> str:
"""New post screen
"""
@@ -260,7 +260,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
if not path.endswith('/newshare') and not path.endswith('/newwanted'):
if not path.endswith('/newreport'):
- if not inReplyTo or is_new_reminder:
+ if not in_reply_to or is_new_reminder:
new_post_text = '' + \
translate['Write your post text below.'] + '
\n'
else:
@@ -269,7 +269,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
new_post_text = \
'' + \
translate['Write your reply to'] + \
- ' ' + \
translate['this post'] + '
\n'
@@ -289,7 +289,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
None, True, False,
http_prefix,
project_version,
- boxName,
+ box_name,
yt_replace_domain,
twitter_replacement_domain,
show_published_date_only,
@@ -304,12 +304,12 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
bold_reading)
reply_str = '\n'
+ 'name="replyTo" value="' + in_reply_to + '">\n'
# if replying to a non-public post then also make
# this post non-public
if not is_public_post_from_url(base_dir, nickname, domain,
- inReplyTo):
+ in_reply_to):
new_post_path = path
if '?' in new_post_path:
new_post_path = new_post_path.split('?')[0]
@@ -410,7 +410,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
placeholder_subject = \
translate['Subject or Content Warning (optional)'] + '...'
placeholder_mentions = ''
- if inReplyTo:
+ if in_reply_to:
placeholder_mentions = \
translate['Replying to'] + '...'
placeholder_message = ''
@@ -679,7 +679,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {},
translate['Pin this post to your profile.'] + \
'
\n'
- if not inReplyTo:
+ if not in_reply_to:
date_and_location += \
'