Merge branch 'main' of gitlab.com:bashrc2/epicyon

merge-requests/30/head
Bob Mottram 2022-12-05 15:07:09 +00:00
commit 26dfed5dd7
31 changed files with 106 additions and 31 deletions

View File

@ -50,6 +50,17 @@ sudo pacman -S tor python-pip python-pysocks python-cryptography \
sudo pip3 install pyqrcode pypng sudo pip3 install pyqrcode pypng
``` ```
One package needs to be built manually from the Arch User Repository (AUR), since it is not included in the usual repositories.
``` bash
su - epicyon
cd /tmp
git clone https://aur.archlinux.org/python-django-timezone-field.git
cd python-django-timezone-field.git
makepkg -sir
exit
```
Or on Debian: Or on Debian:
``` bash ``` bash

View File

@ -6357,6 +6357,31 @@ class PubServer(BaseHTTPRequestHandler):
set_config_param(base_dir, 'customSubmitText', set_config_param(base_dir, 'customSubmitText',
'') '')
# change registrations open status
registrations_open = False
if self.server.registration or \
get_config_param(base_dir,
"registration") == 'open':
registrations_open = True
if fields.get('regOpen'):
if fields['regOpen'] != registrations_open:
registrations_open = fields['regOpen']
set_config_param(base_dir, 'registration',
'open')
remaining = \
get_config_param(base_dir,
'registrationsRemaining')
if not remaining:
set_config_param(base_dir,
'registrationsRemaining',
10)
self.server.registration = True
else:
if registrations_open:
set_config_param(base_dir, 'registration',
'closed')
self.server.registration = False
# libretranslate URL # libretranslate URL
curr_libretranslate_url = \ curr_libretranslate_url = \
get_config_param(base_dir, get_config_param(base_dir,

View File

@ -605,5 +605,6 @@
"Reverse timelines": "عكس الجداول الزمنية", "Reverse timelines": "عكس الجداول الزمنية",
"Moved": "انتقل", "Moved": "انتقل",
"Move": "يتحرك", "Move": "يتحرك",
"Inactive": "غير نشط" "Inactive": "غير نشط",
"Registrations open": "التسجيلات مفتوحة"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "বিপরীত সময়রেখা", "Reverse timelines": "বিপরীত সময়রেখা",
"Moved": "সরানো হয়েছে", "Moved": "সরানো হয়েছে",
"Move": "সরান", "Move": "সরান",
"Inactive": "নিষ্ক্রিয়" "Inactive": "নিষ্ক্রিয়",
"Registrations open": "রেজিস্ট্রেশন খোলা"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Cronologia inversa", "Reverse timelines": "Cronologia inversa",
"Moved": "Mogut", "Moved": "Mogut",
"Move": "Moure's", "Move": "Moure's",
"Inactive": "Inactiu" "Inactive": "Inactiu",
"Registrations open": "Inscripcions obertes"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Gwrthdroi llinellau amser", "Reverse timelines": "Gwrthdroi llinellau amser",
"Moved": "Wedi symud", "Moved": "Wedi symud",
"Move": "Symud", "Move": "Symud",
"Inactive": "Anactif" "Inactive": "Anactif",
"Registrations open": "Cofrestriadau yn agor"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Umgekehrte Zeitlinien", "Reverse timelines": "Umgekehrte Zeitlinien",
"Moved": "Gerührt", "Moved": "Gerührt",
"Move": "Bewegen", "Move": "Bewegen",
"Inactive": "Inaktiv" "Inactive": "Inaktiv",
"Registrations open": "Anmeldungen geöffnet"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Αντίστροφα χρονοδιαγράμματα", "Reverse timelines": "Αντίστροφα χρονοδιαγράμματα",
"Moved": "Μετακινήθηκε", "Moved": "Μετακινήθηκε",
"Move": "Κίνηση", "Move": "Κίνηση",
"Inactive": "Αδρανής" "Inactive": "Αδρανής",
"Registrations open": "Οι εγγραφές ανοίγουν"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Reverse timelines", "Reverse timelines": "Reverse timelines",
"Moved": "Moved", "Moved": "Moved",
"Move": "Move", "Move": "Move",
"Inactive": "Inactive" "Inactive": "Inactive",
"Registrations open": "Registrations open"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Líneas de tiempo inversas", "Reverse timelines": "Líneas de tiempo inversas",
"Moved": "Movida", "Moved": "Movida",
"Move": "Muevete", "Move": "Muevete",
"Inactive": "Αδρανής" "Inactive": "Αδρανής",
"Registrations open": "Inscripciones abiertas"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "جدول های زمانی معکوس", "Reverse timelines": "جدول های زمانی معکوس",
"Moved": "منتقل شد", "Moved": "منتقل شد",
"Move": "حرکت", "Move": "حرکت",
"Inactive": "غیر فعال" "Inactive": "غیر فعال",
"Registrations open": "ثبت نام ها باز شد"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Chronologies inversées", "Reverse timelines": "Chronologies inversées",
"Moved": "Déplacée", "Moved": "Déplacée",
"Move": "Déplacer", "Move": "Déplacer",
"Inactive": "Inactive" "Inactive": "Inactive",
"Registrations open": "Inscriptions ouvertes"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Amlínte droim ar ais", "Reverse timelines": "Amlínte droim ar ais",
"Moved": "Ar athraíodh a ionad", "Moved": "Ar athraíodh a ionad",
"Move": "Bog", "Move": "Bog",
"Inactive": "Neamhghníomhach" "Inactive": "Neamhghníomhach",
"Registrations open": "Clárúcháin oscailte"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "रिवर्स टाइमलाइन", "Reverse timelines": "रिवर्स टाइमलाइन",
"Moved": "ले जाया गया", "Moved": "ले जाया गया",
"Move": "कदम", "Move": "कदम",
"Inactive": "निष्क्रिय" "Inactive": "निष्क्रिय",
"Registrations open": "पंजीकरण खुले हैं"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Invertire le tempistiche", "Reverse timelines": "Invertire le tempistiche",
"Moved": "Mosso", "Moved": "Mosso",
"Move": "Spostare", "Move": "Spostare",
"Inactive": "Non attivo" "Inactive": "Non attivo",
"Registrations open": "Aperte le iscrizioni"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "逆タイムライン", "Reverse timelines": "逆タイムライン",
"Moved": "移動しました", "Moved": "移動しました",
"Move": "動く", "Move": "動く",
"Inactive": "非活性" "Inactive": "非活性",
"Registrations open": "登録開始"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "역방향 타임라인", "Reverse timelines": "역방향 타임라인",
"Moved": "움직이는", "Moved": "움직이는",
"Move": "이동하다", "Move": "이동하다",
"Inactive": "비활성" "Inactive": "비활성",
"Registrations open": "등록 시작"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Reverse timelines", "Reverse timelines": "Reverse timelines",
"Moved": "Moved", "Moved": "Moved",
"Move": "Barkirin", "Move": "Barkirin",
"Inactive": "Bêkar" "Inactive": "Bêkar",
"Registrations open": "Qeydkirin vedibin"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Omgekeerde tijdlijnen", "Reverse timelines": "Omgekeerde tijdlijnen",
"Moved": "Verhuisd", "Moved": "Verhuisd",
"Move": "Beweging", "Move": "Beweging",
"Inactive": "Inactief" "Inactive": "Inactief",
"Registrations open": "Inschrijvingen geopend"
} }

