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
```
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:
``` bash

View File

@ -6357,6 +6357,31 @@ class PubServer(BaseHTTPRequestHandler):
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
curr_libretranslate_url = \
get_config_param(base_dir,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -605,5 +605,6 @@
"Reverse timelines": "倒转时间线",
"Moved": "אריבערגעפארן",
"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,
month_name)
# '?month=' + str(month_number) + ';year=' + str(year) + \
new_event_str = \
'<br><center>\n<p>\n' + \
'<a href="' + cal_actor + '/newreminder?month=' + \
str(month_number) + ';year=' + str(year) + '" tabindex="2"> ' + \
'<a href="' + cal_actor + '/newreminder' + \
'" tabindex="2"> ' + \
translate['Add to the calendar'] + '</a>\n</p>\n</center>\n'
calendar_icon_str = \

View File

@ -130,7 +130,12 @@ def html_login(translate: {},
# show the register button
register_button_str = ''
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:
idx = 'Welcome. Please login or register a new account.'
login_text = \

View File

@ -1565,8 +1565,15 @@ def _html_edit_profile_instance(base_dir: str, translate: {},
' <label class="labels">' + \
translate['Instance Logo'] + '</label>' + \
' <input type="file" id="instanceLogo" name="instanceLogo"' + \
' accept="' + image_formats + '"><br>\n' + \
' <br><label class="labels">' + \
' accept="' + image_formats + '"><br>\n <br>\n'
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'
node_info_str = \