Compare commits
2 Commits
cal/server
...
cal/dev-21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ef27c3a60 | ||
|
|
e31197f649 |
@@ -76,10 +76,10 @@ const installing = ref(false)
|
|||||||
const onInstall = ref(() => {})
|
const onInstall = ref(() => {})
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
show: (instanceVal, projectVal, projectVersions, callback) => {
|
show: (instanceVal, projectVal, projectVersions, selected, callback) => {
|
||||||
instance.value = instanceVal
|
instance.value = instanceVal
|
||||||
versions.value = projectVersions
|
versions.value = projectVersions
|
||||||
selectedVersion.value = projectVersions[0]
|
selectedVersion.value = selected ?? projectVersions[0]
|
||||||
|
|
||||||
project.value = projectVal
|
project.value = projectVal
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ export const useInstall = defineStore('installStore', {
|
|||||||
setIncompatibilityWarningModal(ref) {
|
setIncompatibilityWarningModal(ref) {
|
||||||
this.incompatibilityWarningModal = ref
|
this.incompatibilityWarningModal = ref
|
||||||
},
|
},
|
||||||
showIncompatibilityWarningModal(instance, project, versions, onInstall) {
|
showIncompatibilityWarningModal(instance, project, versions, selected, onInstall) {
|
||||||
this.incompatibilityWarningModal.show(instance, project, versions, onInstall)
|
this.incompatibilityWarningModal.show(instance, project, versions, selected, onInstall)
|
||||||
},
|
},
|
||||||
setModInstallModal(ref) {
|
setModInstallModal(ref) {
|
||||||
this.modInstallModal = ref
|
this.modInstallModal = ref
|
||||||
@@ -133,7 +133,13 @@ export const install = async (
|
|||||||
callback(version.id)
|
callback(version.id)
|
||||||
} else {
|
} else {
|
||||||
const install = useInstall()
|
const install = useInstall()
|
||||||
install.showIncompatibilityWarningModal(instance, project, projectVersions, callback)
|
install.showIncompatibilityWarningModal(
|
||||||
|
instance,
|
||||||
|
project,
|
||||||
|
projectVersions,
|
||||||
|
version,
|
||||||
|
callback,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const versions = (await get_version_many(project.versions).catch(handleError)).sort(
|
const versions = (await get_version_many(project.versions).catch(handleError)).sort(
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ import {
|
|||||||
ScaleIcon,
|
ScaleIcon,
|
||||||
} from "@modrinth/assets";
|
} from "@modrinth/assets";
|
||||||
import { defineMessages, useVIntl } from "@vintl/vintl";
|
import { defineMessages, useVIntl } from "@vintl/vintl";
|
||||||
import { useLocalStorage } from "@vueuse/core";
|
|
||||||
import ConfettiExplosion from "vue-confetti-explosion";
|
import ConfettiExplosion from "vue-confetti-explosion";
|
||||||
import Fuse from "fuse.js";
|
import Fuse from "fuse.js";
|
||||||
import ModerationQueueCard from "~/components/ui/moderation/ModerationQueueCard.vue";
|
import ModerationQueueCard from "~/components/ui/moderation/ModerationQueueCard.vue";
|
||||||
@@ -215,7 +214,7 @@ watch(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const currentFilterType = useLocalStorage("moderation-current-filter-type", () => "All projects");
|
const currentFilterType = ref("All projects");
|
||||||
const filterTypes: readonly string[] = readonly([
|
const filterTypes: readonly string[] = readonly([
|
||||||
"All projects",
|
"All projects",
|
||||||
"Modpacks",
|
"Modpacks",
|
||||||
@@ -226,7 +225,7 @@ const filterTypes: readonly string[] = readonly([
|
|||||||
"Shaders",
|
"Shaders",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const currentSortType = useLocalStorage("moderation-current-sort-type", () => "Oldest");
|
const currentSortType = ref("Oldest");
|
||||||
const sortTypes: readonly string[] = readonly(["Oldest", "Newest"]);
|
const sortTypes: readonly string[] = readonly(["Oldest", "Newest"]);
|
||||||
|
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
|
|||||||
@@ -72,7 +72,6 @@
|
|||||||
import { DropdownSelect, Button, Pagination } from "@modrinth/ui";
|
import { DropdownSelect, Button, Pagination } from "@modrinth/ui";
|
||||||
import { XIcon, SearchIcon, SortAscIcon, SortDescIcon, FilterIcon } from "@modrinth/assets";
|
import { XIcon, SearchIcon, SortAscIcon, SortDescIcon, FilterIcon } from "@modrinth/assets";
|
||||||
import { defineMessages, useVIntl } from "@vintl/vintl";
|
import { defineMessages, useVIntl } from "@vintl/vintl";
|
||||||
import { useLocalStorage } from "@vueuse/core";
|
|
||||||
import type { Report } from "@modrinth/utils";
|
import type { Report } from "@modrinth/utils";
|
||||||
import Fuse from "fuse.js";
|
import Fuse from "fuse.js";
|
||||||
import type { ExtendedReport } from "@modrinth/moderation";
|
import type { ExtendedReport } from "@modrinth/moderation";
|
||||||
@@ -170,10 +169,10 @@ watch(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const currentFilterType = useLocalStorage("moderation-reports-filter-type", () => "All");
|
const currentFilterType = ref("All");
|
||||||
const filterTypes: readonly string[] = readonly(["All", "Unread", "Read"]);
|
const filterTypes: readonly string[] = readonly(["All", "Unread", "Read"]);
|
||||||
|
|
||||||
const currentSortType = useLocalStorage("moderation-reports-sort-type", () => "Oldest");
|
const currentSortType = ref("Oldest");
|
||||||
const sortTypes: readonly string[] = readonly(["Oldest", "Newest"]);
|
const sortTypes: readonly string[] = readonly(["Oldest", "Newest"]);
|
||||||
|
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user