File tree Expand file tree Collapse file tree 5 files changed +388
-3276
lines changed Expand file tree Collapse file tree 5 files changed +388
-3276
lines changed Original file line number Diff line number Diff line change 1
1
# CHANGELOG
2
2
3
+ ## v0.3.1
4
+ - Fix tooltip on canceled save
5
+ - Update dependencies
6
+
3
7
## v0.3.0
4
8
- Restructured files
5
9
- Added error message on not saved key
Original file line number Diff line number Diff line change @@ -54,15 +54,21 @@ const saveKey = async (input_key) => {
54
54
55
55
let label_id = `${ lower_input_key } -key-text-area-tooltip`
56
56
// Display error tooltip for 5s
57
- if ( result ) {
57
+ if ( result . startsWith ( 'Error' ) ) {
58
58
tip_color = 'text-red-500' ;
59
- } else {
59
+ } else if ( result ) {
60
60
tip_color = 'text-green-500' ;
61
61
result = `${ input_key } Key saved` ;
62
+ } else {
63
+ result = ""
62
64
}
63
- document . getElementById ( label_id ) . classList . add ( tip_color ) ;
64
- document . getElementById ( label_id ) . innerText = result ;
65
- setTimeout ( function ( ) { remove_label_text ( label_id ) } , 5000 ) ;
65
+
66
+ if ( result ) {
67
+ document . getElementById ( label_id ) . classList . add ( tip_color ) ;
68
+ document . getElementById ( label_id ) . innerText = result ;
69
+ setTimeout ( function ( ) { remove_label_text ( label_id ) } , 5000 ) ;
70
+ }
71
+
66
72
}
67
73
68
74
// Event listeners
You can’t perform that action at this time.
0 commit comments