mirror of https://gitlab.com/bashrc2/epicyon
Set birthday on edit profile screen
parent
0f981dd4fd
commit
2be0fae78f
18
daemon.py
18
daemon.py
|
@ -7362,6 +7362,24 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
set_max_profile_posts(base_dir, nickname, domain,
|
||||
20)
|
||||
|
||||
# birthday on edit profile screen
|
||||
birth_date = ''
|
||||
if actor_json.get('vcard:bday'):
|
||||
birth_date = actor_json['vcard:bday']
|
||||
if fields.get('birthDate'):
|
||||
if fields['birthDate'] != birth_date:
|
||||
new_birth_date = fields['birthDate']
|
||||
if '-' in new_birth_date and \
|
||||
len(new_birth_date.split('-')) == 3:
|
||||
# set birth date
|
||||
actor_json['vcard:bday'] = new_birth_date
|
||||
actor_changed = True
|
||||
else:
|
||||
# set birth date
|
||||
if birth_date:
|
||||
actor_json['vcard:bday'] = ''
|
||||
actor_changed = True
|
||||
|
||||
# change tox address
|
||||
current_tox_address = get_tox_address(actor_json)
|
||||
if fields.get('toxAddress'):
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "نوع التحديث",
|
||||
"add a rating": "إضافة تقييم",
|
||||
"Rating": "تقييم",
|
||||
"reading": "قراءة"
|
||||
"reading": "قراءة",
|
||||
"Birthday": "عيد ميلاد"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "আপডেটের ধরন",
|
||||
"add a rating": "একটি রেটিং যোগ করুন",
|
||||
"Rating": "রেটিং",
|
||||
"reading": "পড়া"
|
||||
"reading": "পড়া",
|
||||
"Birthday": "জন্মদিন"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Tipus d'actualització",
|
||||
"add a rating": "afegir una qualificació",
|
||||
"Rating": "Valoració",
|
||||
"reading": "lectura"
|
||||
"reading": "lectura",
|
||||
"Birthday": "Aniversari"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Math o ddiweddariad",
|
||||
"add a rating": "ychwanegu sgôr",
|
||||
"Rating": "Graddio",
|
||||
"reading": "darllen"
|
||||
"reading": "darllen",
|
||||
"Birthday": "Penblwydd"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Update-Typ",
|
||||
"add a rating": "Fügen Sie eine Bewertung hinzu",
|
||||
"Rating": "Bewertung",
|
||||
"reading": "lektüre"
|
||||
"reading": "lektüre",
|
||||
"Birthday": "Geburtstag"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Τύπος ενημέρωσης",
|
||||
"add a rating": "προσθέστε μια βαθμολογία",
|
||||
"Rating": "Εκτίμηση",
|
||||
"reading": "ΑΝΑΓΝΩΣΗ"
|
||||
"reading": "ΑΝΑΓΝΩΣΗ",
|
||||
"Birthday": "Γενέθλια"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Update type",
|
||||
"add a rating": "add a rating",
|
||||
"Rating": "Rating",
|
||||
"reading": "reading"
|
||||
"reading": "reading",
|
||||
"Birthday": "Birthday"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Tipo de actualización",
|
||||
"add a rating": "agregar una calificación",
|
||||
"Rating": "Clasificación",
|
||||
"reading": "lectura"
|
||||
"reading": "lectura",
|
||||
"Birthday": "Cumpleaños"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "نوع به روز رسانی",
|
||||
"add a rating": "امتیاز اضافه کنید",
|
||||
"Rating": "رتبه بندی",
|
||||
"reading": "خواندن"
|
||||
"reading": "خواندن",
|
||||
"Birthday": "روز تولد"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Type de mise à jour",
|
||||
"add a rating": "ajouter une note",
|
||||
"Rating": "Notation",
|
||||
"reading": "en lisant"
|
||||
"reading": "en lisant",
|
||||
"Birthday": "Anniversaire"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Cineál nuashonraithe",
|
||||
"add a rating": "cuir rátáil",
|
||||
"Rating": "Rátáil",
|
||||
"reading": "ag léamh"
|
||||
"reading": "ag léamh",
|
||||
"Birthday": "Breithlá"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "סוג עדכון",
|
||||
"add a rating": "להוסיף דירוג",
|
||||
"Rating": "דֵרוּג",
|
||||
"reading": "קריאה"
|
||||
"reading": "קריאה",
|
||||
"Birthday": "יום הולדת"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "अद्यतन प्रकार",
|
||||
"add a rating": "एक रेटिंग जोड़ें",
|
||||
"Rating": "रेटिंग",
|
||||
"reading": "पढ़ना"
|
||||
"reading": "पढ़ना",
|
||||
"Birthday": "जन्मदिन"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Tipo di aggiornamento",
|
||||
"add a rating": "aggiungi una valutazione",
|
||||
"Rating": "Valutazione",
|
||||
"reading": "lettura"
|
||||
"reading": "lettura",
|
||||
"Birthday": "Compleanno"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "更新タイプ",
|
||||
"add a rating": "評価を追加する",
|
||||
"Rating": "評価",
|
||||
"reading": "読む"
|
||||
"reading": "読む",
|
||||
"Birthday": "誕生日"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "업데이트 유형",
|
||||
"add a rating": "평점 추가",
|
||||
"Rating": "평가",
|
||||
"reading": "독서"
|
||||
"reading": "독서",
|
||||
"Birthday": "생일"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Cureyê nûve bike",
|
||||
"add a rating": "rêjeyek zêde bike",
|
||||
"Rating": "Rating",
|
||||
"reading": "xwendinî"
|
||||
"reading": "xwendinî",
|
||||
"Birthday": "Rojbûn"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Updatetype",
|
||||
"add a rating": "een beoordeling toevoegen",
|
||||
"Rating": "Beoordeling",
|
||||
"reading": "lezing"
|
||||
"reading": "lezing",
|
||||
"Birthday": "Verjaardag"
|
||||
}
|
||||
|
|
|
@ -649,5 +649,6 @@
|
|||
"Update type": "Update type",
|
||||
"add a rating": "add a rating",
|
||||
"Rating": "Rating",
|
||||
"reading": "reading"
|
||||
"reading": "reading",
|
||||
"Birthday": "Birthday"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Typ aktualizacji",
|
||||
"add a rating": "dodaj ocenę",
|
||||
"Rating": "Ocena",
|
||||
"reading": "czytanie"
|
||||
"reading": "czytanie",
|
||||
"Birthday": "Urodziny"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Tipo de atualização",
|
||||
"add a rating": "adicionar uma classificação",
|
||||
"Rating": "Avaliação",
|
||||
"reading": "leitura"
|
||||
"reading": "leitura",
|
||||
"Birthday": "Aniversário"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Тип обновления",
|
||||
"add a rating": "добавить оценку",
|
||||
"Rating": "Рейтинг",
|
||||
"reading": "чтение"
|
||||
"reading": "чтение",
|
||||
"Birthday": "День рождения"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Aina ya sasisho",
|
||||
"add a rating": "ongeza ukadiriaji",
|
||||
"Rating": "Ukadiriaji",
|
||||
"reading": "kusoma"
|
||||
"reading": "kusoma",
|
||||
"Birthday": "Siku ya kuzaliwa"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Güncelleme türü",
|
||||
"add a rating": "derecelendirme ekle",
|
||||
"Rating": "Değerlendirme",
|
||||
"reading": "okuma"
|
||||
"reading": "okuma",
|
||||
"Birthday": "Doğum günü"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "Тип оновлення",
|
||||
"add a rating": "додати оцінку",
|
||||
"Rating": "Рейтинг",
|
||||
"reading": "читання"
|
||||
"reading": "читання",
|
||||
"Birthday": "день народження"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "דערהייַנטיקן טיפּ",
|
||||
"add a rating": "לייגן אַ ראַנג",
|
||||
"Rating": "שאַץ",
|
||||
"reading": "לייענען"
|
||||
"reading": "לייענען",
|
||||
"Birthday": "דיין געבורסטאָג"
|
||||
}
|
||||
|
|
|
@ -653,5 +653,6 @@
|
|||
"Update type": "更新类型",
|
||||
"add a rating": "添加评级",
|
||||
"Rating": "评分",
|
||||
"reading": "阅读"
|
||||
"reading": "阅读",
|
||||
"Birthday": "生日"
|
||||
}
|
||||
|
|
|
@ -2835,6 +2835,20 @@ def _html_edit_profile_main(base_dir: str, display_nickname: str, bio_str: str,
|
|||
'maxRecentProfilePosts', max_profile_posts,
|
||||
1, 20, max_recent_posts)
|
||||
|
||||
birth_date = ''
|
||||
birth_date_field = 'vcard:bday'
|
||||
if actor_json.get(birth_date_field):
|
||||
if '-' in actor_json[birth_date_field]:
|
||||
if len(actor_json[birth_date_field].split('-')) == 3:
|
||||
if 'T' in actor_json[birth_date_field]:
|
||||
actor_json[birth_date_field] = \
|
||||
actor_json[birth_date_field].split('T')[0]
|
||||
birth_date = actor_json[birth_date_field]
|
||||
edit_profile_form += '<br>\n<label class="labels">' + \
|
||||
translate['Birthday'] + ': </label>\n'
|
||||
edit_profile_form += \
|
||||
'<input type="date" name="birthDate" value="' + birth_date + '">\n'
|
||||
|
||||
edit_profile_form += ' </div>\n'
|
||||
return edit_profile_form
|
||||
|
||||
|
|
Loading…
Reference in New Issue