@@ -32,9 +32,10 @@ import "./index.css";
3232import "./polyfills/roundRect" ;
3333import { exists } from "./utils/fs" ;
3434import { exit , writeStderr } from "./utils/otherApi" ;
35- import { getCurrentWindow , isDesktop , isFrame , isWeb } from "./utils/platform" ;
35+ import { getCurrentWindow , isDesktop , isFrame , isWeb , isWindows } from "./utils/platform" ;
3636import { ShortcutKeysRegister } from "./core/service/controlService/shortcutKeysEngine/shortcutKeysRegister" ;
3737import { FileLoader } from "./core/service/dataFileService/fileLoader" ;
38+ import { Dialog } from "./components/dialog" ;
3839
3940const router = createMemoryRouter ( routes ) ;
4041const Routes = ( ) => < RouterProvider router = { router } /> ;
@@ -121,7 +122,19 @@ async function loadStartFile() {
121122 if ( isDesktop && ! isWeb ) {
122123 const cliMatches = await getMatches ( ) ;
123124 if ( cliMatches . args . path . value ) {
125+ // ?
124126 path = cliMatches . args . path . value as string ;
127+ if ( isWindows ) {
128+ path = "【不要把json文件的打开方式设置成此软件,应在软件内打开】" ;
129+ setTimeout ( ( ) => {
130+ Dialog . show ( {
131+ title : "提示" ,
132+ content : "不要把json文件的打开方式设置成此软件,应在软件内打开,具体原因详见:" ,
133+ code : "https://project-graph.top/docs/app/announcement" ,
134+ type : "warning" ,
135+ } ) ;
136+ } , 3000 ) ;
137+ }
125138 } else {
126139 path = await StartFilesManager . getCurrentStartFile ( ) ;
127140 }
0 commit comments