Skip to content

Commit

Permalink
refactor: clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Nov 2, 2020
1 parent f48f62e commit 9f5d731
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/main/service/InstanceResourceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default class InstanceResourceService extends Service {
}
}
});
this.log(`Mount on instance mods: ${basePath}`);
this.log(`Mounted on instance mods: ${basePath}`);
}
}

Expand Down Expand Up @@ -197,7 +197,7 @@ export default class InstanceResourceService extends Service {
}
}
});
this.log(`Mount on instance resource packs: ${basePath}`);
this.log(`Mounted on instance resource packs: ${basePath}`);
}
}

Expand Down
5 changes: 0 additions & 5 deletions src/renderer/windows/main/components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,7 @@ export default defineComponent({
const { show } = useDialog('task');
const { updateStatus } = useUpdateInfo();
const data = reactive({
taskDialog: false,
});
return {
...toRefs(data),
updateStatus,
activeTasksCount,
showTaskDialog: show,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:estimate-size="56"
:extra-props="{ getFileStatus: getFileStatus, install: install, download: download, modpack: type === 'modpacks' }"
></virtual-list>
<v-dialog v-model="isConfirmDialogShown">
<v-dialog v-model="isConfirmDialogShown" persistent>
<add-instance-stepper :show="isConfirmDialogShown" :initial-template="initialTemplate" @quit="isConfirmDialogShown = false" />
</v-dialog>
</v-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,15 @@
</v-layout>
</v-stepper-content>
<v-stepper-content step="3">
<task-focus :value="importTask" />
<task-focus v-if="!error" :value="importTask" />
<div v-else> {{ error }} </div>
<v-btn
flat
:disabled="creating"
@click="quit"
>
{{ $t('cancel') }}
</v-btn>
</v-stepper-content>
</v-stepper-items>
</v-stepper>
Expand Down Expand Up @@ -453,6 +461,7 @@ export default defineComponent({
step: 1,
valid: false,
javaValid: true,
error: undefined as any,
});
const importTask: Ref<Promise<string> | null> = ref(null);
Expand Down Expand Up @@ -514,6 +523,8 @@ export default defineComponent({
init();
router.replace('/');
data.template = undefined;
} catch (e) {
data.error = e;
} finally {
data.creating = false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/windows/main/pages/SaveViewPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
name="transition-list"
>
<save-view-page-preview-card
v-for="(s, index) of saves"
:key="index"
v-for="s of saves"
:key="s.path"
:source="s"
:delete-save="startDelete"
:export-save="doExport"
Expand Down

0 comments on commit 9f5d731

Please sign in to comment.