mirror of https://gitlab.com/bashrc2/epicyon
Ability to hide recent posts preview on profile
parent
ff2b08f954
commit
c7442a0c5f
|
@ -60,6 +60,7 @@ from utils import load_account_timezones
|
||||||
from utils import load_translations_from_file
|
from utils import load_translations_from_file
|
||||||
from utils import load_bold_reading
|
from utils import load_bold_reading
|
||||||
from utils import load_hide_follows
|
from utils import load_hide_follows
|
||||||
|
from utils import load_hide_recent_posts
|
||||||
from utils import get_full_domain
|
from utils import get_full_domain
|
||||||
from utils import set_config_param
|
from utils import set_config_param
|
||||||
from utils import get_config_param
|
from utils import get_config_param
|
||||||
|
@ -327,6 +328,7 @@ class EpicyonServer(ThreadingHTTPServer):
|
||||||
preferred_podcast_formats: list[str] = []
|
preferred_podcast_formats: list[str] = []
|
||||||
bold_reading = {}
|
bold_reading = {}
|
||||||
hide_follows = {}
|
hide_follows = {}
|
||||||
|
hide_recent_posts = {}
|
||||||
account_timezone = None
|
account_timezone = None
|
||||||
post_to_nickname = None
|
post_to_nickname = None
|
||||||
nodeinfo_is_active = False
|
nodeinfo_is_active = False
|
||||||
|
@ -856,6 +858,9 @@ def run_daemon(accounts_data_dir: str,
|
||||||
# whether to hide follows on profile screen for each account
|
# whether to hide follows on profile screen for each account
|
||||||
httpd.hide_follows = load_hide_follows(base_dir)
|
httpd.hide_follows = load_hide_follows(base_dir)
|
||||||
|
|
||||||
|
# whether to hide recent public posts on profile screen for each account
|
||||||
|
httpd.hide_recent_posts = load_hide_recent_posts(base_dir)
|
||||||
|
|
||||||
httpd.account_timezone = load_account_timezones(base_dir)
|
httpd.account_timezone = load_account_timezones(base_dir)
|
||||||
|
|
||||||
httpd.post_to_nickname = None
|
httpd.post_to_nickname = None
|
||||||
|
|
|
@ -4706,7 +4706,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.fitness,
|
self.server.fitness,
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -4764,7 +4765,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.domain_full,
|
self.server.domain_full,
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -5622,7 +5624,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.hide_announces,
|
self.server.hide_announces,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -5741,7 +5744,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.fitness,
|
self.server.fitness,
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -5799,7 +5803,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.fitness,
|
self.server.fitness,
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -5856,7 +5861,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.fitness,
|
self.server.fitness,
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -5914,7 +5920,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.fitness,
|
self.server.fitness,
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -5972,7 +5979,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.fitness,
|
self.server.fitness,
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -6029,7 +6037,8 @@ def daemon_http_get(self) -> None:
|
||||||
self.server.buy_sites,
|
self.server.buy_sites,
|
||||||
self.server.no_of_books,
|
self.server.no_of_books,
|
||||||
self.server.auto_cw_cache,
|
self.server.auto_cw_cache,
|
||||||
self.server.mitm_servers):
|
self.server.mitm_servers,
|
||||||
|
self.server.hide_recent_posts):
|
||||||
self.server.getreq_busy = False
|
self.server.getreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,8 @@ def show_shares_feed(self, authorized: bool,
|
||||||
fitness: {},
|
fitness: {},
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Shows the shares feed for a particular account/actor
|
"""Shows the shares feed for a particular account/actor
|
||||||
"""
|
"""
|
||||||
shares = \
|
shares = \
|
||||||
|
@ -174,7 +175,8 @@ def show_shares_feed(self, authorized: bool,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
known_epicyon_instances,
|
known_epicyon_instances,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software)
|
instance_software,
|
||||||
|
hide_recent_posts)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html', msglen,
|
set_headers(self, 'text/html', msglen,
|
||||||
|
@ -257,7 +259,8 @@ def show_following_feed(self, authorized: bool,
|
||||||
fitness: {},
|
fitness: {},
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Shows the following feed for a particular account/actor
|
"""Shows the following feed for a particular account/actor
|
||||||
"""
|
"""
|
||||||
following = \
|
following = \
|
||||||
|
@ -368,7 +371,8 @@ def show_following_feed(self, authorized: bool,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
known_epicyon_instances,
|
known_epicyon_instances,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software).encode('utf-8')
|
instance_software,
|
||||||
|
hide_recent_posts).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html',
|
set_headers(self, 'text/html',
|
||||||
msglen, cookie, calling_domain, False)
|
msglen, cookie, calling_domain, False)
|
||||||
|
@ -457,7 +461,8 @@ def show_moved_feed(self, authorized: bool,
|
||||||
fitness: {},
|
fitness: {},
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Shows the moved feed for a particular account/actor
|
"""Shows the moved feed for a particular account/actor
|
||||||
"""
|
"""
|
||||||
following = \
|
following = \
|
||||||
|
@ -563,7 +568,8 @@ def show_moved_feed(self, authorized: bool,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
known_epicyon_instances,
|
known_epicyon_instances,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software).encode('utf-8')
|
instance_software,
|
||||||
|
hide_recent_posts).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html',
|
set_headers(self, 'text/html',
|
||||||
msglen, cookie, calling_domain, False)
|
msglen, cookie, calling_domain, False)
|
||||||
|
@ -644,7 +650,8 @@ def show_inactive_feed(self, authorized: bool,
|
||||||
fitness: {},
|
fitness: {},
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Shows the inactive accounts feed for a particular account/actor
|
"""Shows the inactive accounts feed for a particular account/actor
|
||||||
"""
|
"""
|
||||||
following = \
|
following = \
|
||||||
|
@ -751,7 +758,8 @@ def show_inactive_feed(self, authorized: bool,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
known_epicyon_instances,
|
known_epicyon_instances,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software).encode('utf-8')
|
instance_software,
|
||||||
|
hide_recent_posts).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html',
|
set_headers(self, 'text/html',
|
||||||
msglen, cookie, calling_domain, False)
|
msglen, cookie, calling_domain, False)
|
||||||
|
@ -834,7 +842,8 @@ def show_followers_feed(self, authorized: bool,
|
||||||
fitness: {},
|
fitness: {},
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Shows the followers feed for a particular account/actor
|
"""Shows the followers feed for a particular account/actor
|
||||||
"""
|
"""
|
||||||
followers = \
|
followers = \
|
||||||
|
@ -942,7 +951,8 @@ def show_followers_feed(self, authorized: bool,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
known_epicyon_instances,
|
known_epicyon_instances,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software).encode('utf-8')
|
instance_software,
|
||||||
|
hide_recent_posts).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html', msglen,
|
set_headers(self, 'text/html', msglen,
|
||||||
cookie, calling_domain, False)
|
cookie, calling_domain, False)
|
||||||
|
|
|
@ -79,7 +79,8 @@ def show_person_profile(self, authorized: bool,
|
||||||
buy_sites: [],
|
buy_sites: [],
|
||||||
no_of_books: int,
|
no_of_books: int,
|
||||||
auto_cw_cache: {},
|
auto_cw_cache: {},
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Shows the profile for a person
|
"""Shows the profile for a person
|
||||||
"""
|
"""
|
||||||
# look up a person
|
# look up a person
|
||||||
|
@ -155,7 +156,8 @@ def show_person_profile(self, authorized: bool,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
known_epicyon_instances,
|
known_epicyon_instances,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software).encode('utf-8')
|
instance_software,
|
||||||
|
hide_recent_posts).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html', msglen,
|
set_headers(self, 'text/html', msglen,
|
||||||
cookie, calling_domain, False)
|
cookie, calling_domain, False)
|
||||||
|
@ -239,7 +241,8 @@ def show_roles(self, calling_domain: str, referer_domain: str,
|
||||||
fitness: {},
|
fitness: {},
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Show roles within profile screen
|
"""Show roles within profile screen
|
||||||
"""
|
"""
|
||||||
named_status = path.split('/users/')[1]
|
named_status = path.split('/users/')[1]
|
||||||
|
@ -318,7 +321,8 @@ def show_roles(self, calling_domain: str, referer_domain: str,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
known_epicyon_instances,
|
known_epicyon_instances,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software)
|
instance_software,
|
||||||
|
hide_recent_posts)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html', msglen,
|
set_headers(self, 'text/html', msglen,
|
||||||
|
@ -394,7 +398,8 @@ def show_skills(self, calling_domain: str, referer_domain: str,
|
||||||
domain_full: str,
|
domain_full: str,
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Show skills on the profile screen
|
"""Show skills on the profile screen
|
||||||
"""
|
"""
|
||||||
named_status = path.split('/users/')[1]
|
named_status = path.split('/users/')[1]
|
||||||
|
@ -475,7 +480,8 @@ def show_skills(self, calling_domain: str, referer_domain: str,
|
||||||
auto_cw_cache,
|
auto_cw_cache,
|
||||||
known_epicyon_instances,
|
known_epicyon_instances,
|
||||||
mitm_servers,
|
mitm_servers,
|
||||||
instance_software)
|
instance_software,
|
||||||
|
hide_recent_posts)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
set_headers(self, 'text/html', msglen,
|
set_headers(self, 'text/html', msglen,
|
||||||
|
|
|
@ -1459,9 +1459,19 @@ def show_outbox_timeline(self, authorized: bool,
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
i2p_domain: str,
|
i2p_domain: str,
|
||||||
hide_announces: {},
|
hide_announces: {},
|
||||||
mitm_servers: []) -> bool:
|
mitm_servers: [],
|
||||||
|
hide_recent_posts: {}) -> bool:
|
||||||
"""Shows the outbox timeline
|
"""Shows the outbox timeline
|
||||||
"""
|
"""
|
||||||
|
nickname = \
|
||||||
|
path.replace('/users/', '').replace('/outbox', '')
|
||||||
|
|
||||||
|
# if recent posts are hidden then return 404
|
||||||
|
if nickname:
|
||||||
|
if not authorized and hide_recent_posts.get(nickname):
|
||||||
|
http_404(self, 77)
|
||||||
|
return True
|
||||||
|
|
||||||
# get outbox feed for a person
|
# get outbox feed for a person
|
||||||
outbox_feed = \
|
outbox_feed = \
|
||||||
person_box_json(recent_posts_cache,
|
person_box_json(recent_posts_cache,
|
||||||
|
@ -1472,8 +1482,6 @@ def show_outbox_timeline(self, authorized: bool,
|
||||||
positive_voting,
|
positive_voting,
|
||||||
voting_time_mins)
|
voting_time_mins)
|
||||||
if outbox_feed:
|
if outbox_feed:
|
||||||
nickname = \
|
|
||||||
path.replace('/users/', '').replace('/outbox', '')
|
|
||||||
page_number = 0
|
page_number = 0
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
page_number = nickname.split('?page=')[1]
|
page_number = nickname.split('?page=')[1]
|
||||||
|
|
|
@ -1037,12 +1037,52 @@ def _profile_post_hide_follows(base_dir: str, nickname: str, domain: str,
|
||||||
try:
|
try:
|
||||||
os.remove(hide_follows_filename)
|
os.remove(hide_follows_filename)
|
||||||
except OSError:
|
except OSError:
|
||||||
print('EX: _profile_edit ' +
|
print('EX: _profile_post_hide_follows ' +
|
||||||
'unable to delete ' +
|
'unable to delete ' +
|
||||||
hide_follows_filename)
|
hide_follows_filename)
|
||||||
return actor_changed
|
return actor_changed
|
||||||
|
|
||||||
|
|
||||||
|
def _profile_post_hide_recent_posts(base_dir: str, nickname: str, domain: str,
|
||||||
|
actor_json: {}, fields: {}, self,
|
||||||
|
actor_changed: bool,
|
||||||
|
premium: bool) -> bool:
|
||||||
|
""" HTTP POST hide recent public posts checkbox
|
||||||
|
This hides public posts from unauthorized viewers
|
||||||
|
"""
|
||||||
|
hide_recent_posts_filename = \
|
||||||
|
acct_dir(base_dir, nickname, domain) + '/.hideRecentPosts'
|
||||||
|
hide_recent_posts = premium
|
||||||
|
if fields.get('hideRecentPosts'):
|
||||||
|
if fields['hideRecentPosts'] == 'on':
|
||||||
|
hide_recent_posts = True
|
||||||
|
if hide_recent_posts:
|
||||||
|
self.server.hide_recent_posts[nickname] = True
|
||||||
|
actor_json['hideRecentPosts'] = True
|
||||||
|
actor_changed = True
|
||||||
|
if not os.path.isfile(hide_recent_posts_filename):
|
||||||
|
try:
|
||||||
|
with open(hide_recent_posts_filename, 'w+',
|
||||||
|
encoding='utf-8') as fp_hide:
|
||||||
|
fp_hide.write('\n')
|
||||||
|
except OSError:
|
||||||
|
print('EX: unable to write hideRecentPosts ' +
|
||||||
|
hide_recent_posts_filename)
|
||||||
|
if not hide_recent_posts:
|
||||||
|
actor_json['hideRecentPosts'] = False
|
||||||
|
if self.server.hide_recent_posts.get(nickname):
|
||||||
|
del self.server.hide_recent_posts[nickname]
|
||||||
|
actor_changed = True
|
||||||
|
if os.path.isfile(hide_recent_posts_filename):
|
||||||
|
try:
|
||||||
|
os.remove(hide_recent_posts_filename)
|
||||||
|
except OSError:
|
||||||
|
print('EX: _profile_post_hide_recent_posts ' +
|
||||||
|
'unable to delete ' +
|
||||||
|
hide_recent_posts_filename)
|
||||||
|
return actor_changed
|
||||||
|
|
||||||
|
|
||||||
def _profile_post_mutuals_replies(account_dir: str, fields: {}) -> None:
|
def _profile_post_mutuals_replies(account_dir: str, fields: {}) -> None:
|
||||||
""" HTTP POST show replies only from mutuals checkbox
|
""" HTTP POST show replies only from mutuals checkbox
|
||||||
"""
|
"""
|
||||||
|
@ -3325,6 +3365,10 @@ def profile_edit(self, calling_domain: str, cookie: str,
|
||||||
_profile_post_hide_follows(base_dir, nickname, domain,
|
_profile_post_hide_follows(base_dir, nickname, domain,
|
||||||
actor_json, fields, self,
|
actor_json, fields, self,
|
||||||
actor_changed, premium)
|
actor_changed, premium)
|
||||||
|
actor_changed = \
|
||||||
|
_profile_post_hide_recent_posts(base_dir, nickname, domain,
|
||||||
|
actor_json, fields, self,
|
||||||
|
actor_changed, premium)
|
||||||
_profile_post_block_military(nickname, fields, self)
|
_profile_post_block_military(nickname, fields, self)
|
||||||
_profile_post_block_government(nickname, fields, self)
|
_profile_post_block_government(nickname, fields, self)
|
||||||
_profile_post_block_bluesky(nickname, fields, self)
|
_profile_post_block_bluesky(nickname, fields, self)
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "وسائل الإعلام الممولة من الدولة الروسية",
|
"Russian State Funded Media": "وسائل الإعلام الممولة من الدولة الروسية",
|
||||||
"Satire": "هجاء",
|
"Satire": "هجاء",
|
||||||
"UK Right Wing Think Tank": "مركز أبحاث يميني متطرف في المملكة المتحدة",
|
"UK Right Wing Think Tank": "مركز أبحاث يميني متطرف في المملكة المتحدة",
|
||||||
"DeltaChat": "دعوة إلى DeltaChat"
|
"DeltaChat": "دعوة إلى DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "لا تعرض المنشورات العامة الأخيرة على ملفك الشخصي"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "রাশিয়ান রাষ্ট্র অর্থায়ন মিডিয়া",
|
"Russian State Funded Media": "রাশিয়ান রাষ্ট্র অর্থায়ন মিডিয়া",
|
||||||
"Satire": "ব্যঙ্গ",
|
"Satire": "ব্যঙ্গ",
|
||||||
"UK Right Wing Think Tank": "ইউকে রাইট উইং থিঙ্ক ট্যাঙ্ক",
|
"UK Right Wing Think Tank": "ইউকে রাইট উইং থিঙ্ক ট্যাঙ্ক",
|
||||||
"DeltaChat": "ডেল্টাচ্যাট আমন্ত্রণ"
|
"DeltaChat": "ডেল্টাচ্যাট আমন্ত্রণ",
|
||||||
|
"Don't show recent public posts on your profile": "আপনার প্রোফাইলে সাম্প্রতিক পাবলিক পোস্টগুলি দেখাবেন না"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Mitjans de comunicació finançats per l'estat rus",
|
"Russian State Funded Media": "Mitjans de comunicació finançats per l'estat rus",
|
||||||
"Satire": "Sàtira",
|
"Satire": "Sàtira",
|
||||||
"UK Right Wing Think Tank": "Think Tank de la dreta del Regne Unit",
|
"UK Right Wing Think Tank": "Think Tank de la dreta del Regne Unit",
|
||||||
"DeltaChat": "Invitació de DeltaChat"
|
"DeltaChat": "Invitació de DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "No mostris publicacions públiques recents al teu perfil"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Cyfryngau a Ariennir gan Wladwriaeth Rwseg",
|
"Russian State Funded Media": "Cyfryngau a Ariennir gan Wladwriaeth Rwseg",
|
||||||
"Satire": "Dychan",
|
"Satire": "Dychan",
|
||||||
"UK Right Wing Think Tank": "Melin Drafod Adain Dde y DU",
|
"UK Right Wing Think Tank": "Melin Drafod Adain Dde y DU",
|
||||||
"DeltaChat": "Gwahoddiad DeltaChat"
|
"DeltaChat": "Gwahoddiad DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Peidiwch â dangos postiadau cyhoeddus diweddar ar eich proffil"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Russische staatlich finanzierte Medien",
|
"Russian State Funded Media": "Russische staatlich finanzierte Medien",
|
||||||
"Satire": "Satire",
|
"Satire": "Satire",
|
||||||
"UK Right Wing Think Tank": "Britischer Thinktank mit rechter Front",
|
"UK Right Wing Think Tank": "Britischer Thinktank mit rechter Front",
|
||||||
"DeltaChat": "DeltaChat-Einladung"
|
"DeltaChat": "DeltaChat-Einladung",
|
||||||
|
"Don't show recent public posts on your profile": "Zeigen Sie keine aktuellen öffentlichen Beiträge in Ihrem Profil an"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Ρωσικά κρατικά χρηματοδοτούμενα ΜΜΕ",
|
"Russian State Funded Media": "Ρωσικά κρατικά χρηματοδοτούμενα ΜΜΕ",
|
||||||
"Satire": "Σάτυρα",
|
"Satire": "Σάτυρα",
|
||||||
"UK Right Wing Think Tank": "Δεξαμενή Σκέψης Δεξιάς στο Ηνωμένο Βασίλειο",
|
"UK Right Wing Think Tank": "Δεξαμενή Σκέψης Δεξιάς στο Ηνωμένο Βασίλειο",
|
||||||
"DeltaChat": "Πρόσκληση DeltaChat"
|
"DeltaChat": "Πρόσκληση DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Μην εμφανίζετε πρόσφατες δημόσιες αναρτήσεις στο προφίλ σας"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Russian State Funded Media",
|
"Russian State Funded Media": "Russian State Funded Media",
|
||||||
"Satire": "Satire",
|
"Satire": "Satire",
|
||||||
"UK Right Wing Think Tank": "UK Right Wing Think Tank",
|
"UK Right Wing Think Tank": "UK Right Wing Think Tank",
|
||||||
"DeltaChat": "DeltaChat invite"
|
"DeltaChat": "DeltaChat invite",
|
||||||
|
"Don't show recent public posts on your profile": "Don't show recent public posts on your profile"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Medios de comunicación financiados por el Estado ruso",
|
"Russian State Funded Media": "Medios de comunicación financiados por el Estado ruso",
|
||||||
"Satire": "Sátira",
|
"Satire": "Sátira",
|
||||||
"UK Right Wing Think Tank": "Centro de estudios de derecha del Reino Unido",
|
"UK Right Wing Think Tank": "Centro de estudios de derecha del Reino Unido",
|
||||||
"DeltaChat": "Invitación a DeltaChat"
|
"DeltaChat": "Invitación a DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "No mostrar publicaciones públicas recientes en tu perfil"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "رسانه های دولتی روسیه",
|
"Russian State Funded Media": "رسانه های دولتی روسیه",
|
||||||
"Satire": "طنز",
|
"Satire": "طنز",
|
||||||
"UK Right Wing Think Tank": "اتاق فکر جناح راست انگلستان",
|
"UK Right Wing Think Tank": "اتاق فکر جناح راست انگلستان",
|
||||||
"DeltaChat": "دعوت از دلتا چت"
|
"DeltaChat": "دعوت از دلتا چت",
|
||||||
|
"Don't show recent public posts on your profile": "پست های عمومی اخیر را در نمایه خود نشان ندهید"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Venäjän valtion rahoittama media",
|
"Russian State Funded Media": "Venäjän valtion rahoittama media",
|
||||||
"Satire": "Satiiri",
|
"Satire": "Satiiri",
|
||||||
"UK Right Wing Think Tank": "Ison-Britannian oikeanpuoleinen ajatushautomo",
|
"UK Right Wing Think Tank": "Ison-Britannian oikeanpuoleinen ajatushautomo",
|
||||||
"DeltaChat": "DeltaChat-kutsu"
|
"DeltaChat": "DeltaChat-kutsu",
|
||||||
|
"Don't show recent public posts on your profile": "Älä näytä viimeisimmät julkiset viestit profiilissasi"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Médias financés par l'État russe",
|
"Russian State Funded Media": "Médias financés par l'État russe",
|
||||||
"Satire": "Satire",
|
"Satire": "Satire",
|
||||||
"UK Right Wing Think Tank": "Groupe de réflexion de droite britannique",
|
"UK Right Wing Think Tank": "Groupe de réflexion de droite britannique",
|
||||||
"DeltaChat": "Invitation DeltaChat"
|
"DeltaChat": "Invitation DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Ne pas afficher les publications publiques récentes sur votre profil"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Meáin Mhaoinithe Stáit na Rúise",
|
"Russian State Funded Media": "Meáin Mhaoinithe Stáit na Rúise",
|
||||||
"Satire": "Aoir",
|
"Satire": "Aoir",
|
||||||
"UK Right Wing Think Tank": "Umar Smaointeoireachta Sciathán Deis na Ríochta Aontaithe",
|
"UK Right Wing Think Tank": "Umar Smaointeoireachta Sciathán Deis na Ríochta Aontaithe",
|
||||||
"DeltaChat": "Cuireadh DeltaChat"
|
"DeltaChat": "Cuireadh DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Ná taispeáin postálacha poiblí le déanaí ar do phróifíl"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "מדיה במימון המדינה הרוסית",
|
"Russian State Funded Media": "מדיה במימון המדינה הרוסית",
|
||||||
"Satire": "סָאטִירָה",
|
"Satire": "סָאטִירָה",
|
||||||
"UK Right Wing Think Tank": "טנק חשיבה ימני בבריטניה",
|
"UK Right Wing Think Tank": "טנק חשיבה ימני בבריטניה",
|
||||||
"DeltaChat": "הזמנת DeltaChat"
|
"DeltaChat": "הזמנת DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "אל תציג פוסטים ציבוריים אחרונים בפרופיל שלך"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "रूसी राज्य वित्तपोषित मीडिया",
|
"Russian State Funded Media": "रूसी राज्य वित्तपोषित मीडिया",
|
||||||
"Satire": "हास्य व्यंग्य",
|
"Satire": "हास्य व्यंग्य",
|
||||||
"UK Right Wing Think Tank": "यू.के. दक्षिणपंथी थिंक टैंक",
|
"UK Right Wing Think Tank": "यू.के. दक्षिणपंथी थिंक टैंक",
|
||||||
"DeltaChat": "डेल्टाचैट आमंत्रण"
|
"DeltaChat": "डेल्टाचैट आमंत्रण",
|
||||||
|
"Don't show recent public posts on your profile": "अपनी प्रोफ़ाइल पर हाल ही की सार्वजनिक पोस्ट न दिखाएँ"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Media finanziati dallo Stato russo",
|
"Russian State Funded Media": "Media finanziati dallo Stato russo",
|
||||||
"Satire": "Satira",
|
"Satire": "Satira",
|
||||||
"UK Right Wing Think Tank": "Think Tank di destra nel Regno Unito",
|
"UK Right Wing Think Tank": "Think Tank di destra nel Regno Unito",
|
||||||
"DeltaChat": "Invito DeltaChat"
|
"DeltaChat": "Invito DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Non mostrare i post pubblici recenti sul tuo profilo"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "ロシアの国営メディア",
|
"Russian State Funded Media": "ロシアの国営メディア",
|
||||||
"Satire": "風刺",
|
"Satire": "風刺",
|
||||||
"UK Right Wing Think Tank": "英国右派シンクタンク",
|
"UK Right Wing Think Tank": "英国右派シンクタンク",
|
||||||
"DeltaChat": "DeltaChat 招待"
|
"DeltaChat": "DeltaChat 招待",
|
||||||
|
"Don't show recent public posts on your profile": "プロフィールに最近の公開投稿を表示しない"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "러시아 국가가 자금을 지원하는 미디어",
|
"Russian State Funded Media": "러시아 국가가 자금을 지원하는 미디어",
|
||||||
"Satire": "풍자",
|
"Satire": "풍자",
|
||||||
"UK Right Wing Think Tank": "영국 우익 싱크탱크",
|
"UK Right Wing Think Tank": "영국 우익 싱크탱크",
|
||||||
"DeltaChat": "DeltaChat 초대"
|
"DeltaChat": "DeltaChat 초대",
|
||||||
|
"Don't show recent public posts on your profile": "프로필에 최근 공개 게시물을 표시하지 마세요"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Medyaya Fînansekirî ya Dewleta Rûsyayê",
|
"Russian State Funded Media": "Medyaya Fînansekirî ya Dewleta Rûsyayê",
|
||||||
"Satire": "Satire",
|
"Satire": "Satire",
|
||||||
"UK Right Wing Think Tank": "Tanka Fikirê ya Rastê ya Brîtanyayê",
|
"UK Right Wing Think Tank": "Tanka Fikirê ya Rastê ya Brîtanyayê",
|
||||||
"DeltaChat": "vexwendina DeltaChat"
|
"DeltaChat": "vexwendina DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Mesajên giştî yên dawî li ser profîla xwe nîşan nedin"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Russische staatsgefinancierde media",
|
"Russian State Funded Media": "Russische staatsgefinancierde media",
|
||||||
"Satire": "Satire",
|
"Satire": "Satire",
|
||||||
"UK Right Wing Think Tank": "Britse rechtse denktank",
|
"UK Right Wing Think Tank": "Britse rechtse denktank",
|
||||||
"DeltaChat": "DeltaChat-uitnodiging"
|
"DeltaChat": "DeltaChat-uitnodiging",
|
||||||
|
"Don't show recent public posts on your profile": "Toon geen recente openbare berichten op uw profiel"
|
||||||
}
|
}
|
||||||
|
|
|
@ -716,5 +716,6 @@
|
||||||
"Russian State Funded Media": "Russian State Funded Media",
|
"Russian State Funded Media": "Russian State Funded Media",
|
||||||
"Satire": "Satire",
|
"Satire": "Satire",
|
||||||
"UK Right Wing Think Tank": "UK Right Wing Think Tank",
|
"UK Right Wing Think Tank": "UK Right Wing Think Tank",
|
||||||
"DeltaChat": "DeltaChat invite"
|
"DeltaChat": "DeltaChat invite",
|
||||||
|
"Don't show recent public posts on your profile": "Don't show recent public posts on your profile"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Rosyjskie media finansowane przez państwo",
|
"Russian State Funded Media": "Rosyjskie media finansowane przez państwo",
|
||||||
"Satire": "Satyra",
|
"Satire": "Satyra",
|
||||||
"UK Right Wing Think Tank": "Brytyjski prawicowy think tank",
|
"UK Right Wing Think Tank": "Brytyjski prawicowy think tank",
|
||||||
"DeltaChat": "Zaproszenie do DeltaChat"
|
"DeltaChat": "Zaproszenie do DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Nie pokazuj ostatnich publicznych postów na swoim profilu"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Comunicação social financiada pelo Estado russo",
|
"Russian State Funded Media": "Comunicação social financiada pelo Estado russo",
|
||||||
"Satire": "Sátira",
|
"Satire": "Sátira",
|
||||||
"UK Right Wing Think Tank": "Think Tank de direita do Reino Unido",
|
"UK Right Wing Think Tank": "Think Tank de direita do Reino Unido",
|
||||||
"DeltaChat": "Convite DeltaChat"
|
"DeltaChat": "Convite DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Não mostrar publicações públicas recentes no seu perfil"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Российские государственные СМИ",
|
"Russian State Funded Media": "Российские государственные СМИ",
|
||||||
"Satire": "Сатира",
|
"Satire": "Сатира",
|
||||||
"UK Right Wing Think Tank": "Британский правый аналитический центр",
|
"UK Right Wing Think Tank": "Британский правый аналитический центр",
|
||||||
"DeltaChat": "Приглашение DeltaChat"
|
"DeltaChat": "Приглашение DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Не показывать последние публичные публикации в вашем профиле"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Vyombo vya Habari vinavyofadhiliwa na Serikali ya Urusi",
|
"Russian State Funded Media": "Vyombo vya Habari vinavyofadhiliwa na Serikali ya Urusi",
|
||||||
"Satire": "Satire",
|
"Satire": "Satire",
|
||||||
"UK Right Wing Think Tank": "Uingereza Right Wing Think Tank",
|
"UK Right Wing Think Tank": "Uingereza Right Wing Think Tank",
|
||||||
"DeltaChat": "mwaliko wa DeltaChat"
|
"DeltaChat": "mwaliko wa DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Usionyeshe machapisho ya hivi majuzi ya umma kwenye wasifu wako"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Rusya Devleti Tarafından Finanse Edilen Medya",
|
"Russian State Funded Media": "Rusya Devleti Tarafından Finanse Edilen Medya",
|
||||||
"Satire": "Hiciv",
|
"Satire": "Hiciv",
|
||||||
"UK Right Wing Think Tank": "İngiltere Sağ Kanat Düşünce Kuruluşu",
|
"UK Right Wing Think Tank": "İngiltere Sağ Kanat Düşünce Kuruluşu",
|
||||||
"DeltaChat": "DeltaChat daveti"
|
"DeltaChat": "DeltaChat daveti",
|
||||||
|
"Don't show recent public posts on your profile": "Profilinizde son genel paylaşımları göstermeyin"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "Російські державні ЗМІ",
|
"Russian State Funded Media": "Російські державні ЗМІ",
|
||||||
"Satire": "Сатира",
|
"Satire": "Сатира",
|
||||||
"UK Right Wing Think Tank": "Британський правий мозковий центр",
|
"UK Right Wing Think Tank": "Британський правий мозковий центр",
|
||||||
"DeltaChat": "Запрошення DeltaChat"
|
"DeltaChat": "Запрошення DeltaChat",
|
||||||
|
"Don't show recent public posts on your profile": "Не показувати останні загальнодоступні публікації у своєму профілі"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "רוסיש שטאַט פאַנדאַד מידיאַ",
|
"Russian State Funded Media": "רוסיש שטאַט פאַנדאַד מידיאַ",
|
||||||
"Satire": "סאַטירע",
|
"Satire": "סאַטירע",
|
||||||
"UK Right Wing Think Tank": "וק רעכט פליגל טראַכטן טאַנק",
|
"UK Right Wing Think Tank": "וק רעכט פליגל טראַכטן טאַנק",
|
||||||
"DeltaChat": "דעלטאַטשאַט פאַרבעטן"
|
"DeltaChat": "דעלטאַטשאַט פאַרבעטן",
|
||||||
|
"Don't show recent public posts on your profile": "צי ניט ווייַזן לעצטע עפנטלעך הודעות אויף דיין פּראָפיל"
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,5 +720,6 @@
|
||||||
"Russian State Funded Media": "俄罗斯国家资助的媒体",
|
"Russian State Funded Media": "俄罗斯国家资助的媒体",
|
||||||
"Satire": "讽刺",
|
"Satire": "讽刺",
|
||||||
"UK Right Wing Think Tank": "英国右翼智库",
|
"UK Right Wing Think Tank": "英国右翼智库",
|
||||||
"DeltaChat": "DeltaChat 邀请"
|
"DeltaChat": "DeltaChat 邀请",
|
||||||
|
"Don't show recent public posts on your profile": "不要在你的个人资料上显示最近的公开帖子"
|
||||||
}
|
}
|
||||||
|
|
21
utils.py
21
utils.py
|
@ -4262,6 +4262,27 @@ def load_hide_follows(base_dir: str) -> {}:
|
||||||
return hide_follows
|
return hide_follows
|
||||||
|
|
||||||
|
|
||||||
|
def load_hide_recent_posts(base_dir: str) -> {}:
|
||||||
|
"""Returns a dictionary containing the hide recent posts status
|
||||||
|
for each account
|
||||||
|
"""
|
||||||
|
hide_recent_posts = {}
|
||||||
|
dir_str = data_dir(base_dir)
|
||||||
|
for _, dirs, _ in os.walk(dir_str):
|
||||||
|
for acct in dirs:
|
||||||
|
if '@' not in acct:
|
||||||
|
continue
|
||||||
|
if acct.startswith('inbox@') or acct.startswith('Actor@'):
|
||||||
|
continue
|
||||||
|
hide_recent_posts_filename = \
|
||||||
|
dir_str + '/' + acct + '/.hideRecentPosts'
|
||||||
|
if os.path.isfile(hide_recent_posts_filename):
|
||||||
|
nickname = acct.split('@')[0]
|
||||||
|
hide_recent_posts[nickname] = True
|
||||||
|
break
|
||||||
|
return hide_recent_posts
|
||||||
|
|
||||||
|
|
||||||
def get_account_timezone(base_dir: str, nickname: str, domain: str) -> str:
|
def get_account_timezone(base_dir: str, nickname: str, domain: str) -> str:
|
||||||
"""Returns the timezone for the given account
|
"""Returns the timezone for the given account
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1045,7 +1045,8 @@ def html_profile(signing_priv_key_pem: str,
|
||||||
auto_cw_cache: {},
|
auto_cw_cache: {},
|
||||||
known_epicyon_instances: [],
|
known_epicyon_instances: [],
|
||||||
mitm_servers: [],
|
mitm_servers: [],
|
||||||
instance_software: {}) -> str:
|
instance_software: {},
|
||||||
|
hide_recent_posts: {}) -> str:
|
||||||
"""Show the profile page as html
|
"""Show the profile page as html
|
||||||
"""
|
"""
|
||||||
show_moved_accounts = False
|
show_moved_accounts = False
|
||||||
|
@ -1637,6 +1638,9 @@ def html_profile(signing_priv_key_pem: str,
|
||||||
translate['Get the source code'] + '" src="/icons/agpl.png" /></a>'
|
translate['Get the source code'] + '" src="/icons/agpl.png" /></a>'
|
||||||
|
|
||||||
if selected == 'posts' and not premium:
|
if selected == 'posts' and not premium:
|
||||||
|
if hide_recent_posts.get(nickname):
|
||||||
|
max_profile_posts = 0
|
||||||
|
else:
|
||||||
max_profile_posts = \
|
max_profile_posts = \
|
||||||
get_max_profile_posts(base_dir, nickname, domain, 20)
|
get_max_profile_posts(base_dir, nickname, domain, 20)
|
||||||
min_images_for_accounts: list[str] = []
|
min_images_for_accounts: list[str] = []
|
||||||
|
@ -3055,6 +3059,7 @@ def _html_edit_profile_options(is_admin: bool,
|
||||||
show_quote_toots: bool,
|
show_quote_toots: bool,
|
||||||
show_vote_posts: bool,
|
show_vote_posts: bool,
|
||||||
hide_follows: bool,
|
hide_follows: bool,
|
||||||
|
hide_recent_posts: bool,
|
||||||
premium: bool,
|
premium: bool,
|
||||||
no_seen_posts: bool,
|
no_seen_posts: bool,
|
||||||
watermark_enabled: bool) -> str:
|
watermark_enabled: bool) -> str:
|
||||||
|
@ -3128,6 +3133,12 @@ def _html_edit_profile_options(is_admin: bool,
|
||||||
edit_profile_form += \
|
edit_profile_form += \
|
||||||
edit_check_box(hide_follows_str, 'hideFollows', hide_follows)
|
edit_check_box(hide_follows_str, 'hideFollows', hide_follows)
|
||||||
|
|
||||||
|
hide_recent_posts_str = \
|
||||||
|
translate["Don't show recent public posts on your profile"]
|
||||||
|
edit_profile_form += \
|
||||||
|
edit_check_box(hide_recent_posts_str, 'hideRecentPosts',
|
||||||
|
hide_recent_posts)
|
||||||
|
|
||||||
no_seen_posts_str = translate["Don't show already seen posts"]
|
no_seen_posts_str = translate["Don't show already seen posts"]
|
||||||
edit_profile_form += \
|
edit_profile_form += \
|
||||||
edit_check_box(no_seen_posts_str, 'noSeenPosts', no_seen_posts)
|
edit_check_box(no_seen_posts_str, 'noSeenPosts', no_seen_posts)
|
||||||
|
@ -3574,6 +3585,11 @@ def html_edit_profile(server, translate: {},
|
||||||
if os.path.isfile(account_dir + '/.hideFollows'):
|
if os.path.isfile(account_dir + '/.hideFollows'):
|
||||||
hide_follows = True
|
hide_follows = True
|
||||||
|
|
||||||
|
# don't show recent public posts on profile
|
||||||
|
hide_recent_posts = False
|
||||||
|
if os.path.isfile(account_dir + '/.hideRecentPosts'):
|
||||||
|
hide_recent_posts = True
|
||||||
|
|
||||||
# is this a premium account?
|
# is this a premium account?
|
||||||
premium = is_premium_account(base_dir, nickname, domain)
|
premium = is_premium_account(base_dir, nickname, domain)
|
||||||
|
|
||||||
|
@ -3606,7 +3622,8 @@ def html_edit_profile(server, translate: {},
|
||||||
min_images_for_accounts,
|
min_images_for_accounts,
|
||||||
reverse_sequence, show_quote_toots,
|
reverse_sequence, show_quote_toots,
|
||||||
show_vote_posts, hide_follows,
|
show_vote_posts, hide_follows,
|
||||||
premium, no_seen_posts, watermark_enabled)
|
hide_recent_posts, premium,
|
||||||
|
no_seen_posts, watermark_enabled)
|
||||||
|
|
||||||
# reply controls
|
# reply controls
|
||||||
edit_profile_form += \
|
edit_profile_form += \
|
||||||
|
|
Loading…
Reference in New Issue