Editor Basics (#43)

Add basic editor
This commit is contained in:
Philip Molares 2020-05-29 15:44:45 +02:00 committed by GitHub
parent 557386f78f
commit e2155e735d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 834 additions and 467 deletions

View file

@ -35,22 +35,22 @@
"Yes, do it!": "نعم ، قم بذلك!", "Yes, do it!": "نعم ، قم بذلك!",
"chooseMethod": "اختر الطريقة", "chooseMethod": "اختر الطريقة",
"signInVia": "لِج عبر {{service}}", "signInVia": "لِج عبر {{service}}",
"New": "جديد", "new": "جديد",
"Publish": "انشر", "publish": "انشر",
"Extra": "إضافي", "extra": "إضافي",
"Revision": "مراجعة", "revision": "مراجعة",
"Slide Mode": "نمط الشرائح التقديمية", "slideMode": "نمط الشرائح التقديمية",
"Export": "تصدير", "export": "تصدير",
"Import": "استيراد", "import": "استيراد",
"Clipboard": "الحافظة", "clipboard": "الحافظة",
"Download": "تنزيل", "download": "تنزيل",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "عدّل", "edit": "عدّل",
"View": "عرض", "View": "عرض",
"Both": "معا", "Both": "معا",
"Help": "المساعدة", "help": "المساعدة",
"Upload Image": "تحميل صورة", "Upload Image": "تحميل صورة",
"Menu": "القائمة", "menu": "القائمة",
"This page need refresh": "هذه الصفحة بحاجة إلى تحديث", "This page need refresh": "هذه الصفحة بحاجة إلى تحديث",
"You have an incompatible client version.": "نسخة عميلك غير متوافقة.", "You have an incompatible client version.": "نسخة عميلك غير متوافقة.",
"Refresh to update.": "حدث الصفحة للحصول على التحديث", "Refresh to update.": "حدث الصفحة للحصول على التحديث",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Si, fes-ho!", "Yes, do it!": "Si, fes-ho!",
"chooseMethod": "Triar mètode", "chooseMethod": "Triar mètode",
"signInVia": "Entrar a través de {{service}}", "signInVia": "Entrar a través de {{service}}",
"New": "Nou", "new": "Nou",
"Publish": "Publicar", "publish": "Publicar",
"Extra": "Extra", "extra": "Extra",
"Revision": "Revisió", "revision": "Revisió",
"Slide Mode": "Mode presentació", "slideMode": "Mode presentació",
"Export": "Exportar", "export": "Exportar",
"Import": "Importar", "import": "Importar",
"Clipboard": "Portapapers", "clipboard": "Portapapers",
"Download": "Descarregar", "download": "Descarregar",
"Raw HTML": "HTML pur", "Raw HTML": "HTML pur",
"Edit": "Editar", "edit": "Editar",
"View": "Veure", "View": "Veure",
"Both": "Ambdós", "Both": "Ambdós",
"Help": "Ajuda", "help": "Ajuda",
"Upload Image": "Pujar imatge", "Upload Image": "Pujar imatge",
"Menu": "Menú", "menu": "Menú",
"This page need refresh": "Aquesta pàgina necessita ser refrescada", "This page need refresh": "Aquesta pàgina necessita ser refrescada",
"You have an incompatible client version.": "Tens una versió del client incompatible.", "You have an incompatible client version.": "Tens una versió del client incompatible.",
"Refresh to update.": "Refrescar per actualitzar", "Refresh to update.": "Refrescar per actualitzar",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Ano, provést!", "Yes, do it!": "Ano, provést!",
"chooseMethod": "Zvolit metodu", "chooseMethod": "Zvolit metodu",
"signInVia": "Přihlásit se přes {{service}}", "signInVia": "Přihlásit se přes {{service}}",
"New": "Nová", "new": "Nová",
"Publish": "Publikovat", "publish": "Publikovat",
"Extra": "Extra", "extra": "Extra",
"Revision": "Revize", "revision": "Revize",
"Slide Mode": "Režim prezentace", "slideMode": "Režim prezentace",
"Export": "Export", "export": "Export",
"Import": "Import", "import": "Import",
"Clipboard": "Schránka", "clipboard": "Schránka",
"Download": "Stáhnout", "download": "Stáhnout",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Editovat", "edit": "Editovat",
"View": "Zobrazit", "View": "Zobrazit",
"Both": "Obojí", "Both": "Obojí",
"Help": "Nápověda", "help": "Nápověda",
"Upload Image": "Nahrát obrázek", "Upload Image": "Nahrát obrázek",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Tuto stránku je nutné znovu načíst", "This page need refresh": "Tuto stránku je nutné znovu načíst",
"You have an incompatible client version.": "Verze vašeho klienta není kompatibilní.", "You have an incompatible client version.": "Verze vašeho klienta není kompatibilní.",
"Refresh to update.": "Znovu načíst a aktualizovat.", "Refresh to update.": "Znovu načíst a aktualizovat.",

View file

@ -33,22 +33,22 @@
"Yes, do it!": "Ja, gør det!", "Yes, do it!": "Ja, gør det!",
"chooseMethod": "Vælg metode", "chooseMethod": "Vælg metode",
"signInVia": "Log ind med {{service}}", "signInVia": "Log ind med {{service}}",
"New": "Ny", "new": "Ny",
"Publish": "Publicér", "publish": "Publicér",
"Extra": "Ekstra", "extra": "Ekstra",
"Revision": "Revision", "revision": "Revision",
"Slide Mode": "Præsentationstilstand", "slideMode": "Præsentationstilstand",
"Export": "Eksportér", "export": "Eksportér",
"Import": "Importér", "import": "Importér",
"Clipboard": "Udklipsholder", "clipboard": "Udklipsholder",
"Download": "Download", "download": "Download",
"Raw HTML": "Rå HTML", "Raw HTML": "Rå HTML",
"Edit": "Redigér", "edit": "Redigér",
"View": "Vis", "View": "Vis",
"Both": "Begge", "Both": "Begge",
"Help": "Hjælp", "help": "Hjælp",
"Upload Image": "Upload billede", "Upload Image": "Upload billede",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Denne side skal genindlæses", "This page need refresh": "Denne side skal genindlæses",
"You have an incompatible client version.": "Din klientversion er inkompatibel.", "You have an incompatible client version.": "Din klientversion er inkompatibel.",
"Refresh to update.": "Genindlæs for at opdatere.", "Refresh to update.": "Genindlæs for at opdatere.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Ja, mach es!", "Yes, do it!": "Ja, mach es!",
"chooseMethod": "Methode wählen", "chooseMethod": "Methode wählen",
"signInVia": "Einloggen über {{service}}", "signInVia": "Einloggen über {{service}}",
"New": "Neu", "new": "Neu",
"Publish": "Veröffentlichen", "publish": "Veröffentlichen",
"Extra": "Extra", "extra": "Extra",
"Revision": "Version", "revision": "Version",
"Slide Mode": "Präsentationsmodus", "slideMode": "Präsentationsmodus",
"Export": "Exportieren", "export": "Exportieren",
"Import": "Importieren", "import": "Importieren",
"Clipboard": "Zwischenablage", "clipboard": "Zwischenablage",
"Download": "Download", "download": "Download",
"Raw HTML": "Reines HTML", "Raw HTML": "Reines HTML",
"Edit": "Bearbeiten", "edit": "Bearbeiten",
"View": "Anzeigen", "View": "Anzeigen",
"Both": "Beides", "Both": "Beides",
"Help": "Hilfe", "help": "Hilfe",
"Upload Image": "Foto hochladen", "Upload Image": "Foto hochladen",
"Menu": "Menü", "menu": "Menü",
"This page need refresh": "Bitte laden Sie die Seite neu", "This page need refresh": "Bitte laden Sie die Seite neu",
"You have an incompatible client version.": "Ihre Client-Version ist nicht mit dem Server kompatibel", "You have an incompatible client version.": "Ihre Client-Version ist nicht mit dem Server kompatibel",
"Refresh to update.": "Neu laden zum aktualisieren.", "Refresh to update.": "Neu laden zum aktualisieren.",

View file

@ -33,22 +33,22 @@
"Yes, do it!": "Ναι, κάντο!", "Yes, do it!": "Ναι, κάντο!",
"chooseMethod": "Επιλογή μεθόδου", "chooseMethod": "Επιλογή μεθόδου",
"signInVia": "Σύνδεση μέσω {{service}}", "signInVia": "Σύνδεση μέσω {{service}}",
"New": "Νέο", "new": "Νέο",
"Publish": "Δημοσίευση", "publish": "Δημοσίευση",
"Extra": "Επιπλέον", "extra": "Επιπλέον",
"Revision": "Αναθεώρηση", "revision": "Αναθεώρηση",
"Slide Mode": "Λειτουργία με σύρσιμο", "slideMode": "Λειτουργία με σύρσιμο",
"Export": "Εξαγωγή", "export": "Εξαγωγή",
"Import": "Εισαγωγή", "import": "Εισαγωγή",
"Clipboard": "Πρόχειρο", "clipboard": "Πρόχειρο",
"Download": "Κατέβασμα", "download": "Κατέβασμα",
"Raw HTML": "Aκατέργαστο HTML", "Raw HTML": "Aκατέργαστο HTML",
"Edit": "Επεξεργασία", "edit": "Επεξεργασία",
"View": "Δες", "View": "Δες",
"Both": "Και τα δύο", "Both": "Και τα δύο",
"Help": "Βοήθεια", "help": "Βοήθεια",
"Upload Image": "Ανέβασμα φωτογραφίας", "Upload Image": "Ανέβασμα φωτογραφίας",
"Menu": "Μενού", "menu": "Μενού",
"This page need refresh": "Η σελίδα χρειάζεται ανανέωση", "This page need refresh": "Η σελίδα χρειάζεται ανανέωση",
"You have an incompatible client version.": "Έχετε μια μη συμβατή έκδοση.", "You have an incompatible client version.": "Έχετε μια μη συμβατή έκδοση.",
"Refresh to update.": "Ανανεώστε για ενημέρωση", "Refresh to update.": "Ανανεώστε για ενημέρωση",

View file

@ -37,22 +37,22 @@
"Yes, do it!": "Yes, do it!", "Yes, do it!": "Yes, do it!",
"chooseMethod": "Choose method", "chooseMethod": "Choose method",
"signInVia": "Sign in via {{service}}", "signInVia": "Sign in via {{service}}",
"New": "New", "new": "New",
"Publish": "Publish", "publish": "Publish",
"Extra": "Extra", "extra": "Extra",
"Revision": "Revision", "revision": "Revision",
"Slide Mode": "Slide Mode", "slideMode": "Slide Mode",
"Export": "Export", "export": "Export",
"Import": "Import", "import": "Import",
"Clipboard": "Clipboard", "clipboard": "Clipboard",
"Download": "Download", "download": "Download",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Edit", "edit": "Edit",
"View": "View", "View": "View",
"Both": "Both", "Both": "Both",
"Help": "Help", "help": "Help",
"Upload Image": "Upload Image", "Upload Image": "Upload Image",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "This page needs to be refreshed", "This page need refresh": "This page needs to be refreshed",
"You have an incompatible client version.": "Your client's version is incompatible.", "You have an incompatible client version.": "Your client's version is incompatible.",
"Refresh to update.": "Refresh to update.", "Refresh to update.": "Refresh to update.",

View file

@ -33,22 +33,22 @@
"Yes, do it!": "Jes, faru ĝin!", "Yes, do it!": "Jes, faru ĝin!",
"chooseMethod": "Elektu metodon", "chooseMethod": "Elektu metodon",
"signInVia": "Ensalutu per {{service}}", "signInVia": "Ensalutu per {{service}}",
"New": "Nova", "new": "Nova",
"Publish": "Dissendu", "publish": "Dissendu",
"Extra": "Plia", "extra": "Plia",
"Revision": "Versio", "revision": "Versio",
"Slide Mode": "Bildvica modo", "slideMode": "Bildvica modo",
"Export": "Elportu", "export": "Elportu",
"Import": "Alportu", "import": "Alportu",
"Clipboard": "Poŝo", "clipboard": "Poŝo",
"Download": "Elŝuti", "download": "Elŝuti",
"Raw HTML": "Kruda HTML", "Raw HTML": "Kruda HTML",
"Edit": "Redaktu", "edit": "Redaktu",
"View": "Vidu", "View": "Vidu",
"Both": "Ambaŭ", "Both": "Ambaŭ",
"Help": "Helpo", "help": "Helpo",
"Upload Image": "Alŝutu bildon", "Upload Image": "Alŝutu bildon",
"Menu": "Menuo", "menu": "Menuo",
"This page need refresh": "Ĉi tiu paĝo bezonas refreŝiĝi", "This page need refresh": "Ĉi tiu paĝo bezonas refreŝiĝi",
"You have an incompatible client version.": "Vi havas malkongruan klientversion.", "You have an incompatible client version.": "Vi havas malkongruan klientversion.",
"Refresh to update.": "Refreŝigu por ĝisdatigi", "Refresh to update.": "Refreŝigu por ĝisdatigi",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Si, ¡hazlo!", "Yes, do it!": "Si, ¡hazlo!",
"chooseMethod": "Elegir método", "chooseMethod": "Elegir método",
"signInVia": "Ingresar via {{service}}", "signInVia": "Ingresar via {{service}}",
"New": "Nuevo", "new": "Nuevo",
"Publish": "Publicar", "publish": "Publicar",
"Extra": "Extra", "extra": "Extra",
"Revision": "Revision", "revision": "Revision",
"Slide Mode": "Modo presentación", "slideMode": "Modo presentación",
"Export": "Exportar", "export": "Exportar",
"Import": "Importar", "import": "Importar",
"Clipboard": "Portapapeles", "clipboard": "Portapapeles",
"Download": "Descargar", "download": "Descargar",
"Raw HTML": "HTML puro", "Raw HTML": "HTML puro",
"Edit": "Editar", "edit": "Editar",
"View": "Ver", "View": "Ver",
"Both": "Ambos", "Both": "Ambos",
"Help": "Ayuda", "help": "Ayuda",
"Upload Image": "Subir imagen", "Upload Image": "Subir imagen",
"Menu": "Menú", "menu": "Menú",
"This page need refresh": "Esta página necesita ser cargada de nuevo", "This page need refresh": "Esta página necesita ser cargada de nuevo",
"You have an incompatible client version.": "Tienes una version del cliente incompatible.", "You have an incompatible client version.": "Tienes una version del cliente incompatible.",
"Refresh to update.": "Cargar de nuevo para actualizar.", "Refresh to update.": "Cargar de nuevo para actualizar.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Oui, je suis sûr !", "Yes, do it!": "Oui, je suis sûr !",
"chooseMethod": "Choisir la méthode", "chooseMethod": "Choisir la méthode",
"signInVia": "Se connecter depuis {{service}}", "signInVia": "Se connecter depuis {{service}}",
"New": "Nouvelle", "new": "Nouvelle",
"Publish": "Publier", "publish": "Publier",
"Extra": "Extra", "extra": "Extra",
"Revision": "Historique", "revision": "Historique",
"Slide Mode": "Mode présentation", "slideMode": "Mode présentation",
"Export": "Exporter", "export": "Exporter",
"Import": "Importer", "import": "Importer",
"Clipboard": "Presse-papier", "clipboard": "Presse-papier",
"Download": "Télécharger", "download": "Télécharger",
"Raw HTML": "HTML brut", "Raw HTML": "HTML brut",
"Edit": "Modifier", "edit": "Modifier",
"View": "Voir", "View": "Voir",
"Both": "Les deux", "Both": "Les deux",
"Help": "Aide", "help": "Aide",
"Upload Image": "Téléverser une image", "Upload Image": "Téléverser une image",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Cette page doit être rechargée", "This page need refresh": "Cette page doit être rechargée",
"You have an incompatible client version.": "Vous avez une version client incompatible.", "You have an incompatible client version.": "Vous avez une version client incompatible.",
"Refresh to update.": "Recharger pour mettre à jour.", "Refresh to update.": "Recharger pour mettre à jour.",

View file

@ -33,22 +33,22 @@
"Yes, do it!": "हाँ करो इसे!", "Yes, do it!": "हाँ करो इसे!",
"chooseMethod": "विधि चुनें", "chooseMethod": "विधि चुनें",
"signInVia": "{{service}} के माध्यम से साइन इन करें", "signInVia": "{{service}} के माध्यम से साइन इन करें",
"New": "नया", "new": "नया",
"Publish": "प्रकाशित करें", "publish": "प्रकाशित करें",
"Extra": "अतिरिक्त", "extra": "अतिरिक्त",
"Revision": "संशोधन", "revision": "संशोधन",
"Slide Mode": "स्लाइड मोड", "slideMode": "स्लाइड मोड",
"Export": "निर्यात", "export": "निर्यात",
"Import": "आयात", "import": "आयात",
"Clipboard": "क्लिपबोर्ड", "clipboard": "क्लिपबोर्ड",
"Download": "डाउनलोड", "download": "डाउनलोड",
"Raw HTML": "सिर्फ एच टी एम एल", "Raw HTML": "सिर्फ एच टी एम एल",
"Edit": "संपादित करें", "edit": "संपादित करें",
"View": "देखें", "View": "देखें",
"Both": "दोनों", "Both": "दोनों",
"Help": "मदद", "help": "मदद",
"Upload Image": "तस्वीर डालिये", "Upload Image": "तस्वीर डालिये",
"Menu": "मेन्यू", "menu": "मेन्यू",
"This page need refresh": "इस पेज को ताजा करने की जरूरत है", "This page need refresh": "इस पेज को ताजा करने की जरूरत है",
"You have an incompatible client version.": "आप एक असंगत ग्राहक संस्करण है।", "You have an incompatible client version.": "आप एक असंगत ग्राहक संस्करण है।",
"Refresh to update.": "अद्यतन करने के लिए ताज़ा करें।", "Refresh to update.": "अद्यतन करने के लिए ताज़ा करें।",

View file

@ -33,22 +33,22 @@
"Yes, do it!": "Da, učini to!", "Yes, do it!": "Da, učini to!",
"chooseMethod": "Izaberi metodu", "chooseMethod": "Izaberi metodu",
"signInVia": "Prijavi se pomoću {{service}}", "signInVia": "Prijavi se pomoću {{service}}",
"New": "Novo", "new": "Novo",
"Publish": "Objavi", "publish": "Objavi",
"Extra": "Dodatno", "extra": "Dodatno",
"Revision": "Revizija", "revision": "Revizija",
"Slide Mode": "Način slajda", "slideMode": "Način slajda",
"Export": "Izvoz", "export": "Izvoz",
"Import": "Uvoz", "import": "Uvoz",
"Clipboard": "Međuspremnik", "clipboard": "Međuspremnik",
"Download": "Preuzimanje", "download": "Preuzimanje",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Uredi", "edit": "Uredi",
"View": "Pregledaj", "View": "Pregledaj",
"Both": "Oboje", "Both": "Oboje",
"Help": "Pomoć", "help": "Pomoć",
"Upload Image": "Prenesi sliku", "Upload Image": "Prenesi sliku",
"Menu": "Meni", "menu": "Meni",
"This page need refresh": "Ovu stranicu je potrebno osvježiti", "This page need refresh": "Ovu stranicu je potrebno osvježiti",
"You have an incompatible client version.": "Imate nekompatibilnu verziju klijenta.", "You have an incompatible client version.": "Imate nekompatibilnu verziju klijenta.",
"Refresh to update.": "Osvježite za ažuriranje.", "Refresh to update.": "Osvježite za ažuriranje.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Ya, lakukan!", "Yes, do it!": "Ya, lakukan!",
"chooseMethod": "Pilih cara", "chooseMethod": "Pilih cara",
"signInVia": "Masuk menggunakan {{service}}", "signInVia": "Masuk menggunakan {{service}}",
"New": "Baru", "new": "Baru",
"Publish": "Terbitkan", "publish": "Terbitkan",
"Extra": "Tambahan", "extra": "Tambahan",
"Revision": "Revisi", "revision": "Revisi",
"Slide Mode": "Mode Slide", "slideMode": "Mode Slide",
"Export": "Ekspor", "export": "Ekspor",
"Import": "Impor", "import": "Impor",
"Clipboard": "Papan Klip", "clipboard": "Papan Klip",
"Download": "Unduh", "download": "Unduh",
"Raw HTML": "File HTML", "Raw HTML": "File HTML",
"Edit": "Ubah", "edit": "Ubah",
"View": "Lihat", "View": "Lihat",
"Both": "Keduanya", "Both": "Keduanya",
"Help": "Bantuan", "help": "Bantuan",
"Upload Image": "Unggah Gambar", "Upload Image": "Unggah Gambar",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Halaman ini perlu dimuat ulang", "This page need refresh": "Halaman ini perlu dimuat ulang",
"You have an incompatible client version.": "Versi pramban anda tidak kompatibel", "You have an incompatible client version.": "Versi pramban anda tidak kompatibel",
"Refresh to update.": "Muat ulang untuk memperbarui", "Refresh to update.": "Muat ulang untuk memperbarui",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "SI, fallo!", "Yes, do it!": "SI, fallo!",
"chooseMethod": "Scegli metodo", "chooseMethod": "Scegli metodo",
"signInVia": "Entra con {{service}}", "signInVia": "Entra con {{service}}",
"New": "Nuovo", "new": "Nuovo",
"Publish": "Pubblica", "publish": "Pubblica",
"Extra": "Extra", "extra": "Extra",
"Revision": "Revisione", "revision": "Revisione",
"Slide Mode": "Modalità slide", "slideMode": "Modalità slide",
"Export": "Esporta", "export": "Esporta",
"Import": "Importa", "import": "Importa",
"Clipboard": "Appunti", "clipboard": "Appunti",
"Download": "Scarica", "download": "Scarica",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Modifica", "edit": "Modifica",
"View": "Visualizza", "View": "Visualizza",
"Both": "Entrambi", "Both": "Entrambi",
"Help": "Aiuto", "help": "Aiuto",
"Upload Image": "Carica Immagine", "Upload Image": "Carica Immagine",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Questa pagina deve essere aggiornata", "This page need refresh": "Questa pagina deve essere aggiornata",
"You have an incompatible client version.": "La versione del tuo client è incompatibile.", "You have an incompatible client version.": "La versione del tuo client è incompatibile.",
"Refresh to update.": "Ricarica per aggiornare.", "Refresh to update.": "Ricarica per aggiornare.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "はい", "Yes, do it!": "はい",
"chooseMethod": "選択してください", "chooseMethod": "選択してください",
"signInVia": "{{service}}でサインイン", "signInVia": "{{service}}でサインイン",
"New": "新規作成", "new": "新規作成",
"Publish": "公開する", "publish": "公開する",
"Extra": "その他", "extra": "その他",
"Revision": "編集履歴", "revision": "編集履歴",
"Slide Mode": "スライドモード", "slideMode": "スライドモード",
"Export": "エクスポート", "export": "エクスポート",
"Import": "インポート", "import": "インポート",
"Clipboard": "クリップボード", "clipboard": "クリップボード",
"Download": "ダウンロード", "download": "ダウンロード",
"Raw HTML": "HTMLパーツ", "Raw HTML": "HTMLパーツ",
"Edit": "編集モード", "edit": "編集モード",
"View": "表示モード", "View": "表示モード",
"Both": "分割モード", "Both": "分割モード",
"Help": "ヘルプ", "help": "ヘルプ",
"Upload Image": "画像をアップロード", "Upload Image": "画像をアップロード",
"Menu": "メニュー", "menu": "メニュー",
"This page need refresh": "ページをリロードしてください", "This page need refresh": "ページをリロードしてください",
"You have an incompatible client version.": "クライアントのバージョンが一致しません", "You have an incompatible client version.": "クライアントのバージョンが一致しません",
"Refresh to update.": "リロードして更新を反映させてください", "Refresh to update.": "リロードして更新を反映させてください",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "네", "Yes, do it!": "네",
"chooseMethod": "방법 선택", "chooseMethod": "방법 선택",
"signInVia": "{{service}}으로 로그인", "signInVia": "{{service}}으로 로그인",
"New": "새", "new": "새",
"Publish": "공개하기", "publish": "공개하기",
"Extra": "추가", "extra": "추가",
"Revision": "기록", "revision": "기록",
"Slide Mode": "슬라이드 모드", "slideMode": "슬라이드 모드",
"Export": "내보내기", "export": "내보내기",
"Import": "들여오기", "import": "들여오기",
"Clipboard": "클립보드", "clipboard": "클립보드",
"Download": "다운로드", "download": "다운로드",
"Raw HTML": "순수 HTML", "Raw HTML": "순수 HTML",
"Edit": "수정", "edit": "수정",
"View": "보기", "View": "보기",
"Both": "한번에", "Both": "한번에",
"Help": "도움말", "help": "도움말",
"Upload Image": "이미지 업로드", "Upload Image": "이미지 업로드",
"Menu": "메뉴", "menu": "메뉴",
"This page need refresh": "새로고침이 필요합니다", "This page need refresh": "새로고침이 필요합니다",
"You have an incompatible client version.": "호환되지 않는 클라이언트입니다.", "You have an incompatible client version.": "호환되지 않는 클라이언트입니다.",
"Refresh to update.": "새로고침하기", "Refresh to update.": "새로고침하기",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Ja, doe het!", "Yes, do it!": "Ja, doe het!",
"chooseMethod": "Kies methode", "chooseMethod": "Kies methode",
"signInVia": "Log in via {{service}}", "signInVia": "Log in via {{service}}",
"New": "Nieuw", "new": "Nieuw",
"Publish": "Publiceren", "publish": "Publiceren",
"Extra": "Extra", "extra": "Extra",
"Revision": "Versie", "revision": "Versie",
"Slide Mode": "Presentatiemodus", "slideMode": "Presentatiemodus",
"Export": "Exporteer", "export": "Exporteer",
"Import": "Importeren", "import": "Importeren",
"Clipboard": "Kladbord", "clipboard": "Kladbord",
"Download": "Downloaden", "download": "Downloaden",
"Raw HTML": "Ruwe HTML", "Raw HTML": "Ruwe HTML",
"Edit": "Aanpassen", "edit": "Aanpassen",
"View": "Bekijken", "View": "Bekijken",
"Both": "Beide", "Both": "Beide",
"Help": "Help", "help": "Help",
"Upload Image": "Afbeelding uploaden", "Upload Image": "Afbeelding uploaden",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Deze pagina moet vernieuwd worden", "This page need refresh": "Deze pagina moet vernieuwd worden",
"You have an incompatible client version.": "Je client is niet compatibel.", "You have an incompatible client version.": "Je client is niet compatibel.",
"Refresh to update.": "Ververs om te updaten.", "Refresh to update.": "Ververs om te updaten.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Tak, zrób to!", "Yes, do it!": "Tak, zrób to!",
"chooseMethod": "Wybierz metodę", "chooseMethod": "Wybierz metodę",
"signInVia": "Zaloguj się poprzez {{service}}", "signInVia": "Zaloguj się poprzez {{service}}",
"New": "Nowy", "new": "Nowy",
"Publish": "Publikuj", "publish": "Publikuj",
"Extra": "Ekstra", "extra": "Ekstra",
"Revision": "Korekta", "revision": "Korekta",
"Slide Mode": "Tryb slajdów", "slideMode": "Tryb slajdów",
"Export": "Eksport", "export": "Eksport",
"Import": "Import", "import": "Import",
"Clipboard": "Schowek", "clipboard": "Schowek",
"Download": "Pobierz", "download": "Pobierz",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Edytuj", "edit": "Edytuj",
"View": "Pogląd", "View": "Pogląd",
"Both": "Both", "Both": "Both",
"Help": "Pomoc", "help": "Pomoc",
"Upload Image": "Prześlij zdjęcie", "Upload Image": "Prześlij zdjęcie",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Strona wymaga odświeżenia", "This page need refresh": "Strona wymaga odświeżenia",
"You have an incompatible client version.": "Posiadasz niezgodną wersję kliencką.", "You have an incompatible client version.": "Posiadasz niezgodną wersję kliencką.",
"Refresh to update.": "Odświerz aby zaktualizować.", "Refresh to update.": "Odświerz aby zaktualizować.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Sim, faça!", "Yes, do it!": "Sim, faça!",
"chooseMethod": "Escolher método", "chooseMethod": "Escolher método",
"signInVia": "Entrar via {{service}}", "signInVia": "Entrar via {{service}}",
"New": "Novo", "new": "Novo",
"Publish": "Publicar", "publish": "Publicar",
"Extra": "Extra", "extra": "Extra",
"Revision": "Revisão", "revision": "Revisão",
"Slide Mode": "Modo Apresentação", "slideMode": "Modo Apresentação",
"Export": "Exportar", "export": "Exportar",
"Import": "Importar", "import": "Importar",
"Clipboard": "Área de transferência", "clipboard": "Área de transferência",
"Download": "Baixar", "download": "Baixar",
"Raw HTML": "HTML puro", "Raw HTML": "HTML puro",
"Edit": "Editar", "edit": "Editar",
"View": "Ver", "View": "Ver",
"Both": "Ambos", "Both": "Ambos",
"Help": "Ajuda", "help": "Ajuda",
"Upload Image": "Carregar Imagem", "Upload Image": "Carregar Imagem",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Esta página precisa ser recarregada", "This page need refresh": "Esta página precisa ser recarregada",
"You have an incompatible client version.": "Você tem uma versão incompatível do cliente.", "You have an incompatible client version.": "Você tem uma versão incompatível do cliente.",
"Refresh to update.": "Recarregar para atualizar.", "Refresh to update.": "Recarregar para atualizar.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Да, сделать это!", "Yes, do it!": "Да, сделать это!",
"chooseMethod": "Выберите метод", "chooseMethod": "Выберите метод",
"signInVia": "Войти с помощью {{service}}", "signInVia": "Войти с помощью {{service}}",
"New": "Новая", "new": "Новая",
"Publish": "Опубликовать", "publish": "Опубликовать",
"Extra": "Дополнительно", "extra": "Дополнительно",
"Revision": "Изменения", "revision": "Изменения",
"Slide Mode": "Режим слайдера", "slideMode": "Режим слайдера",
"Export": "Экспорт", "export": "Экспорт",
"Import": "Импорт", "import": "Импорт",
"Clipboard": "Буфер обмена", "clipboard": "Буфер обмена",
"Download": "Скачать", "download": "Скачать",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Редактировать", "edit": "Редактировать",
"View": "Посмотреть", "View": "Посмотреть",
"Both": "И то и другое", "Both": "И то и другое",
"Help": "Помощь", "help": "Помощь",
"Upload Image": "Загрузить изображение", "Upload Image": "Загрузить изображение",
"Menu": "Меню", "menu": "Меню",
"This page need refresh": "Эту страницу необходимо обновить", "This page need refresh": "Эту страницу необходимо обновить",
"You have an incompatible client version.": "Вы используете несовместимую версию клиента.", "You have an incompatible client version.": "Вы используете несовместимую версию клиента.",
"Refresh to update.": "Обновите страницу для обновления клиента.", "Refresh to update.": "Обновите страницу для обновления клиента.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Áno, pokračovať!", "Yes, do it!": "Áno, pokračovať!",
"chooseMethod": "Zvoliť spôsob", "chooseMethod": "Zvoliť spôsob",
"signInVia": "Prihlásiť sa cez {{service}}", "signInVia": "Prihlásiť sa cez {{service}}",
"New": "Nová", "new": "Nová",
"Publish": "Publikovať", "publish": "Publikovať",
"Extra": "Extra", "extra": "Extra",
"Revision": "Revízia", "revision": "Revízia",
"Slide Mode": "Prezentačný režim", "slideMode": "Prezentačný režim",
"Export": "Export", "export": "Export",
"Import": "Import", "import": "Import",
"Clipboard": "Schránka", "clipboard": "Schránka",
"Download": "Stiahnuť", "download": "Stiahnuť",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Editovať", "edit": "Editovať",
"View": "Zobraziť", "View": "Zobraziť",
"Both": "Oboje", "Both": "Oboje",
"Help": "Pomoc", "help": "Pomoc",
"Upload Image": "Nahrať obrázok", "Upload Image": "Nahrať obrázok",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Túto stránku je potrebné znovu načítať", "This page need refresh": "Túto stránku je potrebné znovu načítať",
"You have an incompatible client version.": "Verzia vášho klienta nie je kompatibilná.", "You have an incompatible client version.": "Verzia vášho klienta nie je kompatibilná.",
"Refresh to update.": "Znovu načítať a aktualizovať", "Refresh to update.": "Znovu načítať a aktualizovať",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Да, уради!", "Yes, do it!": "Да, уради!",
"chooseMethod": "Изаберите начин", "chooseMethod": "Изаберите начин",
"signInVia": "Пријави се уз {{service}}", "signInVia": "Пријави се уз {{service}}",
"New": "Ново", "new": "Ново",
"Publish": "Објави", "publish": "Објави",
"Extra": "Додатно", "extra": "Додатно",
"Revision": "Ревизија", "revision": "Ревизија",
"Slide Mode": "Презентациони мод", "slideMode": "Презентациони мод",
"Export": "Извоз", "export": "Извоз",
"Import": "Увоз", "import": "Увоз",
"Clipboard": "Клипборд", "clipboard": "Клипборд",
"Download": "Преузимање", "download": "Преузимање",
"Raw HTML": "Сирови HTML", "Raw HTML": "Сирови HTML",
"Edit": "Измени", "edit": "Измени",
"View": "Прегледај", "View": "Прегледај",
"Both": "Обоје", "Both": "Обоје",
"Help": "Помоћ", "help": "Помоћ",
"Upload Image": "Пошаљи слику", "Upload Image": "Пошаљи слику",
"Menu": "Мени", "menu": "Мени",
"This page need refresh": "Ову страну је неопходно освежити", "This page need refresh": "Ову страну је неопходно освежити",
"You have an incompatible client version.": "Ова верзија клијента није компатибилна.", "You have an incompatible client version.": "Ова верзија клијента није компатибилна.",
"Refresh to update.": "Освежите за приказ измена.", "Refresh to update.": "Освежите за приказ измена.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Ja, gör det!", "Yes, do it!": "Ja, gör det!",
"chooseMethod": "Välj metod", "chooseMethod": "Välj metod",
"signInVia": "Logga in via {{service}}", "signInVia": "Logga in via {{service}}",
"New": "Ny", "new": "Ny",
"Publish": "Publicera", "publish": "Publicera",
"Extra": "Extra", "extra": "Extra",
"Revision": "Revision", "revision": "Revision",
"Slide Mode": "Slide Mode", "slideMode": "Slide Mode",
"Export": "Exportera", "export": "Exportera",
"Import": "Importera", "import": "Importera",
"Clipboard": "Urklipp", "clipboard": "Urklipp",
"Download": "Ladda ner", "download": "Ladda ner",
"Raw HTML": "Rå HTML", "Raw HTML": "Rå HTML",
"Edit": "Redigera", "edit": "Redigera",
"View": "Visa", "View": "Visa",
"Both": "Båda", "Both": "Båda",
"Help": "Hjälp", "help": "Hjälp",
"Upload Image": "Ladda upp bilder", "Upload Image": "Ladda upp bilder",
"Menu": "Meny", "menu": "Meny",
"This page need refresh": "Den här sidan behöver laddas om", "This page need refresh": "Den här sidan behöver laddas om",
"You have an incompatible client version.": "Du har en inkompatibel klientversion.", "You have an incompatible client version.": "Du har en inkompatibel klientversion.",
"Refresh to update.": "Ladda om för att uppdatera.", "Refresh to update.": "Ladda om för att uppdatera.",

View file

@ -33,22 +33,22 @@
"Yes, do it!": "Evet, devam et!", "Yes, do it!": "Evet, devam et!",
"chooseMethod": "Metot seçin", "chooseMethod": "Metot seçin",
"signInVia": "{{service}} ile giriş yapın", "signInVia": "{{service}} ile giriş yapın",
"New": "Yeni", "new": "Yeni",
"Publish": "Yayınla", "publish": "Yayınla",
"Extra": "Ekstra", "extra": "Ekstra",
"Revision": "Sürüm", "revision": "Sürüm",
"Slide Mode": "Slayt Modu", "slideMode": "Slayt Modu",
"Export": "Dışa Aktar", "export": "Dışa Aktar",
"Import": "İçe Aktar", "import": "İçe Aktar",
"Clipboard": "Pano", "clipboard": "Pano",
"Download": "İndir", "download": "İndir",
"Raw HTML": "Kaynak HTML", "Raw HTML": "Kaynak HTML",
"Edit": "Düzenle", "edit": "Düzenle",
"View": "İncele", "View": "İncele",
"Both": "İkisi de", "Both": "İkisi de",
"Help": "Yardım", "help": "Yardım",
"Upload Image": "Resim Yükle", "Upload Image": "Resim Yükle",
"Menu": "Menü", "menu": "Menü",
"This page need refresh": "Bu sayfayı yeniden yüklemek lazım", "This page need refresh": "Bu sayfayı yeniden yüklemek lazım",
"You have an incompatible client version.": "Yerel uygulamanız uyumlu olmayan bir sürümde.", "You have an incompatible client version.": "Yerel uygulamanız uyumlu olmayan bir sürümde.",
"Refresh to update.": "Güncellemek için yenileyin.", "Refresh to update.": "Güncellemek için yenileyin.",

View file

@ -33,22 +33,22 @@
"Yes, do it!": "Так, зробити це!", "Yes, do it!": "Так, зробити це!",
"chooseMethod": "Вибрати метод", "chooseMethod": "Вибрати метод",
"signInVia": "Увійти за допомогою {{service}}", "signInVia": "Увійти за допомогою {{service}}",
"New": "Нова", "new": "Нова",
"Publish": "Опублікувати", "publish": "Опублікувати",
"Extra": "Дотатково", "extra": "Дотатково",
"Revision": "Ревізія", "revision": "Ревізія",
"Slide Mode": "Режим слайдера", "slideMode": "Режим слайдера",
"Export": "Експорт", "export": "Експорт",
"Import": "Імпорт", "import": "Імпорт",
"Clipboard": "Буфер обміну", "clipboard": "Буфер обміну",
"Download": "Завантажити", "download": "Завантажити",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Редагувати", "edit": "Редагувати",
"View": "Вигляд", "View": "Вигляд",
"Both": "Обоє", "Both": "Обоє",
"Help": "Допомога", "help": "Допомога",
"Upload Image": "Завантажити зображення", "Upload Image": "Завантажити зображення",
"Menu": "Меню", "menu": "Меню",
"This page need refresh": "Цю сторінку необхідно обновити", "This page need refresh": "Цю сторінку необхідно обновити",
"You have an incompatible client version.": "Ви використовуєте несумісну версію клієнта.", "You have an incompatible client version.": "Ви використовуєте несумісну версію клієнта.",
"Refresh to update.": "Оновіть сторінку для оновлення.", "Refresh to update.": "Оновіть сторінку для оновлення.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "Đồng ý", "Yes, do it!": "Đồng ý",
"chooseMethod": "Chọn phương thức", "chooseMethod": "Chọn phương thức",
"signInVia": "Đăng nhấp với {{service}}", "signInVia": "Đăng nhấp với {{service}}",
"New": "Mới", "new": "Mới",
"Publish": "Xuất bản", "publish": "Xuất bản",
"Extra": "Extra", "extra": "Extra",
"Revision": "Sửa đổi", "revision": "Sửa đổi",
"Slide Mode": "Chế độ slide", "slideMode": "Chế độ slide",
"Export": "Xuất", "export": "Xuất",
"Import": "Nhập", "import": "Nhập",
"Clipboard": "Clipboard", "clipboard": "Clipboard",
"Download": "Tải xuống", "download": "Tải xuống",
"Raw HTML": "Raw HTML", "Raw HTML": "Raw HTML",
"Edit": "Sửa", "edit": "Sửa",
"View": "Hiện", "View": "Hiện",
"Both": "Cả hai", "Both": "Cả hai",
"Help": "Trợ giúp", "help": "Trợ giúp",
"Upload Image": "Tải ảnh lên", "Upload Image": "Tải ảnh lên",
"Menu": "Menu", "menu": "Menu",
"This page need refresh": "Trang này cần được làm mới", "This page need refresh": "Trang này cần được làm mới",
"You have an incompatible client version.": "Phiên bản của client không tương thích.", "You have an incompatible client version.": "Phiên bản của client không tương thích.",
"Refresh to update.": "Làm mới để cập nhập.", "Refresh to update.": "Làm mới để cập nhập.",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "是的,就这样做!", "Yes, do it!": "是的,就这样做!",
"chooseMethod": "选择方式", "chooseMethod": "选择方式",
"signInVia": "通过 {{service}} 登录", "signInVia": "通过 {{service}} 登录",
"New": "新建", "new": "新建",
"Publish": "发表", "publish": "发表",
"Extra": "附加功能", "extra": "附加功能",
"Revision": "修订版本", "revision": "修订版本",
"Slide Mode": "幻灯模式", "slideMode": "幻灯模式",
"Export": "导出", "export": "导出",
"Import": "导入", "import": "导入",
"Clipboard": "剪贴板", "clipboard": "剪贴板",
"Download": "下载", "download": "下载",
"Raw HTML": "原始 HTML", "Raw HTML": "原始 HTML",
"Edit": "编辑", "edit": "编辑",
"View": "预览", "View": "预览",
"Both": "双栏", "Both": "双栏",
"Help": "帮助", "help": "帮助",
"Upload Image": "上传图片", "Upload Image": "上传图片",
"Menu": "菜单", "menu": "菜单",
"This page need refresh": "此页面需要刷新", "This page need refresh": "此页面需要刷新",
"You have an incompatible client version.": "您的客户端版本不兼容。", "You have an incompatible client version.": "您的客户端版本不兼容。",
"Refresh to update.": "刷新页面以更新。", "Refresh to update.": "刷新页面以更新。",

View file

@ -35,22 +35,22 @@
"Yes, do it!": "沒錯,就這樣辦!", "Yes, do it!": "沒錯,就這樣辦!",
"chooseMethod": "選擇方式", "chooseMethod": "選擇方式",
"signInVia": "透過 {{service}} 登入", "signInVia": "透過 {{service}} 登入",
"New": "新增", "new": "新增",
"Publish": "發表", "publish": "發表",
"Extra": "增益", "extra": "增益",
"Revision": "修訂版本", "revision": "修訂版本",
"Slide Mode": "簡報模式", "slideMode": "簡報模式",
"Export": "匯出", "export": "匯出",
"Import": "匯入", "import": "匯入",
"Clipboard": "剪貼簿", "clipboard": "剪貼簿",
"Download": "下載", "download": "下載",
"Raw HTML": "純 HTML", "Raw HTML": "純 HTML",
"Edit": "編輯", "edit": "編輯",
"View": "檢視", "View": "檢視",
"Both": "雙欄", "Both": "雙欄",
"Help": "協助", "help": "協助",
"Upload Image": "上傳圖片", "Upload Image": "上傳圖片",
"Menu": "選單", "menu": "選單",
"This page need refresh": "此頁面需要重新整理", "This page need refresh": "此頁面需要重新整理",
"You have an incompatible client version.": "您使用的是不相容的客戶端", "You have an incompatible client version.": "您使用的是不相容的客戶端",
"Refresh to update.": "請重新整理來更新", "Refresh to update.": "請重新整理來更新",

View file

@ -1,6 +1,6 @@
{ {
"id": "mockUser", "id": "mockUser",
"photo": "https://robohash.org/testy.png", "photo": "https://1.gravatar.com/avatar/767fc9c115a1b989744c755db47feb60?s=200&r=pg&d=mp",
"name": "Test", "name": "Test",
"status": "ok" "status": "ok"
} }

View file

@ -8,8 +8,8 @@ export const getBackendConfig: () => Promise<BackendConfigState> = async () => {
return await response.json() as Promise<BackendConfigState> return await response.json() as Promise<BackendConfigState>
} }
export const getFrontendConfig: () => Promise<FrontendConfigState> = async () => { export const getFrontendConfig: (baseUrl: string) => Promise<FrontendConfigState> = async (baseUrl) => {
const response = await fetch('config.json') const response = await fetch(`${baseUrl}config.json`)
expectResponseCode(response) expectResponseCode(response)
return await response.json() as Promise<FrontendConfigState> return await response.json() as Promise<FrontendConfigState>
} }

