Commit 9f777e8 1 parent ae54657 commit 9f777e8 Copy full SHA for 9f777e8
File tree 1 file changed +9
-3
lines changed
src/renderer/windows/main/pages
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -299,11 +299,13 @@ import { InstanceSchema } from '@universal/store/modules/instance.schema';
299
299
import {
300
300
useI18n ,
301
301
useJava ,
302
- useCurrentUser ,
303
302
useRouter ,
304
303
useInstanceTemplates ,
305
304
useCurseforgeImport ,
306
305
useInstanceCreation ,
306
+ useSelectedUser ,
307
+ useProfileId ,
308
+ useGameProfile ,
307
309
} from ' @/hooks' ;
308
310
import { Java } from ' @universal/store/modules/java' ;
309
311
import { Modpack } from ' @main/service/CurseForgeService' ;
@@ -403,7 +405,9 @@ export default defineComponent({
403
405
const importTask: Ref <Promise <string > | null > = ref (null );
404
406
const notImporting = computed (() => importTask .value === null );
405
407
406
- const { name } = useCurrentUser ();
408
+ const { userId, profileId } = useSelectedUser ();
409
+ const { gameProfile } = useProfileId (userId , profileId );
410
+ const { name } = useGameProfile (gameProfile );
407
411
const { all : javas } = useJava ();
408
412
const { templates } = setupTemplates ();
409
413
const { importCurseforgeModpack } = useCurseforgeImport ();
@@ -433,7 +437,9 @@ export default defineComponent({
433
437
reset ();
434
438
data .step = 1 ;
435
439
data .template = props .initialTemplate ? templates .value .findIndex (m => m .path === props .initialTemplate ) : - 1 ;
436
- selectTemplate (data .template , templates .value [data .template ]);
440
+ if (data .template !== - 1 ) {
441
+ selectTemplate (data .template , templates .value [data .template ]);
442
+ }
437
443
data .creating = false ;
438
444
}
439
445
async function doCreate() {
You can’t perform that action at this time.
0 commit comments