File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,12 @@ a.plain-link {
7272}
7373
7474.error-boundary {
75+ white-space : pre-wrap ;
7576 color : var (--error-color );
7677}
7778
7879.error-color {
79- color : var (--error-color );
80+ color : var (--error-color );
8081}
8182
8283/* OverlayScrollbars styling */
Original file line number Diff line number Diff line change @@ -127,12 +127,10 @@ function createS3SuggestionItems(
127127 // behavior
128128 return s3Profiles . map ( ( profileName ) => {
129129 const connStatus = connStatusMap . get ( profileName ) ;
130- const connColorNum = computeConnColorNum ( connStatus ) ;
131130 const item : SuggestionConnectionItem = {
132131 status : "connected" ,
133- icon : "arrow-right-arrow-left" ,
134- iconColor :
135- connStatus ?. status == "connected" ? `var(--conn-icon-color-${ connColorNum } )` : "var(--grey-text-color)" ,
132+ icon : "database" ,
133+ iconColor : "var(--accent-color)" ,
136134 value : profileName ,
137135 label : profileName ,
138136 current : profileName == connection ,
Original file line number Diff line number Diff line change @@ -485,7 +485,11 @@ export class PreviewModel implements ViewModel {
485485 const fileName = fileInfo ?. name ;
486486 const connErr = getFn ( this . connectionError ) ;
487487 const editMode = getFn ( this . editMode ) ;
488+ const genErr = getFn ( this . errorMsgAtom ) ;
488489
490+ if ( ! fileInfo ) {
491+ return { errorStr : `Load Error: ${ genErr ?. text } ` } ;
492+ }
489493 if ( connErr != "" ) {
490494 return { errorStr : `Connection Error: ${ connErr } ` } ;
491495 }
@@ -1072,10 +1076,14 @@ function PreviewView({
10721076 const filePath = useAtomValue ( model . metaFilePath ) ;
10731077 const [ errorMsg , setErrorMsg ] = useAtom ( model . errorMsgAtom ) ;
10741078 const connection = useAtomValue ( model . connectionImmediate ) ;
1079+ const fileInfo = useAtomValue ( model . statFile ) ;
10751080
10761081 useEffect ( ( ) => {
1082+ if ( ! fileInfo ) {
1083+ return ;
1084+ }
10771085 setErrorMsg ( null ) ;
1078- } , [ connection , filePath ] ) ;
1086+ } , [ connection , filePath , fileInfo ] ) ;
10791087
10801088 if ( connStatus ?. status != "connected" ) {
10811089 return null ;
You can’t perform that action at this time.
0 commit comments