View file

@ -12,7 +12,7 @@ export interface meResponse {
photo: string photo: string
} }
export const postEmailLogin: ((email: string, password: string) => Promise<void>) = async (email, password) => { export const postEmailLogin = async (email: string, password: string):Promise<void> => {
const response = await fetch(getBackendUrl() + '/auth/email', { const response = await fetch(getBackendUrl() + '/auth/email', {
method: 'POST', method: 'POST',
mode: 'cors', mode: 'cors',

View file

@ -1,16 +1,16 @@
import React, { Fragment, useEffect, useState } from 'react' import React, { Fragment, useEffect, useState } from 'react'
import { useLocation } from 'react-router'
import { setUp } from '../../initializers'
import './application-loader.scss' import './application-loader.scss'
import { LoadingScreen } from './loading-screen' import { LoadingScreen } from './loading-screen'
interface ApplicationLoaderProps { export const ApplicationLoader: React.FC = ({ children }) => {
initTasks: Promise<void>[]
}
export const ApplicationLoader: React.FC<ApplicationLoaderProps> = ({ children, initTasks }) => {
const [failed, setFailed] = useState<boolean>(false) const [failed, setFailed] = useState<boolean>(false)
const [doneTasks, setDoneTasks] = useState<number>(0) const [doneTasks, setDoneTasks] = useState<number>(0)
const [initTasks, setInitTasks] = useState<Promise<void>[]>([])
const { pathname } = useLocation()
const runTask:((task: Promise<void>) => (Promise<void>)) = async (task) => { const runTask = async (task: Promise<void>): Promise<void> => {
await task await task
setDoneTasks(prevDoneTasks => { setDoneTasks(prevDoneTasks => {
return prevDoneTasks + 1 return prevDoneTasks + 1
@ -18,7 +18,12 @@ export const ApplicationLoader: React.FC<ApplicationLoaderProps> = ({ children,
} }
useEffect(() => { useEffect(() => {
setDoneTasks(0) const baseUrl:string = window.location.pathname.replace(pathname, '') + '/'
console.debug('Base URL is', baseUrl)
setInitTasks(setUp(baseUrl))
}, [pathname])
useEffect(() => {
for (const task of initTasks) { for (const task of initTasks) {
runTask(task).catch(reason => { runTask(task).catch(reason => {
setFailed(true) setFailed(true)

View file

@ -0,0 +1,11 @@
import React from 'react'
const EditorWindow: React.FC = () => {
return (
<div style={{ backgroundColor: 'green' }}>
Hello, EditorWindow!
</div>
)
}
export { EditorWindow }

View file

@ -0,0 +1,30 @@
import React from 'react'
import { useSelector } from 'react-redux'
import { useParams } from 'react-router'
import { ApplicationState } from '../../redux'
import { EditorMode } from '../../redux/editor/types'
import { EditorWindow } from './editor-window/editor-window'
import { MarkdownPreview } from './markdown-preview/markdown-preview'
import { TaskBar } from './task-bar/task-bar'
interface RouteParameters {
id: string
}
const Editor: React.FC = () => {
const editorMode: EditorMode = useSelector((state: ApplicationState) => state.editorConfig.editorMode)
const { id } = useParams<RouteParameters>()
return (
<div className={'d-flex flex-column vh-100'}>
<TaskBar/>
<h1>{id}</h1>
<div className={'flex-fill flex-row d-flex'}>
{ editorMode === EditorMode.EDITOR || editorMode === EditorMode.BOTH ? <EditorWindow/> : null }
{ editorMode === EditorMode.PREVIEW || editorMode === EditorMode.BOTH ? <MarkdownPreview/> : null }
</div>
</div>
)
}
export { Editor }

View file

@ -0,0 +1,11 @@
import React from 'react'
const MarkdownPreview: React.FC = () => {
return (
<div style={{ backgroundColor: 'red' }}>
Hello, MarkdownPreview!
</div>
)
}
export { MarkdownPreview }

View file

@ -0,0 +1,14 @@
.activeIndicator {
$indicator-size: 12px;
border-radius: $indicator-size;
height: $indicator-size;
width: $indicator-size;
&.active {
background-color: #5cb85c;
}
&.inactive {
background-color: #d20000;
}
}

View file

@ -0,0 +1,17 @@
import React from 'react'
import './active-indicator.scss'
export enum ActiveIndicatorStatus {
ACTIVE ='active',
INACTIVE ='inactive'
}
export interface ActiveIndicatorProps {
status: ActiveIndicatorStatus;
}
export const ActiveIndicator: React.FC<ActiveIndicatorProps> = ({ status }) => {
return (
<span className={`activeIndicator ${status}`}/>
)
}

View file

@ -0,0 +1,3 @@
.upper-case {
text-transform: uppercase;
}

View file

@ -0,0 +1,27 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import React from 'react'
import { Dropdown } from 'react-bootstrap'
import { ActiveIndicatorStatus } from './active-indicator'
import './connection-indicator.scss'
import { UserLine } from './user-line'
const ConnectionIndicator: React.FC = () => {
const userOnline = 2
return (
<Dropdown className="small" alignRight>
<Dropdown.Toggle id="connection-indicator" size="sm" variant="primary" className="upper-case">
<FontAwesomeIcon icon="users"/> {userOnline} Online
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item disabled={true} className="d-flex align-items-center p-0">
<UserLine name="Philip Molares" photo="https://1.gravatar.com/avatar/767fc9c115a1b989744c755db47feb60?s=200&r=pg&d=mp" color="red" status={ActiveIndicatorStatus.INACTIVE}/>
</Dropdown.Item>
<Dropdown.Item disabled={true} className="d-flex align-items-center p-0">
<UserLine name="Philip Molares" photo="https://1.gravatar.com/avatar/767fc9c115a1b989744c755db47feb60?s=200&r=pg&d=mp" color="blue" status={ActiveIndicatorStatus.ACTIVE}/>
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
)
}
export { ConnectionIndicator }

View file

@ -0,0 +1,15 @@
import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { ToggleButton, ToggleButtonGroup } from 'react-bootstrap'
const DarkModeButton: React.FC = () => {
return (
<ToggleButtonGroup type="checkbox" defaultValue={[]} name="dark-mode" className="ml-2">
<ToggleButton value={1} variant="light" className="text-secondary">
<FontAwesomeIcon icon="moon"/>
</ToggleButton>
</ToggleButtonGroup>
)
}
export { DarkModeButton }

View file

@ -0,0 +1,72 @@
import React from 'react'
import { Dropdown } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
const EditorMenu: React.FC = () => {
useTranslation()
return (
<Dropdown className="small" alignRight={true}>
<Dropdown.Toggle variant="light" size="sm" id="editor-menu" className="text-secondary">
<Trans i18nKey="menu"/>
</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Header>
<Trans i18nKey="extra"/>
</Dropdown.Header>
<Dropdown.Item className="small">
<FontAwesomeIcon icon="history"/> <Trans i18nKey="revision"/>
</Dropdown.Item>
<Dropdown.Item className="small">
<FontAwesomeIcon icon="tv"/> <Trans i18nKey="slideMode"/>
</Dropdown.Item>
<Dropdown.Divider/>
<Dropdown.Header>
<Trans i18nKey="export"/>
</Dropdown.Header>
<Dropdown.Item className="small">
<FontAwesomeIcon icon={['fab', 'dropbox']}/> Dropbox
</Dropdown.Item>
<Dropdown.Item className="small">
<FontAwesomeIcon icon={['fab', 'github']}/> Gist
</Dropdown.Item>
<Dropdown.Divider/>
<Dropdown.Header>
<Trans i18nKey="import"/>
</Dropdown.Header>
<Dropdown.Item className="small">
<FontAwesomeIcon icon={['fab', 'dropbox']}/> Dropbox
</Dropdown.Item>
<Dropdown.Item className="small">
<FontAwesomeIcon icon={['fab', 'github']}/> Gist
</Dropdown.Item>
<Dropdown.Item className="small">
<FontAwesomeIcon icon="paste"/> <Trans i18nKey="clipboard"/>
</Dropdown.Item>
<Dropdown.Divider/>
<Dropdown.Header>
<Trans i18nKey="download"/>
</Dropdown.Header>
<Dropdown.Item className="small">
<FontAwesomeIcon icon="file-alt"/> Markdown
</Dropdown.Item>
<Dropdown.Item className="small">
<FontAwesomeIcon icon="file-code"/> HTML
</Dropdown.Item>
<Dropdown.Item className="small">
<FontAwesomeIcon icon="file-code"/> Raw HTML
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
)
}
export { EditorMenu }

View file

@ -0,0 +1,30 @@
import { ToggleButton, ToggleButtonGroup } from 'react-bootstrap'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import React from 'react'
import { useSelector } from 'react-redux'
import { ApplicationState } from '../../../redux'
import { EditorMode } from '../../../redux/editor/types'
import { setEditorModeConfig } from '../../../redux/editor/methods'
const EditorViewMode: React.FC = () => {
const editorConfig = useSelector((state: ApplicationState) => state.editorConfig)
return (
<ToggleButtonGroup
type="radio"
name="options"
defaultValue={editorConfig.editorMode}
onChange={(value: EditorMode) => { setEditorModeConfig(value) }}>
<ToggleButton value={EditorMode.PREVIEW} variant="outline-secondary">
<FontAwesomeIcon icon="eye"/>
</ToggleButton>
<ToggleButton value={EditorMode.BOTH} variant="outline-secondary">
<FontAwesomeIcon icon="columns"/>
</ToggleButton>
<ToggleButton value={EditorMode.EDITOR} variant="outline-secondary">
<FontAwesomeIcon icon="pencil-alt"/>
</ToggleButton>
</ToggleButtonGroup>
)
}
export { EditorViewMode }

View file

@ -0,0 +1,46 @@
import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { Link } from 'react-router-dom'
import { Button, Nav, Navbar } from 'react-bootstrap'
import { DarkModeButton } from './dark-mode-button'
import { EditorViewMode } from './editor-view-mode'
import { Trans, useTranslation } from 'react-i18next'
import { EditorMenu } from './editor-menu'
import { ConnectionIndicator } from './connection-indicator'
const TaskBar: React.FC = () => {
useTranslation()
return (
<Navbar bg={'light'}>
<Nav className="mr-auto d-flex align-items-center">
<Navbar.Brand>
<Link to="/intro" className="text-secondary">
<FontAwesomeIcon icon="file-alt"/> CodiMD
</Link>
</Navbar.Brand>
<EditorViewMode/>
<DarkModeButton/>
<Button className="ml-2 text-secondary" size="sm"
variant="outline-light">
<FontAwesomeIcon icon="question-circle"/>
</Button>
</Nav>
<Nav className="d-flex align-items-center text-secondary">
<Button className="ml-2 text-secondary" size="sm" variant="outline-light">
<FontAwesomeIcon icon="plus"/> <Trans i18nKey="new"/>
</Button>
<Button className="ml-2 text-secondary" size="sm" variant="outline-light">
<FontAwesomeIcon icon="share-square"/> <Trans i18nKey="publish"/>
</Button>
<div className="text-secondary">
<EditorMenu/>
</div>
<div className="mr-2">
<ConnectionIndicator/>
</div>
</Nav>
</Navbar>
)
}
export { TaskBar }

View file

@ -0,0 +1,5 @@
.user-line-color-indicator {
border-left: 3px solid;
min-height: 30px;
height: 100%;
}

View file

@ -0,0 +1,21 @@
import React, { Fragment } from 'react'
import { UserAvatar } from '../../landing/layout/user-avatar/user-avatar'
import { ActiveIndicator, ActiveIndicatorStatus } from './active-indicator'
import './user-line.scss'
export interface UserLineProps {
name: string;
photo: string;
color: string;
status: ActiveIndicatorStatus;
}
export const UserLine: React.FC<UserLineProps> = ({ name, photo, color, status }) => {
return (
<Fragment>
<div className='d-inline-flex align-items-bottom user-line-color-indicator' style={{ borderLeftColor: color }}/>
<UserAvatar photo={photo} name={name} additionalClasses={'mx-2'}/>
<ActiveIndicator status={status} />
</Fragment>
)
}

View file

@ -0,0 +1,15 @@
import React from 'react'
import { Container } from 'react-bootstrap'
import { HeaderBar } from './layout/navigation/header-bar/header-bar'
import { Footer } from './layout/footer/footer'
import './layout/style/index.scss'
export const LandingLayout: React.FC = ({ children }) => {
return (
<Container>
<HeaderBar/>
{children}
<Footer/>
</Container>
)
}

View file

@ -1,30 +0,0 @@
import React from 'react'
import { Redirect, Route, Switch } from 'react-router-dom'
import { History } from '../pages/history/history'
import { Intro } from '../pages/intro/intro'
import { Container } from 'react-bootstrap'
import { HeaderBar } from './navigation/header-bar/header-bar'
import { Footer } from './footer/footer'
import './style/index.scss'
import { Login } from '../pages/login/login'
export const Landing: React.FC = () => {
return (<Container>
<HeaderBar/>
<Switch>
<Route path="/history">
<History/>
</Route>
<Route path="/intro">
<Intro/>
</Route>
<Route path="/login">
<Login/>
</Route>
<Route path="/">
<Redirect to="/intro"/>
</Route>
</Switch>
<Footer/>
</Container>)
}

View file

@ -1,4 +0,0 @@
.user-avatar {
width: 16px;
height: 16px;
}

View file

@ -5,22 +5,16 @@ import { useSelector } from 'react-redux'
import { ApplicationState } from '../../../../../redux' import { ApplicationState } from '../../../../../redux'
import { LinkContainer } from 'react-router-bootstrap' import { LinkContainer } from 'react-router-bootstrap'
import { clearUser } from '../../../../../redux/user/methods' import { clearUser } from '../../../../../redux/user/methods'
import './user-dropdown.scss'
import { Trans } from 'react-i18next' import { Trans } from 'react-i18next'
import { UserAvatar } from '../../user-avatar/user-avatar'
export const UserDropdown: React.FC = () => { export const UserDropdown: React.FC = () => {
const user = useSelector((state: ApplicationState) => state.user) const user = useSelector((state: ApplicationState) => state.user)
return ( return (
<Dropdown alignRight> <Dropdown alignRight>
<Dropdown.Toggle size="sm" variant="dark" id="dropdown-basic"> <Dropdown.Toggle size="sm" variant="dark" id="dropdown-user" className={'d-flex align-items-center'}>
<div className='d-inline-flex align-items-baseline'> <UserAvatar name={user.name} photo={user.photo}/>
<img
src={user.photo}
className="user-avatar"
alt={`Avatar of ${user.name}`}
/><span>{user.name}</span>
</div>
</Dropdown.Toggle> </Dropdown.Toggle>
<Dropdown.Menu> <Dropdown.Menu>

View file

@ -0,0 +1,8 @@
.user-avatar {
width: 20px;
height: 20px;
}
.user-name {
font-size: 1rem;
}

View file

@ -0,0 +1,23 @@
import React from 'react'
import './user-avatar.scss'
export interface UserAvatarProps {
name: string;
photo: string;
additionalClasses?: string;
}
const UserAvatar: React.FC<UserAvatarProps> = ({ name, photo, additionalClasses = '' }) => {
return (
<span className={'d-inline-flex align-items-center ' + additionalClasses}>
<img
src={photo}
className="user-avatar"
alt={`Avatar of ${name}`}
/>
<span className="ml-1 user-name">{name}</span>
</span>
)
}
export { UserAvatar }

View file

@ -1,22 +1,48 @@
import React from 'react' import React from 'react'
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import { BrowserRouter as Router } from 'react-router-dom'
import * as serviceWorker from './service-worker'
import { Landing } from './components/landing/layout'
import { ApplicationLoader } from './components/application-loader/application-loader'
import { Provider } from 'react-redux' import { Provider } from 'react-redux'
import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom'
import { ApplicationLoader } from './components/application-loader/application-loader'
import { Editor } from './components/editor/editor'
import { LandingLayout } from './components/landing/landing-layout'
import { History } from './components/landing/pages/history/history'
import { Intro } from './components/landing/pages/intro/intro'
import { Login } from './components/landing/pages/login/login'
import { setUpFontAwesome } from './initializers/fontAwesome'
import * as serviceWorker from './service-worker'
import { store } from './utils/store' import { store } from './utils/store'
import { setUp } from './initializers'
const initTasks = setUp() setUpFontAwesome()
ReactDOM.render( ReactDOM.render(
<Provider store={store}> <Provider store={store}>
<ApplicationLoader initTasks={initTasks}> <Router>
<Router> <ApplicationLoader>
<Landing/> <Switch>
</Router> <Route path="/history">
</ApplicationLoader> <LandingLayout>
<History/>
</LandingLayout>
</Route>
<Route path="/intro">
<LandingLayout>
<Intro/>
</LandingLayout>
</Route>
<Route path="/login">
<LandingLayout>
<Login/>
</LandingLayout>
</Route>
<Route path="/n/:id">
<Editor/>
</Route>
<Route path="/">
<Redirect to="/intro"/>
</Route>
</Switch>
</ApplicationLoader>
</Router>
</Provider> </Provider>
, document.getElementById('root') , document.getElementById('root')
) )

View file

@ -3,8 +3,8 @@ import { setFrontendConfig } from '../redux/frontend-config/methods'
import { setBackendConfig } from '../redux/backend-config/methods' import { setBackendConfig } from '../redux/backend-config/methods'
import { getAndSetUser } from '../utils/apiUtils' import { getAndSetUser } from '../utils/apiUtils'
export const loadAllConfig: () => Promise<void> = async () => { export const loadAllConfig: (baseUrl: string) => Promise<void> = async (baseUrl) => {
const frontendConfig = await getFrontendConfig() const frontendConfig = await getFrontendConfig(baseUrl)
if (!frontendConfig) { if (!frontendConfig) {
return Promise.reject(new Error('Frontend config empty!')) return Promise.reject(new Error('Frontend config empty!'))
} }

View file

@ -1,16 +1,36 @@
import { library } from '@fortawesome/fontawesome-svg-core' import { library } from '@fortawesome/fontawesome-svg-core'
import {
faTwitter,
faMastodon,
faGoogle,
faFacebook,
faDropbox,
faDiscourse,
faGithub,
faGitlab
} from '@fortawesome/free-brands-svg-icons'
import { import {
faAddressCard, faAddressCard,
faBolt, faBolt,
faChartBar, faChartBar,
faCircle,
faClock, faClock,
faCloudDownloadAlt, faCloudDownloadAlt,
faColumns,
faComment, faComment,
faCopy, faCopy,
faDownload, faDownload,
faEye,
faFileAlt, faFileAlt,
faFileCode,
faGlobe, faGlobe,
faHistory,
faMoon,
faPaste,
faPencilAlt,
faPlus, faPlus,
faQuestionCircle,
faShareSquare,
faSignOutAlt, faSignOutAlt,
faSort, faSort,
faSortDown, faSortDown,
@ -23,20 +43,12 @@ import {
faUpload, faUpload,
faUsers faUsers
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
import {
faDiscourse,
faDropbox,
faFacebook,
faGithub,
faGitlab,
faGoogle,
faMastodon,
faTwitter
} from '@fortawesome/free-brands-svg-icons'
export const setUpFontAwesome: () => void = () => { export const setUpFontAwesome: (() => void) = () => {
library.add(faBolt, faPlus, faChartBar, faTv, faFileAlt, faCloudDownloadAlt, library.add(faBolt, faPlus, faChartBar, faTv, faFileAlt, faCloudDownloadAlt,
faTrash, faSignOutAlt, faComment, faDiscourse, faMastodon, faGlobe, faTrash, faSignOutAlt, faComment, faDiscourse, faMastodon, faGlobe,
faThumbtack, faClock, faTimes, faGithub, faGitlab, faGoogle, faFacebook, faThumbtack, faClock, faTimes, faGithub, faGitlab, faGoogle, faFacebook,
faDropbox, faTwitter, faUsers, faAddressCard, faSort, faDownload, faUpload, faTrash, faSync, faSortUp, faSortDown, faCopy) faDropbox, faTwitter, faUsers, faAddressCard, faEye, faPencilAlt, faColumns,
faMoon, faQuestionCircle, faShareSquare, faHistory, faFileCode, faPaste,
faCircle, faSort, faDownload, faUpload, faTrash, faSync, faSortUp, faSortDown, faCopy)
} }

View file

@ -1,6 +1,5 @@
import { setUpFontAwesome } from './fontAwesome'
import { setUpI18n } from './i18n'
import { loadAllConfig } from './configLoader' import { loadAllConfig } from './configLoader'
import { setUpI18n } from './i18n'
const customDelay: () => Promise<void> = async () => { const customDelay: () => Promise<void> = async () => {
if (window.localStorage.getItem('customDelay')) { if (window.localStorage.getItem('customDelay')) {
@ -10,7 +9,6 @@ const customDelay: () => Promise<void> = async () => {
} }
} }
export const setUp: () => Promise<void>[] = () => { export const setUp: (baseUrl: string) => Promise<void>[] = (baseUrl) => {
setUpFontAwesome() return [setUpI18n(), loadAllConfig(baseUrl), customDelay()]
return [setUpI18n(), loadAllConfig(), customDelay()]
} }

View file

@ -1,7 +1,7 @@
import { BackendConfigState, SET_BACKEND_CONFIG_ACTION_TYPE, SetBackendConfigAction } from './types' import { BackendConfigState, SET_BACKEND_CONFIG_ACTION_TYPE, SetBackendConfigAction } from './types'
import { store } from '../../utils/store' import { store } from '../../utils/store'
export const setBackendConfig: (state: BackendConfigState) => void = (state: BackendConfigState) => { export const setBackendConfig = (state: BackendConfigState): void => {
const action: SetBackendConfigAction = { const action: SetBackendConfigAction = {
type: SET_BACKEND_CONFIG_ACTION_TYPE, type: SET_BACKEND_CONFIG_ACTION_TYPE,
payload: { payload: {

View file

@ -0,0 +1,14 @@
import {
EditorMode,
SET_EDITOR_CONFIG_MODE_ACTION_TYPE,
SetEditorConfigAction
} from './types'
import { store } from '../../utils/store'
export const setEditorModeConfig = (editorMode: EditorMode): void => {
const action: SetEditorConfigAction = {
type: SET_EDITOR_CONFIG_MODE_ACTION_TYPE,
payload: editorMode
}
store.dispatch(action)
}

View file

@ -0,0 +1,23 @@
import { Reducer } from 'redux'
import {
EditorConfigActions,
EditorConfigState,
EditorMode,
SET_EDITOR_CONFIG_MODE_ACTION_TYPE
} from './types'
export const initialState: EditorConfigState = {
editorMode: EditorMode.PREVIEW
}
export const EditorConfigReducer: Reducer<EditorConfigState, EditorConfigActions> = (state: EditorConfigState = initialState, action: EditorConfigActions) => {
switch (action.type) {
case SET_EDITOR_CONFIG_MODE_ACTION_TYPE:
return {
...state,
editorMode: action.payload
}
default:
return state
}
}

20
src/redux/editor/types.ts Normal file
View file

@ -0,0 +1,20 @@
import { Action } from 'redux'
export const SET_EDITOR_CONFIG_MODE_ACTION_TYPE = 'editor/mode/set'
export interface EditorConfigState {
editorMode: EditorMode;
}
export enum EditorMode {
PREVIEW,
BOTH,
EDITOR,
}
export interface SetEditorConfigAction extends Action {
type: string;
payload: EditorMode;
}
export type EditorConfigActions = SetEditorConfigAction;

View file

@ -1,7 +1,7 @@
import { FrontendConfigState, SET_FRONTEND_CONFIG_ACTION_TYPE, SetFrontendConfigAction } from './types' import { FrontendConfigState, SET_FRONTEND_CONFIG_ACTION_TYPE, SetFrontendConfigAction } from './types'
import { store } from '../../utils/store' import { store } from '../../utils/store'
export const setFrontendConfig: (state: FrontendConfigState) => void = (state: FrontendConfigState) => { export const setFrontendConfig = (state: FrontendConfigState): void => {
const action: SetFrontendConfigAction = { const action: SetFrontendConfigAction = {
type: SET_FRONTEND_CONFIG_ACTION_TYPE, type: SET_FRONTEND_CONFIG_ACTION_TYPE,
payload: { payload: {

View file

@ -1,23 +1,23 @@
import { combineReducers, Reducer } from 'redux' import { combineReducers, Reducer } from 'redux'
import { UserState } from './user/types' import { UserState } from './user/types'
import { UserReducer } from './user/reducers' import { UserReducer } from './user/reducers'
import { ModalShowReducer } from './modal/reducers'
import { ModalShowState } from './modal/types'
import { BackendConfigState } from './backend-config/types' import { BackendConfigState } from './backend-config/types'
import { FrontendConfigState } from './frontend-config/types' import { FrontendConfigState } from './frontend-config/types'
import { BackendConfigReducer } from './backend-config/reducers' import { BackendConfigReducer } from './backend-config/reducers'
import { FrontendConfigReducer } from './frontend-config/reducers' import { FrontendConfigReducer } from './frontend-config/reducers'
import { EditorConfigState } from './editor/types'
import { EditorConfigReducer } from './editor/reducers'
export interface ApplicationState { export interface ApplicationState {
user: UserState; user: UserState;
modalShow: ModalShowState;
backendConfig: BackendConfigState; backendConfig: BackendConfigState;
frontendConfig: FrontendConfigState; frontendConfig: FrontendConfigState;
editorConfig: EditorConfigState;
} }
export const allReducers: Reducer<ApplicationState> = combineReducers<ApplicationState>({ export const allReducers: Reducer<ApplicationState> = combineReducers<ApplicationState>({
user: UserReducer, user: UserReducer,
modalShow: ModalShowReducer,
backendConfig: BackendConfigReducer, backendConfig: BackendConfigReducer,
frontendConfig: FrontendConfigReducer frontendConfig: FrontendConfigReducer,
editorConfig: EditorConfigReducer
}) })

View file

@ -1,7 +0,0 @@
import { ActionCreator } from 'redux'
import { SET_HISTORY_DELETE_MODAL_SHOW_ACTION_TYPE, SetHistoryDeleteModalShowAction } from './types'
export const setSignInModalShow: ActionCreator<SetHistoryDeleteModalShowAction> = (historyDelete: boolean) => ({
type: SET_HISTORY_DELETE_MODAL_SHOW_ACTION_TYPE,
payload: historyDelete
})

View file

@ -1,18 +0,0 @@
import { Reducer } from 'redux'
import { ModalShowActions, ModalShowState, SET_HISTORY_DELETE_MODAL_SHOW_ACTION_TYPE } from './types'
export const initialState: ModalShowState = {
historyDelete: false
}
export const ModalShowReducer: Reducer<ModalShowState, ModalShowActions> = (state: ModalShowState = initialState, action: ModalShowActions) => {
switch (action.type) {
case SET_HISTORY_DELETE_MODAL_SHOW_ACTION_TYPE:
return {
...state,
historyDelete: action.payload
}
default:
return state
}
}

View file

@ -1,14 +0,0 @@
import { Action } from 'redux'
export const SET_HISTORY_DELETE_MODAL_SHOW_ACTION_TYPE = 'modal/history-delete/set'
export interface ModalShowState {
historyDelete: boolean
}
export interface SetHistoryDeleteModalShowAction extends Action {
type: string;
payload: boolean;
}
export type ModalShowActions = SetHistoryDeleteModalShowAction;

View file

@ -17,6 +17,6 @@ export const getBackendUrl: (() => string) = () => {
return store.getState().frontendConfig.backendUrl return store.getState().frontendConfig.backendUrl
} }
export const expectResponseCode: ((response: Response, code?: number) => boolean) = (response, code = 200) => { export const expectResponseCode = (response: Response, code = 200): boolean => {
return response.status !== code return response.status !== code
} }