Skip to content

Commit

Permalink
fix: adjust UI display on mods and install
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Dec 20, 2020
1 parent cc98d5b commit bfa1cac
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/renderer/assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
"importSave": "Import Save",
"installAssets": {
"": "Install Asset Files",
"assets": "Install Asset {hash}",
"asset": "Install Asset {hash}",
"assetsJson": "Check Assets Index File"
},
"installAuthlibInjector": "Install authlib-injector",
Expand Down Expand Up @@ -524,7 +524,7 @@
"version": "Minecraft Version"
},
"mod": {
"acceptVersion": "Accept Minecraft {version} with loader {loaderVersion}",
"acceptVersion": "Accept Minecraft {version}",
"backToAllMods": "Back to All Mods",
"compatible": "Compatible Mod.",
"deletion": "Deleting Mod",
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/assets/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
"importSave": "Импортировать сохранение",
"installAssets": {
"": "Установить файлы Asset",
"assets": "Установить Asset {hash}",
"asset": "Установить Asset {hash}",
"assetsJson": "Проверить индекс файл Assets"
},
"installAuthlibInjector": "Установить authlib-injector",
Expand Down Expand Up @@ -523,7 +523,7 @@
"version": "Версия Minecraft"
},
"mod": {
"acceptVersion": "Принять Minecraft {version} с загрузчиком {loaderVersion}",
"acceptVersion": "Принять Minecraft {version}",
"backToAllMods": "Вернуться ко всем модам",
"compatible": "Совместимый мод.",
"deletion": "Удаление мода",
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/assets/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
"importSave": "导入存档",
"installAssets": {
"": "下载游戏资源文件",
"assets": "下载资源文件%{hash}",
"asset": "下载资源文件%{hash}",
"assetsJson": "下载资源文件目录"
},
"installAuthlibInjector": "安装 authlib-injector",
Expand Down Expand Up @@ -505,7 +505,7 @@
"version": "Minecraft 版本"
},
"mod": {
"acceptVersion": "需要 Minecraft {version} 和 Forge {loaderVersion}",
"acceptVersion": "需要 Minecraft {version}",
"backToAllMods": "返回所有 Mods",
"compatible": "可用于当前版本。",
"deletion": "删除 Mod",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<v-card
v-draggable-card
v-ripple
color="grey darken-3 draggable-card"
hover
dark
Expand Down
15 changes: 11 additions & 4 deletions src/renderer/windows/main/pages/ModSettingPageCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export default defineComponent({
},
setup(props, context) {
const { minecraft, forge } = useInstanceVersionBase();
const { compatible: mcCompatible } = useCompatible(computed(() => props.source.acceptVersion), minecraft, true);
const { compatible: loaderCompatible } = useCompatible(computed(() => props.source.acceptLoaderVersion), forge, false);
const { compatible: mcCompatible } = useCompatible(computed(() => props.source.dependencies.minecraft), minecraft, true);
const { compatible: loaderCompatible } = useCompatible(computed(() => props.source.dependencies.forge ?? ''), forge, false);
const { open } = useContextMenu();
const { openInBrowser, showItemInDirectory } = useService('BaseService');
const { searchProjectAndRoute, goProjectAndRoute } = useCurseforgeRoute();
Expand Down Expand Up @@ -122,8 +122,15 @@ export default defineComponent({
});
const compatibleText = computed(() => {
let acceptVersionText = $t('mod.acceptVersion', { version: props.source.acceptVersion, loaderVersion: props.source.acceptLoaderVersion });
let compatibleText = compatible.value === 'unknown'
const deps = props.source.dependencies;
let acceptVersionText = $t('mod.acceptVersion', { version: deps.minecraft });
if (deps.forge) {
acceptVersionText += `, Forge ${deps.forge}`;
}
if (deps.fabricLoader) {
acceptVersionText += `, FabricLoader ${deps.fabricLoader}`;
}
const compatibleText = compatible.value === 'unknown'
? $t('mod.nocompatible')
: compatible.value
? $t('mod.compatible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export default defineComponent({
},
})).sort((a, b) => a.name.localeCompare(b.name));
}).finally(() => {
console.log('done');
loading.value = false;
});
function filterItem(r: BlockStateJson) {
Expand Down

0 comments on commit bfa1cac

Please sign in to comment.