View File

@ -601,5 +601,6 @@
"Reverse timelines": "Reverse timelines", "Reverse timelines": "Reverse timelines",
"Moved": "Moved", "Moved": "Moved",
"Move": "Move", "Move": "Move",
"Inactive": "Inactive" "Inactive": "Inactive",
"Registrations open": "Registrations open"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Odwróć ramy czasowe", "Reverse timelines": "Odwróć ramy czasowe",
"Moved": "Przeniósł", "Moved": "Przeniósł",
"Move": "Przenosić", "Move": "Przenosić",
"Inactive": "Nieaktywny" "Inactive": "Nieaktywny",
"Registrations open": "Rejestracje otwarte"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Cronogramas reversos", "Reverse timelines": "Cronogramas reversos",
"Moved": "Mudou-se", "Moved": "Mudou-se",
"Move": "Jogada", "Move": "Jogada",
"Inactive": "Inativa" "Inactive": "Inativa",
"Registrations open": "inscrições abertas"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Обратные сроки", "Reverse timelines": "Обратные сроки",
"Moved": "Взолнованный", "Moved": "Взолнованный",
"Move": "Шаг", "Move": "Шаг",
"Inactive": "Неактивный" "Inactive": "Неактивный",
"Registrations open": "Регистрация открыта"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Обратные сроки", "Reverse timelines": "Обратные сроки",
"Moved": "Imehamishwa", "Moved": "Imehamishwa",
"Move": "Sogeza", "Move": "Sogeza",
"Inactive": "Isiyotumika" "Inactive": "Isiyotumika",
"Registrations open": "Usajili umefunguliwa"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Обратные сроки", "Reverse timelines": "Обратные сроки",
"Moved": "Etkilenmiş", "Moved": "Etkilenmiş",
"Move": "Hareket", "Move": "Hareket",
"Inactive": "etkin değil" "Inactive": "etkin değil",
"Registrations open": "kayıtlar açık"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "Обратные сроки", "Reverse timelines": "Обратные сроки",
"Moved": "Переїхав", "Moved": "Переїхав",
"Move": "рухатися", "Move": "рухатися",
"Inactive": "Неактивний" "Inactive": "Неактивний",
"Registrations open": "Реєстрація відкрита"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "פאַרקערט טיימליינז", "Reverse timelines": "פאַרקערט טיימליינז",
"Moved": "אריבערגעפארן", "Moved": "אריבערגעפארן",
"Move": "מאַך", "Move": "מאַך",
"Inactive": "ינאַקטיוו" "Inactive": "ינאַקטיוו",
"Registrations open": "רעדזשיסטריישאַנז עפענען"
} }

