Refactor controller mod storage into ModStore

Structure the storage of mods on the controller into into a reusable
component in preparation for the host using the same kind of mod storage
to retrieve and cache the mods it needs to run mod packs on instances.
This commit is contained in:
Hornwitser committed 2023-12-03 19:59:14 +01:00
1 parent 448cfbbb51
commit 853866492b
9 files changed
+174 -91

No files matched your search

+2 -2
View File
@@ -132,7 +132,7 @@ export default function ModsPage() {
let [modList] = useModList();
let [modPackList] = useModPackList();
function actions(mod: lib.ModInfo|lib.ModRecord) {
function actions(mod: lib.ModInfo) {
return <Space>
{account.hasPermission("core.mod.download")
&& <Typography.Link
@@ -151,7 +151,7 @@ export default function ModsPage() {
}
{account.hasPermission("core.mod.delete")
&& <Popconfirm
title={`Delete ${mod.name}_${mod.version}.zip?`}
title={`Delete ${mod.filename}?`}
onConfirm={event => {
control.send(
new lib.ModDeleteRequest(mod.name, mod.version)