File tree Expand file tree Collapse file tree 1 file changed +39
-1
lines changed
site/src/pages/TemplateVersionEditorPage Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ import {
55
55
} from "components/FullPageLayout/Topbar" ;
56
56
import { Sidebar } from "components/FullPageLayout/Sidebar" ;
57
57
import { ProvisionerTagsPopover } from "./ProvisionerTagsPopover" ;
58
+ import WarningOutlined from "@mui/icons-material/WarningOutlined" ;
58
59
59
60
type Tab = "logs" | "resources" | undefined ; // Undefined is to hide the tab
60
61
@@ -450,7 +451,44 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({
450
451
< div css = { { flex : 1 , overflowY : "auto" } } data-chromatic = "ignore" >
451
452
{ activePath ? (
452
453
isEditorValueBinary ? (
453
- < p > File type not supported</ p >
454
+ < div
455
+ role = "alert"
456
+ css = { {
457
+ width : "100%" ,
458
+ height : "100%" ,
459
+ display : "flex" ,
460
+ alignItems : "center" ,
461
+ justifyContent : "center" ,
462
+ padding : 40 ,
463
+ } }
464
+ >
465
+ < div
466
+ css = { {
467
+ display : "flex" ,
468
+ flexDirection : "column" ,
469
+ alignItems : "center" ,
470
+ maxWidth : 420 ,
471
+ textAlign : "center" ,
472
+ } }
473
+ >
474
+ < WarningOutlined
475
+ css = { {
476
+ fontSize : 48 ,
477
+ color : theme . roles . warning . fill . outline ,
478
+ } }
479
+ />
480
+ < p
481
+ css = { {
482
+ margin : 0 ,
483
+ padding : 0 ,
484
+ marginTop : 24 ,
485
+ } }
486
+ >
487
+ The file is not displayed in the text editor because it
488
+ is either binary or uses an unsupported text encoding.
489
+ </ p >
490
+ </ div >
491
+ </ div >
454
492
) : (
455
493
< MonacoEditor
456
494
value = { editorValue }
You can’t perform that action at this time.
0 commit comments