View File

@ -605,5 +605,6 @@
"Reverse timelines": "倒转时间线", "Reverse timelines": "倒转时间线",
"Moved": "אריבערגעפארן", "Moved": "אריבערגעפארן",
"Move": "移动", "Move": "移动",
"Inactive": "无效" "Inactive": "无效",
"Registrations open": "注册开放"
} }

View File

@ -595,10 +595,11 @@ def html_calendar(person_cache: {}, translate: {},
html_keyboard_navigation(text_mode_banner, nav_links, nav_access_keys, html_keyboard_navigation(text_mode_banner, nav_links, nav_access_keys,
month_name) month_name)
# '?month=' + str(month_number) + ';year=' + str(year) + \
new_event_str = \ new_event_str = \
'<br><center>\n<p>\n' + \ '<br><center>\n<p>\n' + \
'<a href="' + cal_actor + '/newreminder?month=' + \ '<a href="' + cal_actor + '/newreminder' + \
str(month_number) + ';year=' + str(year) + '" tabindex="2"> ' + \ '" tabindex="2"> ' + \
translate['Add to the calendar'] + '</a>\n</p>\n</center>\n' translate['Add to the calendar'] + '</a>\n</p>\n</center>\n'
calendar_icon_str = \ calendar_icon_str = \

View File

@ -130,7 +130,12 @@ def html_login(translate: {},
# show the register button # show the register button
register_button_str = '' register_button_str = ''
if get_config_param(base_dir, 'registration') == 'open': if get_config_param(base_dir, 'registration') == 'open':
if int(get_config_param(base_dir, 'registrationsRemaining')) > 0: remaining = 0
if get_config_param(base_dir, 'registrationsRemaining'):
remaining = get_config_param(base_dir, 'registrationsRemaining')
if isinstance(remaining, str):
remaining = int(remaining)
if remaining > 0:
if accounts > 0: if accounts > 0:
idx = 'Welcome. Please login or register a new account.' idx = 'Welcome. Please login or register a new account.'
login_text = \ login_text = \

View File

@ -1565,8 +1565,15 @@ def _html_edit_profile_instance(base_dir: str, translate: {},
' <label class="labels">' + \ ' <label class="labels">' + \
translate['Instance Logo'] + '</label>' + \ translate['Instance Logo'] + '</label>' + \
' <input type="file" id="instanceLogo" name="instanceLogo"' + \ ' <input type="file" id="instanceLogo" name="instanceLogo"' + \
' accept="' + image_formats + '"><br>\n' + \ ' accept="' + image_formats + '"><br>\n <br>\n'
' <br><label class="labels">' + \ registrations_open = False
if get_config_param(base_dir, "registration") == 'open':
registrations_open = True
instance_str += \
edit_check_box(translate['Registrations open'],
'regOpen', registrations_open)
instance_str += \
' <label class="labels">\n' + \
translate['Security'] + '</label><br>\n' translate['Security'] + '</label><br>\n'
node_info_str = \ node_info_str = \