File tree Expand file tree Collapse file tree 7 files changed +24
-8
lines changed
Expand file tree Collapse file tree 7 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,11 @@ export const Editor = (props) => {
198198 } ;
199199
200200 const handleReset = ( ) => {
201- notify ( "Reset" , { state : "info" } ) ;
201+ notify (
202+ t ( "editor.form.reset.notification_title" ) ,
203+ t ( "editor.form.reset.notification_text" ) ,
204+ { state : "info" , dismissable : true } ,
205+ ) ;
202206 localStorage . setItem ( "publiccode-editor" , "{}" ) ;
203207 reset ( { } , { dirtyFields : true } ) ;
204208 setYaml ( null ) ;
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export const Footer = (props: Props): JSX.Element => {
5656 onClick = { ( ) => props . reset ( ) }
5757 disabled = { ! props . languages || props . languages . length === 0 }
5858 >
59- { t ( "editor.form.reset" ) }
59+ { t ( "editor.form.reset.button " ) }
6060 </ button >
6161 </ div >
6262 { /* <div className="content__foot_item">
Original file line number Diff line number Diff line change 11import "../../asset/style.scss" ;
22import { NotificationManager } from "design-react-kit" ;
3- import { NOTIFICATION_TIMEOUT } from "../contents/constants" ;
3+
4+ const NOTIFICATION_TIMEOUT = 4_000 ;
45
56interface Props {
67 children : React . ReactNode ;
@@ -9,7 +10,7 @@ interface Props {
910
1011const Layout = ( { children, isLoading } : Props ) : JSX . Element => (
1112 < div className = { isLoading ? "wrapper loadingRemote" : "wrapper" } >
12- < NotificationManager duration = { NOTIFICATION_TIMEOUT } fix = "top" />
13+ < NotificationManager duration = { NOTIFICATION_TIMEOUT } fix = "top" closeOnClick = { false } style = { { zIndex : 10 } } />
1314 { children }
1415 </ div >
1516) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,5 @@ export const SAMPLE_YAML_URL = `https://raw.githubusercontent.com/italia/publicc
1313export const elasticUrl = ELASTIC_URL || "" ;
1414export const defaultCountry = DEFAULT_COUNTRY || "it" ;
1515export const AUTOSAVE_TIMEOUT = 15000 ;
16- export const NOTIFICATION_TIMEOUT = 3000 ;
1716export const DEFAULT_BRANCH = "master" ;
1817export const defaultBranch = { branch : DEFAULT_BRANCH } ;
Original file line number Diff line number Diff line change 2222 "yamlloading" : " Error loading yaml"
2323 },
2424 "form" : {
25- "reset" : " Reset" ,
25+ "reset" : {
26+ "button" :" Reset" ,
27+ "notification_title" : " All data cleared" ,
28+ "notification_text" : " All entered data has been cleared"
29+ },
2630 "upload" : " Upload" ,
2731 "validate" : " Validate" ,
2832 "generate" : " Generate" ,
Original file line number Diff line number Diff line change 2222 "yamlloading" : " Error loading yaml"
2323 },
2424 "form" : {
25- "reset" : " Reset" ,
25+ "reset" : {
26+ "button" :" Reset" ,
27+ "notification_title" : " All data cleared" ,
28+ "notification_text" : " All entered data has been cleared"
29+ },
2630 "upload" : " Upload" ,
2731 "validate" : " Validate" ,
2832 "generate" : " Generate" ,
Original file line number Diff line number Diff line change 2222 "yamlloading" : " Errore nel caricamento dello yaml"
2323 },
2424 "form" : {
25- "reset" : " Reset" ,
25+ "reset" : {
26+ "button" :" Reimposta" ,
27+ "notification_title" : " Dati cancellati" ,
28+ "notification_text" : " Tutti i dati inseriti sono stati cancellati"
29+ },
2630 "upload" : " Carica" ,
2731 "validate" : " Valida" ,
2832 "generate" : " Genera" ,
You can’t perform that action at this time.
0 commit comments