Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"publish-win": "quasar build --mode electron -T win32 --publish always",
"publish-linux": "quasar build --mode electron -T linux --publish always",
"test": "vitest run ./test/vitest",
"typecheck": "tsc"
"typecheck": "vue-tsc"
},
"dependencies": {
"@node-steam/vdf": "^2.1.0",
Expand Down Expand Up @@ -100,12 +100,12 @@
"sass": "^1.70.0",
"sass-loader": "^16.0.5",
"sinon": "^11.1.1",
"tsc": "^2.0.4",
"tsx": "^4.20.5",
"typescript": "^5.9.2",
"vite-plugin-node-polyfills": "^0.23.0",
"vitest": "^3.2.4",
"vue": "^3.5.16",
"vue-tsc": "^3.3.5",
"wallaby-vue-compiler": "^1.0.3"
},
"engines": {
Expand Down
74 changes: 64 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src-electron/ipc/node-path-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export function hookPathIpc(browserWindow: BrowserWindow) {
ipcMain.on("node:path:join", (event, ...args) => {
event.returnValue = path.join(...args);
});
ipcMain.on("node:path:basename", (event, toResolve) => {
event.returnValue = path.basename(toResolve);
ipcMain.on("node:path:basename", (event, base, suffix) => {
event.returnValue = path.basename(base, suffix);
});
ipcMain.on("node:path:resolve", (event, ...args) => {
event.returnValue = path.resolve(...args);
Expand Down
2 changes: 1 addition & 1 deletion src/components/DeferredInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ function emitChange(value: string): void {
</script>

<template>
<input class="input" :value="modelValue" @input="e => debounceExecutor(e.target.value)" />
<input class="input" :value="modelValue" @input="e => debounceExecutor((e.target! as HTMLInputElement).value!)" />
</template>
3 changes: 1 addition & 2 deletions src/components/Progress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ type ProgressProps = {

const props = withDefaults(defineProps<ProgressProps>(), {
max: 100,
value: undefined,
className: []
className: () => [] as string[]
});
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/components/buttons/DonateButton.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<ExternalLink v-if="mod && mod.getDonationLink()"
:url="mod.getDonationLink()"
:url="mod.getDonationLink()!"
class="button"
v-tooltip.top="{content: 'Donate to the mod author', distance: 10}">
<i class='fas fa-heart margin-right margin-right--half-width'></i>
Expand Down
2 changes: 1 addition & 1 deletion src/components/buttons/DonateIconButton.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<span v-if="mod && mod.getDonationLink() && extraRenderCondition" class="card-header-icon">
<ExternalLink :url="mod.getDonationLink()" tag="span">
<ExternalLink :url="mod.getDonationLink()!" tag="span">
<i class="fas fa-heart" v-tooltip.left="'Donate to the mod author'"></i>
</ExternalLink>
</span>
Expand Down
22 changes: 11 additions & 11 deletions src/components/importing/LocalFileImportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async function selectFile() {
filters: []
}).then(value => {
if (value.length > 0) {
fileToImport.value = value[0];
fileToImport.value = value[0]!;
assumeDefaults();
} else {
waitingForSelection.value = false;
Expand Down Expand Up @@ -228,28 +228,28 @@ function inferFieldValuesFromFile(file: string): ImportFieldAttributes {
}

if (hyphenSeparated.length === 3) {
data.modAuthor = hyphenSeparated[0];
data.modName = hyphenSeparated[1];
const modVersion = santizeVersionNumber(hyphenSeparated[2]).toString().split(".");
data.modAuthor = hyphenSeparated[0]!;
data.modName = hyphenSeparated[1]!;
const modVersion = santizeVersionNumber(hyphenSeparated[2]!).toString().split(".");
data.modVersionMajor = Number(modVersion[0]);
data.modVersionMinor = Number(modVersion[1]);
data.modVersionPatch = Number(modVersion[2]);
} else if (hyphenSeparated.length === 2) {
data.modName = hyphenSeparated[0];
const modVersion = santizeVersionNumber(hyphenSeparated[1]).toString().split(".");
data.modName = hyphenSeparated[0]!;
const modVersion = santizeVersionNumber(hyphenSeparated[1]!).toString().split(".");
data.modVersionMajor = Number(modVersion[0]);
data.modVersionMinor = Number(modVersion[1]);
data.modVersionPatch = Number(modVersion[2]);
} else if (underscoreSeparated.length === 3) {
data.modAuthor = underscoreSeparated[0];
data.modName = underscoreSeparated[1];
const modVersion = santizeVersionNumber(underscoreSeparated[2]).toString().split(".");
data.modAuthor = underscoreSeparated[0]!;
data.modName = underscoreSeparated[1]!;
const modVersion = santizeVersionNumber(underscoreSeparated[2]!).toString().split(".");
data.modVersionMajor = Number(modVersion[0]);
data.modVersionMinor = Number(modVersion[1]);
data.modVersionPatch = Number(modVersion[2]);
} else if (underscoreSeparated.length === 2) {
data.modName = underscoreSeparated[0];
const modVersion = santizeVersionNumber(underscoreSeparated[1]).toString().split(".");
data.modName = underscoreSeparated[0]!;
const modVersion = santizeVersionNumber(underscoreSeparated[1]!).toString().split(".");
data.modVersionMajor = Number(modVersion[0]);
data.modVersionMinor = Number(modVersion[1]);
data.modVersionPatch = Number(modVersion[2]);
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/MultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const visibleSelectedOptions = computed(() => {
return props.selected.filter(value => value.trim().length > 0);
})

function updateSelection(event: InputEvent) {
function updateSelection(event: Event) {
const target = event.target as HTMLSelectElement;
emits('selection-changed', [...props.selected, target.value]);
target.selectedIndex = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/components/modals/CategorySelectorModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ type CategorySelectorModalProps = {
const props = defineProps<CategorySelectorModalProps>();
const emits = defineEmits<{
'selected-category': [ev: Event];
'deselectedCategory': [value: string];
'deselected-category': [value: string];
}>();

function emitSelected(event: Event) {
emits('selected-category', event)
}

function emitDeselected(key: string) {
emits("deselected-category", key);
emits('deselected-category', key);
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/components/modals/ErrorModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ function close() {
<h5 class="title is-5">Suggestion</h5>
<p>{{solution}}</p>
</div>
<div class="mt-3 text-right" v-if="error.action">
<button class="button is-white" @click="() => { error.action.function(); close(); }">
<div class="mt-3 text-right" v-if="error && error.action">
<button class="button is-white" @click="() => { error?.action?.function(); close(); }">
{{error.action.label}}
</button>
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/components/profiles-modals/ImportProfileModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ async function validateProfileFile(files: string[] | null) {
return;
}

const selectedFile = files[0]!;

try {
const yamlContent = await ProfileUtils.readProfileFile(files[0]);
const yamlContent = await ProfileUtils.readProfileFile(selectedFile);
profileImportContent.value = await ProfileUtils.parseYamlToExportFormat(yamlContent);
profileMods.value = await ProfileUtils.exportModsToCombos(
profileImportContent.value.getMods(),
Expand All @@ -156,7 +158,7 @@ async function validateProfileFile(files: string[] | null) {
return;
}

profileImportFilePath.value = files[0];
profileImportFilePath.value = selectedFile;

if (profileMods.value.unknown.length > 0) {
// Sometimes the reason some packages are unknown is that
Expand Down
2 changes: 1 addition & 1 deletion src/components/profiles-modals/RenameProfileModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ watchEffect(() => {

function closeModal() {
renamingInProgress.value = false;
newProfileName.value = store.state.profile.activeProfile.getProfileName();
newProfileName.value = store.state.profile.activeProfile!.getProfileName();
store.commit('closeRenameProfileModal');
}

Expand Down
8 changes: 2 additions & 6 deletions src/components/settings-components/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,13 @@ import CdnProvider from '../../providers/generic/connection/CdnProvider';
import { computed, getCurrentInstance, onMounted, ref, watch } from 'vue';
import { getStore } from '../../providers/generic/store/StoreProvider';
import { State } from '../../store';
import VueRouter from 'vue-router';
import {getLaunchType, LaunchType} from "../../model/real_enums/launch/LaunchType";
import {LaunchTypeModalOpen} from "../../components/modals/launch-type/LaunchTypeRefs";
import appWindow from '../../providers/node/app/app_window';
import { useRouter } from 'vue-router';

const store = getStore<State>();
let router!: VueRouter;

onMounted(() => {
router = getCurrentInstance()!.proxy.$router;
})
const router = useRouter();

const activeTab = ref<string>('All');
const tabs = ref<string[]>(['All', 'Profile', 'Locations', 'Debugging', 'Modpacks', 'Other']);
Expand Down
Loading
Loading