File tree Expand file tree Collapse file tree 14 files changed +179
-125
lines changed
Expand file tree Collapse file tree 14 files changed +179
-125
lines changed Original file line number Diff line number Diff line change 3535 },
3636 "main" : " public/electron.js" ,
3737 "dependencies" : {
38- "@material-ui/core" : " ^4.8.3 " ,
38+ "@material-ui/core" : " ^4.9.0 " ,
3939 "@material-ui/icons" : " ^4.5.1" ,
40- "axios" : " ^0.19.1 " ,
40+ "axios" : " ^0.19.2 " ,
4141 "cross-env" : " ^6.0.3" ,
4242 "crypto-js" : " ^3.1.9-1" ,
4343 "electron-is-dev" : " ^1.1.0" ,
7878 },
7979 "devDependencies" : {
8080 "concurrently" : " ^5.0.2" ,
81- "electron" : " ^7.1.9 " ,
81+ "electron" : " ^7.1.10 " ,
8282 "electron-builder" : " ^22.2.0" ,
8383 "wait-on" : " ^4.0.0"
8484 }
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+
3+ const CsvExport = ( { children, data, fileName} ) => {
4+
5+ let href = null ;
6+ if ( data ) {
7+ let csvContent = "" ;
8+ data . forEach ( element => {
9+ csvContent += element . type + "," + element . hash + "\n" ;
10+ } ) ;
11+
12+ const blob = new Blob ( [ csvContent ] , { type : 'text/csv;charset=utf-8;' } ) ;
13+ href = URL . createObjectURL ( blob ) ;
14+ }
15+
16+ return (
17+ data ? (
18+ < a href = { href } download = { fileName } target = { "_self" }
19+ style = { { textDecoration : "none" } } >
20+ { children }
21+ </ a >
22+ ) : { children}
23+ ) ;
24+ } ;
25+
26+ export default CsvExport ;
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ const de_DE = () => {
6969 languageEnabled : "Schaltfläche \"Sprache\"" ,
7070 exit : "Schließen" ,
7171 darkTheme : "Dunkel" ,
72- darkThemeDescription : "Schont die Augen."
72+ darkThemeDescription : "Schont die Augen." ,
73+ export : "Export"
7374 }
7475} ;
7576
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ const en_US = () => {
6969 languageEnabled : "Language button" ,
7070 exit : "Exit" ,
7171 darkTheme : "Dark" ,
72- darkThemeDescription : "Easy on the eyes."
72+ darkThemeDescription : "Easy on the eyes." ,
73+ export : "Export"
7374 }
7475} ;
7576
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ const es_ES = () => {
6969 languageEnabled : "Botón de idioma" ,
7070 exit : "Salida" ,
7171 darkTheme : "Oscuro" ,
72- darkThemeDescription : "Fácil para los ojos."
72+ darkThemeDescription : "Fácil para los ojos." ,
73+ export : "Exportar"
7374 }
7475} ;
7576
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ const fr_FR = () => {
6969 languageEnabled : "Bouton de langue" ,
7070 exit : "Fermer" ,
7171 darkTheme : "Foncé" ,
72- darkThemeDescription : "Facile sur les yeux."
72+ darkThemeDescription : "Facile sur les yeux." ,
73+ export : "Exporter"
7374 }
7475} ;
7576
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ const it_IT = () => {
6969 languageEnabled : "Pulsante lingua" ,
7070 exit : "Uscire" ,
7171 darkTheme : "Buio" ,
72- darkThemeDescription : "Facile per gli occhi."
72+ darkThemeDescription : "Facile per gli occhi." ,
73+ export : "Esportare"
7374 }
7475} ;
7576
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ const jp_JP = () => {
6969 languageEnabled : "言語ボタン" ,
7070 exit : "出口" ,
7171 darkTheme : "闇" ,
72- darkThemeDescription : "目に優しい。"
72+ darkThemeDescription : "目に優しい。" ,
73+ export : "書き出す"
7374 }
7475} ;
7576
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ const nl_NL = () => {
6969 languageEnabled : "Taal knop" ,
7070 exit : "Sluiten" ,
7171 darkTheme : "Donker" ,
72- darkThemeDescription : "Makkelijk voor de ogen."
72+ darkThemeDescription : "Makkelijk voor de ogen." ,
73+ export : "Exporteren"
7374 }
7475} ;
7576
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ const ru_RU = () => {
6969 languageEnabled : "Языковая кнопка" ,
7070 exit : "Выход" ,
7171 darkTheme : "Темно" ,
72- darkThemeDescription : "Легко на глазах."
72+ darkThemeDescription : "Легко на глазах." ,
73+ export : "экспорт"
7374 }
7475} ;
7576
You can’t perform that action at this time.
0 commit comments