Skip to content

Commit

Permalink
feat: optimize jvm display
Browse files Browse the repository at this point in the history
  • Loading branch information
ResetPower committed Feb 10, 2022
1 parent 5adc9fa commit faf7b1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "epherome",
"version": "0.4.1",
"version": "0.4.2",
"description": "Powerful Minecraft Launcher",
"main": "dist/main.js",
"scripts": {
Expand Down
14 changes: 11 additions & 3 deletions src/eph/views/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { fetchNews, NewItem } from "../../common/struct/news";
import { JavaManagementSheet } from "./SettingsPage";
import { ObjectWrapper } from "common/utils/object";
import { historyStore } from "eph/renderer/history";
import { DefaultFn } from "common/utils";
import { apply, DefaultFn } from "common/utils";
import { MinecraftAccount } from "common/struct/accounts";
import { MinecraftProfile } from "common/struct/profiles";
import { openInBrowser } from "common/utils/open";
Expand Down Expand Up @@ -309,8 +309,16 @@ const HomePage = observer(() => {
</TinyButton>
<div className="flex-grow" />
<p className="text-shallow">
{t("java.default")}:{" "}
{_.selected(configStore.javas)?.name ?? t("haveNot")}
Java:{" "}
{apply(_.selected(configStore.javas), (j) =>
j.nickname ? (
<>
{j.nickname} ({j.name})
</>
) : (
j.name
)
) ?? t("haveNot")}
</p>
</div>
</Card>
Expand Down

0 comments on commit faf7b1b

Please sign in to comment.