From 16b1fc2c53e4f1d55f2726b0984a5f1ef03bc9b1 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 20 Jan 2024 13:24:39 +0100 Subject: [PATCH 01/17] refactor(subplebbit): use home feed styling --- src/views/subplebbit/subplebbit.module.css | 33 ---------------------- src/views/subplebbit/subplebbit.tsx | 2 +- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 src/views/subplebbit/subplebbit.module.css diff --git a/src/views/subplebbit/subplebbit.module.css b/src/views/subplebbit/subplebbit.module.css deleted file mode 100644 index 90e3706a..00000000 --- a/src/views/subplebbit/subplebbit.module.css +++ /dev/null @@ -1,33 +0,0 @@ -.footer { - padding-left: 5px; -} - -/* position virtuoso window content relatively to sidebar */ -div[data-viewport-type="window"] { - position: relative !important; -} - -.stateString { - text-transform: lowercase; -} - - -@media (max-width: 768px) { - .content { - padding: 7px 0px 0px 0px; - } - - .sidebar { - display: none; - } -} - -@media (min-width: 768px) { - .content { - padding: 7px 5px 0px 5px; - } - - .stateString { - max-width: calc(100% - 305px); - } -} \ No newline at end of file diff --git a/src/views/subplebbit/subplebbit.tsx b/src/views/subplebbit/subplebbit.tsx index 042177ce..3d53b614 100644 --- a/src/views/subplebbit/subplebbit.tsx +++ b/src/views/subplebbit/subplebbit.tsx @@ -3,7 +3,7 @@ import { useParams } from 'react-router-dom'; import { useFeed, useSubplebbit } from '@plebbit/plebbit-react-hooks'; import { Virtuoso, VirtuosoHandle, StateSnapshot } from 'react-virtuoso'; import { useTranslation } from 'react-i18next'; -import styles from './subplebbit.module.css'; +import styles from '../home/home.module.css'; import LoadingEllipsis from '../../components/loading-ellipsis'; import Post from '../../components/post'; import Sidebar from '../../components/sidebar'; From c96e644471b2b30975a4eb9da70047dccb3c05fc Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 20 Jan 2024 13:28:39 +0100 Subject: [PATCH 02/17] chore(translations): saving --- public/translations/ar/default.json | 3 ++- public/translations/bn/default.json | 3 ++- public/translations/cs/default.json | 3 ++- public/translations/da/default.json | 3 ++- public/translations/de/default.json | 3 ++- public/translations/el/default.json | 3 ++- public/translations/en/default.json | 3 ++- public/translations/es/default.json | 3 ++- public/translations/fa/default.json | 3 ++- public/translations/fi/default.json | 3 ++- public/translations/fil/default.json | 3 ++- public/translations/fr/default.json | 3 ++- public/translations/he/default.json | 3 ++- public/translations/hi/default.json | 3 ++- public/translations/hu/default.json | 3 ++- public/translations/id/default.json | 3 ++- public/translations/it/default.json | 3 ++- public/translations/ja/default.json | 3 ++- public/translations/ko/default.json | 3 ++- public/translations/mr/default.json | 3 ++- public/translations/nl/default.json | 3 ++- public/translations/no/default.json | 3 ++- public/translations/pl/default.json | 3 ++- public/translations/pt/default.json | 3 ++- public/translations/ro/default.json | 3 ++- public/translations/ru/default.json | 3 ++- public/translations/sq/default.json | 3 ++- public/translations/sv/default.json | 3 ++- public/translations/te/default.json | 3 ++- public/translations/th/default.json | 3 ++- public/translations/tr/default.json | 3 ++- public/translations/uk/default.json | 3 ++- public/translations/ur/default.json | 3 ++- public/translations/vi/default.json | 3 ++- public/translations/zh/default.json | 3 ++- 35 files changed, 70 insertions(+), 35 deletions(-) diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index 7143a3e5..6e584ab2 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -189,5 +189,6 @@ "submit_to": "إرسال إلى <1>{{link}}", "edit_subscriptions": "تحرير الاشتراكات", "last_account_notice": "لا يمكنك حذف حسابك الأخير، يرجى إنشاء حساب جديد أولاً.", - "delete_confirm": "هل أنت متأكد أنك تريد حذف {{value}}؟" + "delete_confirm": "هل أنت متأكد أنك تريد حذف {{value}}؟", + "saving": "حفظ" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index 1e3372ad..9cbacff8 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -189,5 +189,6 @@ "submit_to": "জমা দিন <1>{{link}}", "edit_subscriptions": "সাবস্ক্রিপশন সম্পাদনা", "last_account_notice": "আপনি আপনার সর্বশেষ অ্যাকাউন্টটি মুছে ফেলতে পারবেন না, দয়া করে প্রথমে একটি নতুন তৈরি করুন।", - "delete_confirm": "আপনি কি নিশ্চিত যে আপনি {{value}} মুছতে চান?" + "delete_confirm": "আপনি কি নিশ্চিত যে আপনি {{value}} মুছতে চান?", + "saving": "সংরক্ষণ" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 104833ea..400c2d58 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -189,5 +189,6 @@ "submit_to": "Odeslat na <1>{{link}}", "edit_subscriptions": "Upravit předplatné", "last_account_notice": "Nemůžete smazat svůj poslední účet, nejprve si vytvořte nový.", - "delete_confirm": "Opravdu chcete smazat {{value}}?" + "delete_confirm": "Opravdu chcete smazat {{value}}?", + "saving": "Ukládání" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 48e06927..ce41f61e 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -189,5 +189,6 @@ "submit_to": "Indsend til <1>{{link}}", "edit_subscriptions": "Rediger abonnementer", "last_account_notice": "Du kan ikke slette din sidste konto, opret venligst en ny først.", - "delete_confirm": "Er du sikker på, at du vil slette {{value}}?" + "delete_confirm": "Er du sikker på, at du vil slette {{value}}?", + "saving": "Gemmer" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index ef2bf61d..abe18cd5 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -189,5 +189,6 @@ "submit_to": "Einreichen an <1>{{link}}", "edit_subscriptions": "Abonnements bearbeiten", "last_account_notice": "Sie können Ihr letztes Konto nicht löschen, bitte erstellen Sie zuerst ein neues.", - "delete_confirm": "Möchten Sie {{value}} wirklich löschen?" + "delete_confirm": "Möchten Sie {{value}} wirklich löschen?", + "saving": "Speichern" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index e8d5965a..b500faff 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -189,5 +189,6 @@ "submit_to": "Υποβολή σε <1>{{link}}", "edit_subscriptions": "Επεξεργασία συνδρομών", "last_account_notice": "Δεν μπορείτε να διαγράψετε το τελευταίο σας λογαριασμό, δημιουργήστε πρώτα έναν νέο.", - "delete_confirm": "Είστε σίγουροι ότι θέλετε να διαγράψετε το {{value}};" + "delete_confirm": "Είστε σίγουροι ότι θέλετε να διαγράψετε το {{value}};", + "saving": "Αποθήκευση" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index 4b44de4c..98cbfee8 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -189,5 +189,6 @@ "submit_to": "Submit to <1>{{link}}", "edit_subscriptions": "Edit Subscriptions", "last_account_notice": "You cannot delete your last account, please create a new one first.", - "delete_confirm": "Are you sure you want to delete {{value}}?" + "delete_confirm": "Are you sure you want to delete {{value}}?", + "saving": "Saving" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 6718dc41..cea04529 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -189,5 +189,6 @@ "submit_to": "Enviar a <1>{{link}}", "edit_subscriptions": "Editar suscripciones", "last_account_notice": "No puedes eliminar tu última cuenta, por favor crea una nueva primero.", - "delete_confirm": "¿Estás seguro de que quieres eliminar {{value}}?" + "delete_confirm": "¿Estás seguro de que quieres eliminar {{value}}?", + "saving": "Guardando" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index cc952610..38c3f127 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -189,5 +189,6 @@ "submit_to": "ارسال به <1>{{link}}", "edit_subscriptions": "ویرایش اشتراک‌ها", "last_account_notice": "شما نمی‌توانید حساب آخر خود را حذف کنید، لطفاً ابتدا یک حساب جدید ایجاد کنید.", - "delete_confirm": "آیا مطمئن هستید که می‌خواهید {{value}} را حذف کنید؟" + "delete_confirm": "آیا مطمئن هستید که می‌خواهید {{value}} را حذف کنید؟", + "saving": "ذخیره" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index d55c8d0b..0110d7ad 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -189,5 +189,6 @@ "submit_to": "Lähetä osoitteeseen <1>{{link}}", "edit_subscriptions": "Muokkaa tilauksia", "last_account_notice": "Et voi poistaa viimeistä tiliäsi, luo ensin uusi.", - "delete_confirm": "Haluatko varmasti poistaa {{value}}?" + "delete_confirm": "Haluatko varmasti poistaa {{value}}?", + "saving": "Tallentaa" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 2f9a5aa3..792e22fe 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -189,5 +189,6 @@ "submit_to": "Isumite sa <1>{{link}}", "edit_subscriptions": "I-edit ang mga Subskripsyon", "last_account_notice": "Hindi mo maaaring burahin ang iyong huling account, mangyaring gumawa muna ng bago.", - "delete_confirm": "Sigurado ka bang nais mong burahin ang {{value}}?" + "delete_confirm": "Sigurado ka bang nais mong burahin ang {{value}}?", + "saving": "Nag-i-save" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index 0cc6538c..7a0fca47 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -189,5 +189,6 @@ "submit_to": "Soumettre à <1>{{link}}", "edit_subscriptions": "Modifier les abonnements", "last_account_notice": "Vous ne pouvez pas supprimer votre dernier compte, veuillez d'abord en créer un nouveau.", - "delete_confirm": "Êtes-vous sûr de vouloir supprimer {{value}}?" + "delete_confirm": "Êtes-vous sûr de vouloir supprimer {{value}}?", + "saving": "Enregistrement" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index d89793be..df14f354 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -189,5 +189,6 @@ "submit_to": "שלח אל <1>{{link}}", "edit_subscriptions": "ערוך מנויים", "last_account_notice": "אינך יכול למחוק את החשבון האחרון שלך, אנא צור חשבון חדש תחילה.", - "delete_confirm": "האם אתה בטוח שברצונך למחוק את {{value}}?" + "delete_confirm": "האם אתה בטוח שברצונך למחוק את {{value}}?", + "saving": "שמירה" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index 717b26d5..b6840bf8 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -189,5 +189,6 @@ "submit_to": "जमा करें <1>{{link}}", "edit_subscriptions": "सदस्यता संपादित करें", "last_account_notice": "आप अपना आखिरी खाता नहीं हटा सकते, कृपया पहले एक नया खाता बनाएं।", - "delete_confirm": "क्या आप निश्चित हैं कि आप {{value}} को हटाना चाहते हैं?" + "delete_confirm": "क्या आप निश्चित हैं कि आप {{value}} को हटाना चाहते हैं?", + "saving": "सहेज रहा है" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index f6e7c4de..6dd38c01 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -189,5 +189,6 @@ "submit_to": "Küldés ide: <1>{{link}}", "edit_subscriptions": "Előfizetések szerkesztése", "last_account_notice": "Nem törölheti az utolsó fiókját, először hozzon létre egy újat.", - "delete_confirm": "Biztosan törölni szeretné {{value}}?" + "delete_confirm": "Biztosan törölni szeretné {{value}}?", + "saving": "Mentés" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 7c6aa065..2345602c 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -189,5 +189,6 @@ "submit_to": "Kirim ke <1>{{link}}", "edit_subscriptions": "Edit Langganan", "last_account_notice": "Anda tidak dapat menghapus akun terakhir Anda, harap buat yang baru terlebih dahulu.", - "delete_confirm": "Apakah Anda yakin ingin menghapus {{value}}?" + "delete_confirm": "Apakah Anda yakin ingin menghapus {{value}}?", + "saving": "Menyimpan" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 66a40702..c85e4af5 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -189,5 +189,6 @@ "submit_to": "Invia a <1>{{link}}", "edit_subscriptions": "Modifica sottoscrizioni", "last_account_notice": "Non puoi eliminare il tuo ultimo account, crea prima un nuovo account.", - "delete_confirm": "Confermi di voler cancellare {{value}}?" + "delete_confirm": "Confermi di voler cancellare {{value}}?", + "saving": "Salvataggio" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 2ba628ac..f3aa671c 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -189,5 +189,6 @@ "submit_to": "<1>{{link}}に提出する", "edit_subscriptions": "購読の編集", "last_account_notice": "最後のアカウントは削除できません。新しいアカウントを作成してください。", - "delete_confirm": "{{value}} を削除してもよろしいですか?" + "delete_confirm": "{{value}} を削除してもよろしいですか?", + "saving": "保存中" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index abaef67d..11b4755b 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -189,5 +189,6 @@ "submit_to": "<1>{{link}}(으)로 제출하기", "edit_subscriptions": "구독 편집", "last_account_notice": "마지막 계정을 삭제할 수 없습니다. 먼저 새로운 계정을 만드십시오.", - "delete_confirm": "{{value}}를 삭제하시겠습니까?" + "delete_confirm": "{{value}}를 삭제하시겠습니까?", + "saving": "저장 중" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index 580271ab..249d4433 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -189,5 +189,6 @@ "submit_to": "<1>{{link}} कडे पाठवा", "edit_subscriptions": "सदस्यता संपादने", "last_account_notice": "तुम्ही आपला आखाडा खाता काढू शकता नाही, कृपया पहिल्यांनी एक नवीन खाती तयार करा.", - "delete_confirm": "तुम्हाला खात्री आहे का की तुम्ही {{value}} काढून टाकणार आहात?" + "delete_confirm": "तुम्हाला खात्री आहे का की तुम्ही {{value}} काढून टाकणार आहात?", + "saving": "सेवा करत आहे" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index 9f0bb14d..20994108 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -189,5 +189,6 @@ "submit_to": "Verzenden naar <1>{{link}}", "edit_subscriptions": "Abonnementen bewerken", "last_account_notice": "U kunt uw laatste account niet verwijderen, maak eerst een nieuwe aan.", - "delete_confirm": "Weet je zeker dat je {{value}} wilt verwijderen?" + "delete_confirm": "Weet je zeker dat je {{value}} wilt verwijderen?", + "saving": "Opslaan" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index 7cd0a07a..a416104b 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -189,5 +189,6 @@ "submit_to": "Send til <1>{{link}}", "edit_subscriptions": "Rediger abonnementer", "last_account_notice": "Du kan ikke slette din siste konto, vennligst opprett en ny først.", - "delete_confirm": "Er du sikker på at du vil slette {{value}}?" + "delete_confirm": "Er du sikker på at du vil slette {{value}}?", + "saving": "Lagrer" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 267b85e8..c631aa20 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -189,5 +189,6 @@ "submit_to": "Prześlij do <1>{{link}}", "edit_subscriptions": "Edytuj subskrypcje", "last_account_notice": "Nie możesz usunąć swojego ostatniego konta, proszę najpierw utwórz nowe.", - "delete_confirm": "Czy na pewno chcesz usunąć {{value}}?" + "delete_confirm": "Czy na pewno chcesz usunąć {{value}}?", + "saving": "Zapisywanie" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 8b2dd01c..cc5d1d52 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -189,5 +189,6 @@ "submit_to": "Enviar para <1>{{link}}", "edit_subscriptions": "Editar assinaturas", "last_account_notice": "Você não pode excluir sua última conta, por favor crie uma nova primeiro.", - "delete_confirm": "Tem certeza de que deseja excluir {{value}}?" + "delete_confirm": "Tem certeza de que deseja excluir {{value}}?", + "saving": "Salvando" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 1120c7fb..913dd59c 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -189,5 +189,6 @@ "submit_to": "Trimite la <1>{{link}}", "edit_subscriptions": "Editează abonamente", "last_account_notice": "Nu puteți șterge ultimul dvs. cont, vă rugăm să creați unul nou mai întâi.", - "delete_confirm": "Sunteți sigur că doriți să ștergeți {{value}}?" + "delete_confirm": "Sunteți sigur că doriți să ștergeți {{value}}?", + "saving": "Se salvează" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index 5694719a..356cd0fd 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -189,5 +189,6 @@ "submit_to": "Отправить на <1>{{link}}", "edit_subscriptions": "Редактировать подписки", "last_account_notice": "Вы не можете удалить свою последнюю учетную запись, сначала создайте новую.", - "delete_confirm": "Вы уверены, что хотите удалить {{value}}?" + "delete_confirm": "Вы уверены, что хотите удалить {{value}}?", + "saving": "Сохранение" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 26ebadca..5528f1c4 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -189,5 +189,6 @@ "submit_to": "Dërgo te <1>{{link}}", "edit_subscriptions": "Ndrysho abonimet", "last_account_notice": "Nuk mund të fshini llogarinë tuaj të fundit, ju lutemi krijoni një të re fillimisht.", - "delete_confirm": "A jeni të sigurt se dëshironi të fshini {{value}}?" + "delete_confirm": "A jeni të sigurt se dëshironi të fshini {{value}}?", + "saving": "Ruajtja" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 2befcbbb..247c69bb 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -189,5 +189,6 @@ "submit_to": "Skicka till <1>{{link}}", "edit_subscriptions": "Redigera prenumerationer", "last_account_notice": "Du kan inte ta bort ditt senaste konto, skapa först ett nytt.", - "delete_confirm": "Är du säker på att du vill ta bort {{value}}?" + "delete_confirm": "Är du säker på att du vill ta bort {{value}}?", + "saving": "Sparar" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index 4a792228..c7a721ce 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -189,5 +189,6 @@ "submit_to": "<1>{{link}} కు పంపండి", "edit_subscriptions": "సబ్‌స్క్రిప్షన్స్ సవరించండి", "last_account_notice": "మీ చివరి ఖాతాను తొలగించలేకపోవదు, దయచేసి మొదటికి కొత్త ఒకటి ప్రమాణించండి.", - "delete_confirm": "మీరు {{value}} ను తొలగించడానికి ఖచ్చితంగా ఉన్నారా?" + "delete_confirm": "మీరు {{value}} ను తొలగించడానికి ఖచ్చితంగా ఉన్నారా?", + "saving": "సేవ్‌చేస్తోంది" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index eb517041..a51fd0bd 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -189,5 +189,6 @@ "submit_to": "ส่งไปที่ <1>{{link}}", "edit_subscriptions": "แก้ไขการสมัครสมาชิก", "last_account_notice": "คุณไม่สามารถลบบัญชีครั้งสุดท้ายของคุณได้ โปรดสร้างบัญชีใหม่ก่อน", - "delete_confirm": "คุณแน่ใจหรือไม่ว่าต้องการลบ {{value}}?" + "delete_confirm": "คุณแน่ใจหรือไม่ว่าต้องการลบ {{value}}?", + "saving": "กำลังบันทึก" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 9e087ccf..10bce03a 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -189,5 +189,6 @@ "submit_to": "<1>{{link}} adresine gönder", "edit_subscriptions": "Abonelikleri Düzenle", "last_account_notice": "Son hesabınızı silemezsiniz, lütfen önce yeni bir tane oluşturun.", - "delete_confirm": "{{value}}'yi silmek istediğinizden emin misiniz?" + "delete_confirm": "{{value}}'yi silmek istediğinizden emin misiniz?", + "saving": "Kaydediliyor" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 0ce0bcab..b5feb94e 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -189,5 +189,6 @@ "submit_to": "Надіслати до <1>{{link}}", "edit_subscriptions": "Редагувати підписки", "last_account_notice": "Ви не можете видалити свій останній обліковий запис, будь ласка, спочатку створіть новий.", - "delete_confirm": "Ви впевнені, що хочете видалити {{value}}?" + "delete_confirm": "Ви впевнені, що хочете видалити {{value}}?", + "saving": "Збереження" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 22c1e602..da1efacf 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -189,5 +189,6 @@ "submit_to": "جمع کرائیں <1>{{link}}", "edit_subscriptions": "سبسکرائب کو ترتیب دیں", "last_account_notice": "آپ اپنا آخری اکاؤنٹ نہیں حذف کر سکتے، براہ کرم پہلے نیا اکاؤنٹ بنائیں۔", - "delete_confirm": "کیا آپ واقعی {{value}} کو حذف کرنا چاہتے ہیں؟" + "delete_confirm": "کیا آپ واقعی {{value}} کو حذف کرنا چاہتے ہیں؟", + "saving": "حفظ ہو رہا ہے" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index 4798b66a..172f45a6 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -189,5 +189,6 @@ "submit_to": "Gửi đến <1>{{link}}", "edit_subscriptions": "Chỉnh sửa đăng ký", "last_account_notice": "Bạn không thể xóa tài khoản cuối cùng của mình, vui lòng tạo một tài khoản mới trước.", - "delete_confirm": "Bạn có chắc chắn muốn xóa {{value}} không?" + "delete_confirm": "Bạn có chắc chắn muốn xóa {{value}} không?", + "saving": "Đang lưu" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index 299b9e10..7efcd9fc 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -189,5 +189,6 @@ "submit_to": "提交至 <1>{{link}}", "edit_subscriptions": "编辑订阅", "last_account_notice": "您不能删除您的最后一个帐户,请先创建一个新帐户。", - "delete_confirm": "您确定要删除 {{value}} 吗?" + "delete_confirm": "您确定要删除 {{value}} 吗?", + "saving": "正在保存" } \ No newline at end of file From 103a20959444676903cb02145c27618d1f826418 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 20 Jan 2024 15:28:35 +0100 Subject: [PATCH 03/17] feat(sidebar): detect OS for 'download app' button in footer --- src/components/sidebar/sidebar.module.css | 27 +++------ src/components/sidebar/sidebar.tsx | 70 ++++++++++++----------- 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/src/components/sidebar/sidebar.module.css b/src/components/sidebar/sidebar.module.css index d5080d14..b1c9c5e5 100644 --- a/src/components/sidebar/sidebar.module.css +++ b/src/components/sidebar/sidebar.module.css @@ -262,42 +262,29 @@ a { } .footer ul { + margin-top: 5px; + margin-bottom: 10px; display: flex; - flex-wrap: wrap; - align-items: center; - justify-content: space-between; + justify-content: center; list-style: none; } -.footerTitle { - color: var(--gray-footer); - font-size: 18px; - font-weight: normal; - margin-bottom: 5px; +.footerSeparator { + margin: 0 2px; } .footer li a { - font-size: 12px; + font-size: 10px; } .footer a { - color: var(--link-footer); + color: var(--gray-footer); } .footer a:hover { text-decoration: underline; } -.version { - margin: 20px 0 24px 0; - text-align: center; - font-size: 10px; -} - -.unstable a { - color: var(--yellow); -} - .desktopAd { padding: 0px 0 15px 0; margin-top: -5px; diff --git a/src/components/sidebar/sidebar.tsx b/src/components/sidebar/sidebar.tsx index d8d69271..f6743caf 100644 --- a/src/components/sidebar/sidebar.tsx +++ b/src/components/sidebar/sidebar.tsx @@ -97,6 +97,23 @@ const ModerationTools = ({ address }: sidebarProps) => { ); }; +const downloadAppLink = (() => { + const platform = navigator.platform; + if (platform === 'Linux' || platform === 'Linux x86_64' || platform === 'Linux i686' || platform === 'Linux aarch64') { + return `https://github.com/plebbit/seedit/releases/download/v${version}/seedit-${version}.AppImage`; + } else if (platform === 'Win32' || platform === 'Win64' || platform === 'Windows') { + return `https://github.com/plebbit/seedit/releases/download/v${version}/seedit.Portable.${version}.exe`; + } else if (platform === 'MacIntel' || platform === 'Macintosh') { + return `https://github.com/plebbit/seedit/releases/download/v${version}/seedit-${version}.dmg`; + } else if (platform === 'Android') { + return undefined; + } else if (platform === 'iPhone' || platform === 'iPad') { + return undefined; + } else { + return undefined; + } +})(); + const Sidebar = ({ address, cid, createdAt, description, downvoteCount = 0, roles, rules, timestamp = 0, title, updatedAt, upvoteCount = 0 }: sidebarProps) => { const { t } = useTranslation(); const { allActiveUserCount, hourActiveUserCount } = useSubplebbitStats({ subplebbitAddress: address }); @@ -208,63 +225,52 @@ const Sidebar = ({ address, cid, createdAt, description, downvoteCount = 0, role
- ...each community needs to be seeded. + ...for your DAO.
- ...the desktop app seeds automatically! + ...because you got banned from reddit.
-
{t('about')}
-
apps & tools
-
- - seedit {commitRef ? 'dev build (unstable) ' + commitRef : window.electron && window.electron.isElectron ? 'desktop' : 'web'} v{version} - GPL 2.0 - -
); From fbd05cd4b71231edd897cdb63f8c4db73f223c93 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 20 Jan 2024 17:40:48 +0100 Subject: [PATCH 04/17] fix eslint --- src/components/sidebar/sidebar.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/sidebar/sidebar.tsx b/src/components/sidebar/sidebar.tsx index f6743caf..b64bb341 100644 --- a/src/components/sidebar/sidebar.tsx +++ b/src/components/sidebar/sidebar.tsx @@ -11,7 +11,6 @@ import SearchBar from '../search-bar'; import SubscribeButton from '../subscribe-button'; import packageJson from '../../../package.json'; const { version } = packageJson; -const commitRef = process?.env?.REACT_APP_COMMIT_REF ? ` ${process.env.REACT_APP_COMMIT_REF.slice(0, 7)}` : ''; interface sidebarProps { address?: string | undefined; From c81d240b90f80844d87bf313bd369cd88dcfb285 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 20 Jan 2024 18:09:28 +0100 Subject: [PATCH 05/17] fix(media utils): add m.youtube --- src/components/post/embed/embed.tsx | 2 +- src/lib/utils/media-utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/post/embed/embed.tsx b/src/components/post/embed/embed.tsx index dceed497..7d7d3a8e 100644 --- a/src/components/post/embed/embed.tsx +++ b/src/components/post/embed/embed.tsx @@ -43,7 +43,7 @@ interface EmbedComponentProps { parsedUrl: URL; } -const youtubeHosts = new Set(['youtube.com', 'www.youtube.com', 'youtu.be', 'www.youtu.be']); +const youtubeHosts = new Set(['youtube.com', 'www.youtube.com', 'youtu.be', 'www.youtu.be', 'm.youtube.com']); const YoutubeEmbed = ({ parsedUrl }: EmbedComponentProps) => { let youtubeId; diff --git a/src/lib/utils/media-utils.ts b/src/lib/utils/media-utils.ts index bb0ad11c..7d8e0159 100644 --- a/src/lib/utils/media-utils.ts +++ b/src/lib/utils/media-utils.ts @@ -39,7 +39,7 @@ const getCommentMediaInfo = (comment: Comment) => { const host = url.hostname; let patternThumbnailUrl; - if (['youtube.com', 'www.youtube.com', 'youtu.be'].includes(host)) { + if (['youtube.com', 'www.youtube.com', 'youtu.be', 'www.youtu.be', 'm.youtube.com'].includes(host)) { const videoId = host === 'youtu.be' ? url.pathname.slice(1) : url.searchParams.get('v'); patternThumbnailUrl = `https://img.youtube.com/vi/${videoId}/0.jpg`; } else if (host.includes('streamable.com')) { From 36ce9ef329a7ef68b9fff3e3e06dc77533c213a1 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 20 Jan 2024 18:35:00 +0100 Subject: [PATCH 06/17] style(sidebar): restyle footer --- src/components/sidebar/sidebar.module.css | 21 ++---- src/components/sidebar/sidebar.tsx | 86 +++++++++++------------ 2 files changed, 44 insertions(+), 63 deletions(-) diff --git a/src/components/sidebar/sidebar.module.css b/src/components/sidebar/sidebar.module.css index b1c9c5e5..e48f8437 100644 --- a/src/components/sidebar/sidebar.module.css +++ b/src/components/sidebar/sidebar.module.css @@ -263,9 +263,7 @@ a { .footer ul { margin-top: 5px; - margin-bottom: 10px; display: flex; - justify-content: center; list-style: none; } @@ -285,23 +283,12 @@ a { text-decoration: underline; } -.desktopAd { - padding: 0px 0 15px 0; - margin-top: -5px; -} - -.desktopAdSubtitle { - font: normal x-small verdana, arial, helvetica, sans-serif; - font-size: 11px; - color: var(--gray-strong); -} - -.desktopAdLogo img { +.footerLogo img { height: 40px; - margin: 5px 10px 0 0; + margin: 0 10px 0 0; float: left; } -.footerSecondTitle { - margin-top: 10px; +.footerLinks { + padding-top: 1px; } \ No newline at end of file diff --git a/src/components/sidebar/sidebar.tsx b/src/components/sidebar/sidebar.tsx index b64bb341..0f2081cd 100644 --- a/src/components/sidebar/sidebar.tsx +++ b/src/components/sidebar/sidebar.tsx @@ -218,58 +218,52 @@ const Sidebar = ({ address, cid, createdAt, description, downvoteCount = 0, role
-
- +
+ seedit mascot - -
- ...for your DAO. -
- ...because you got banned from reddit. -
-
-
- - + +
); From df82682f6c98935fd9c2136d58157245f9493d61 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 20 Jan 2024 22:41:54 +0100 Subject: [PATCH 07/17] update subplebbit settings --- .../subplebbit-settings.module.css | 59 ++-- .../subplebbit-settings.tsx | 287 ++++++++++-------- 2 files changed, 186 insertions(+), 160 deletions(-) diff --git a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css index 8bbbbc9d..b2413b50 100644 --- a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css +++ b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.module.css @@ -1,5 +1,6 @@ .content { color: var(--text); + margin-bottom: 40px; } .box { @@ -58,6 +59,10 @@ padding: 2px 5px 3px; } +.saveOptions { + text-transform: lowercase; +} + .fullSettings textarea { height: 200px; } @@ -69,6 +74,8 @@ } .infobar { + max-width: 100%; + box-sizing: border-box; background-color: var(--background-orange); border-color: var(--border-orange); border-style: solid; @@ -119,29 +126,40 @@ font-size: 12px; } +.challengesArray { + margin: 5px 0; + font-size: 15px; +} + +.challenge { + font-size: 15px; + margin-top: 10px; +} + +.challengeEditButton { + text-transform: lowercase; + margin: 3px 5px; + display: inline-block; +} + .moderator { font-size: 15px; color: var(--text); - margin-top: 20px; + margin-top: 15px; } -.addModerator { +.addButton { display: block; } .moderatorAddress, .moderatorRole { font-size: 13px; - margin-top: 5px; } .moderatorAddress input, .moderatorRole input { font-size: 15px; } -.moderatorAddress input { - margin-bottom: 5px; -} - .rule { font-size: 15px; margin-top: 10px; @@ -151,19 +169,7 @@ margin-top: 3px; } -.addRule { - display: block; -} - -.deleteRule { - background: none no-repeat scroll center right; - background-image: url("/public/assets/buttons/delete-button.png"); - padding-right: 10px; - margin-left: 10px; - cursor: pointer; -} - -.deleteModerator { +.deleteButton { background: none no-repeat scroll center right; background-image: url("/public/assets/buttons/delete-button.png"); padding-right: 10px; @@ -196,23 +202,10 @@ .sidebar { display: none; } - .box { - width: 100%; - box-sizing: border-box; - } - - .boxInput input, .boxInput textarea { - width: calc(100% - 104px); - box-sizing: border-box; - } } @media (min-width: 768px) { .content { padding: 7px 5px 0px 5px; } - - .infobar { - max-width: calc(100% - 327px); - } } \ No newline at end of file diff --git a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx index 1986cfb8..067f207c 100644 --- a/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx +++ b/src/views/subplebbit/subplebbit-settings/subplebbit-settings.tsx @@ -7,6 +7,7 @@ import stringify from 'json-stringify-pretty-compact'; import styles from './subplebbit-settings.module.css'; import Sidebar from '../../../components/sidebar'; import { isValidURL } from '../../../lib/utils/url-utils'; +import LoadingEllipsis from '../../../components/loading-ellipsis'; const isElectron = window.electron && window.electron.isElectron; @@ -95,11 +96,11 @@ const Rules = ({ rules }: { rules: string[] }) => {
{t('rules')}
shown in the sidebar of your community
- + {rules?.map((rule, index) => (
Rule #{index + 1} - +
@@ -118,11 +119,11 @@ const Moderators = ({ roles }: { roles: RolesCollection | undefined }) => {
{t('moderators')}
let other users moderate and post without challenges
- + {rolesList?.map(({ address, role }, index) => (
Moderator #{index + 1} - +
User address: @@ -146,131 +147,157 @@ const Moderators = ({ roles }: { roles: RolesCollection | undefined }) => { ); }; -const challenges = ['text-math', 'captcha-canvas-v3', 'fail', 'blacklist', 'question', 'evm-contract-call']; +const challengesNames = ['text-math', 'captcha-canvas-v3', 'fail', 'blacklist', 'question', 'evm-contract-call']; -const Challenge = ({ challenge, selected, setSelected }: { challenge: string; selected: string; setSelected: (challenge: string) => void }) => { +const ChallengeSettings = ({ challenge }: any) => { + const { name } = challenge || {}; + + return ( + <> + {name === 'text-math' && ( + <> +
Ask a plain text math question, insecure, use ONLY for testing.
+
+ Difficulty +
The math difficulty of the challenge between 1-3.
+ +
+ + )} + {name === 'captcha-canvas-v3' && ( + <> +
custom image captcha
+
+ Characters +
Amount of characters of the captcha.
+ +
+
+ Width +
Height of the captcha.
+ +
+
+ Height +
Width of the captcha.
+ +
+
+ Color +
Color of the captcha.
+ +
+ + )} + {name === 'fail' && ( + <> +
A challenge that automatically fails with a custom error message.
+
+ Error +
The error to display to the author.
+ +
+ + )} + {name === 'blacklist' && ( + <> +
Blacklist author addresses.
+
+ Blacklist +
Comma separated list of author addresses to be blacklisted.
+ +
+
+ Error +
The error to display to the author.
+ +
+ + )} + {name === 'question' && ( + <> +
Ask a question, like 'What is the password?'
+
+ Question +
The question to answer.
+ +
+
+ Answer +
The answer to the question.
+ +
+ + )} + {name === 'evm-contract-call' && ( + <> +
The response from an EVM contract call passes a condition, e.g. a token balance challenge.
+
+ chainTicker +
The chain ticker
+ +
+
+ Address +
The contract address.
+ +
+
+ ABI +
The ABI of the contract method.
+