diff --git a/README.md b/README.md index 0224584..ab2aeca 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,16 @@ A Windows desktop app for building and maintaining Minecraft modpacks. It create projects and installs real mods from Modrinth, with every change reviewed before it is applied. Awake Launcher is not required. -> **What's new in 1.3.3:** see [docs/releases/v1.3.3.md](docs/releases/v1.3.3.md). +> **What's new in 1.3.4:** see [docs/releases/v1.3.4.md](docs/releases/v1.3.4.md). -**Version 1.3.3 · Windows x64 · English, ไทย, 简体中文, 繁體中文 · GPL-3.0-only** +**Version 1.3.4 · Windows x64 · English, ไทย, 简体中文, 繁體中文 · GPL-3.0-only** ## Install -1. Download `Awake-Modpack-Manager-v1.3.3-Windows-x64-Setup.exe` from the +1. Download `Awake-Modpack-Manager-v1.3.4-Windows-x64-Setup.exe` from the [latest release](https://github.com/awakenginexe/Awake-Modpack-Manager/releases/latest). 2. Optional: check it against `SHA256SUMS.txt` from the same release - (`Get-FileHash .\Awake-Modpack-Manager-v1.3.3-Windows-x64-Setup.exe`). + (`Get-FileHash .\Awake-Modpack-Manager-v1.3.4-Windows-x64-Setup.exe`). 3. Run the installer. It installs for your Windows user only (no administrator rights) into `%LOCALAPPDATA%\Awake Modpack Manager`. The installer is **not code-signed** yet, so Windows SmartScreen may warn that it is from an diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 9745fe3..cc5f55f 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -1,10 +1,10 @@ -# Development checkpoint: Manager 1.3.3 and Native Core 0.4.2 +# Development checkpoint: Manager 1.3.4 and Native Core 0.4.2 -Unreleased until the owner approves the pull request and tags `v1.3.3`. +Unreleased until the owner approves the pull request and tags `v1.3.4`. ## Where things are -- Manager: branch `release/1.3.3`. `npm ci`, then `npm test`, `npm run typecheck`, `cargo test --manifest-path src-tauri/Cargo.toml --lib`. +- Manager: branch `release/1.3.4`. `npm ci`, then `npm test`, `npm run typecheck`, `cargo test --manifest-path src-tauri/Cargo.toml --lib`. - Native Core: Awake Launcher branch `release/3.2.2`. `.github/workflows/native-core-package.yml` builds it with the recorded toolchain and commits a delivery under `native-core/redistribution//`. `scripts/helper-pin.json` pins that delivery. - Release: pushing a version tag runs `.github/workflows/awake-beta.yml`, which builds, verifies, assembles every asset and publishes the release. `SHA256SUMS.txt` is required by in-app updates. diff --git a/docs/releases/v1.3.4.md b/docs/releases/v1.3.4.md new file mode 100644 index 0000000..f1dff0c --- /dev/null +++ b/docs/releases/v1.3.4.md @@ -0,0 +1,16 @@ +# Awake Modpack Manager 1.3.4 + +Works with **Awake Launcher 3.2.2** and newer. Launcher 3.2.4 can rename an instance; this release follows that name. + +## Fixed + +- **A Launcher instance managed here kept its old name after it was renamed in Awake Launcher.** The Manager showed the name it saved when you chose "Manage here". It now shows the name the Launcher has. +- **The instance list refreshes when you come back to the Manager window**, so an instance renamed, added or removed in Awake Launcher shows up without a restart. F5 still refreshes too. + +## Changed + +- **Rename on a Launcher instance explains where to do it.** The disabled menu item now says to rename it in Awake Launcher. The Launcher does not let the Manager rename its instances yet. + +## Not verified on a real machine yet + +The automated tests cover the name. Still unverified: the refresh on window focus in the desktop app against a real Launcher. diff --git a/package-lock.json b/package-lock.json index 121211b..dd391b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "awake-modpack-manager", - "version": "1.3.3", + "version": "1.3.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "awake-modpack-manager", - "version": "1.3.3", + "version": "1.3.4", "license": "GPL-3.0-only", "dependencies": { "@lucide/vue": "1.59.0", diff --git a/package.json b/package.json index 9b32e09..bfd5d64 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "awake-modpack-manager", "private": true, - "version": "1.3.3", + "version": "1.3.4", "license": "GPL-3.0-only", "type": "module", "engines": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 8b100df..46b4eb2 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -224,7 +224,7 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "awake-modpack-manager" -version = "1.3.3" +version = "1.3.4" dependencies = [ "md-5", "serde", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 0bfdab0..5baa2fd 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "awake-modpack-manager" -version = "1.3.3" +version = "1.3.4" description = "Awake Modpack Manager desktop host" license = "GPL-3.0-only" repository = "https://github.com/awakenginexe/Awake-Modpack-Manager" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 0655543..62b033b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "Awake Modpack Manager", - "version": "1.3.3", + "version": "1.3.4", "identifier": "io.github.awakenginexe.AwakeModpackManager", "build": { "frontendDist": "../dist", diff --git a/src/App.vue b/src/App.vue index f13dc39..9b571ea 100644 --- a/src/App.vue +++ b/src/App.vue @@ -148,6 +148,10 @@ function onKey(e: KeyboardEvent) { } function onNativeMenu(e: MouseEvent) { if (!isField(e.target)) e.preventDefault(); } function onDrop(e: DragEvent) { e.preventDefault(); } +/** Coming back from Awake Launcher: pick up instances it renamed, added or removed meanwhile. */ +function onFocus() { if (!session.state.instancesLoading) void session.refreshInstances().catch(() => undefined); } +onMounted(() => addEventListener('focus', onFocus)); +onBeforeUnmount(() => removeEventListener('focus', onFocus)); onMounted(() => { addEventListener('keydown', onKey); addEventListener('contextmenu', onNativeMenu); addEventListener('dragover', onDrop); addEventListener('drop', onDrop); }); onBeforeUnmount(() => { removeEventListener('keydown', onKey); removeEventListener('contextmenu', onNativeMenu); removeEventListener('dragover', onDrop); removeEventListener('drop', onDrop); }); diff --git a/src/backend/composite.ts b/src/backend/composite.ts index ba07d3e..061a308 100644 --- a/src/backend/composite.ts +++ b/src/backend/composite.ts @@ -66,7 +66,8 @@ export function createCompositeBackend(helper: ManagerBackend, launcher: Manager if (!w) return i; owners.instance.set(w.id, parts.helper); sharedOf.set(w.id, i.id); - return { ...w, path: i.path, iconUrl: i.iconUrl, shared: true, launcher: i.launcher, status: i.status === 'ready' ? w.status : i.status }; + // The Launcher owns the name: it can rename the instance, and the helper keeps the name from when it was connected. + return { ...w, name: i.name, path: i.path, iconUrl: i.iconUrl, shared: true, launcher: i.launcher, status: i.status === 'ready' ? w.status : i.status }; }); } const byInstance = (id: string) => owners.instance.get(id) ?? current; diff --git a/src/i18n/en.ts b/src/i18n/en.ts index ad9dbda..4e4bacf 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -716,6 +716,7 @@ export const en = { shareBusyShort: "Working…", shareManagedNotice: "You're managing this pack here, so Awake Launcher can't change its mods.", launcherOwnedHint: "Owned by Awake Launcher. Manage it there.", + renameInLauncherHint: "Rename it in Awake Launcher. The new name shows here.", renameProject: "Rename…", renameConfirm: "Rename", renamedProject: "Renamed to {name}", diff --git a/src/i18n/th.ts b/src/i18n/th.ts index 871417a..a5297a5 100644 --- a/src/i18n/th.ts +++ b/src/i18n/th.ts @@ -718,6 +718,7 @@ export const th: Catalog = { shareBusyShort: "กำลังดำเนินการ…", shareManagedNotice: "คุณกำลังจัดการแพ็กนี้จากที่นี่ Awake Launcher จึงเปลี่ยนม็อดของแพ็กนี้ไม่ได้", launcherOwnedHint: "เป็นของ Awake Launcher จัดการได้ที่นั่น", + renameInLauncherHint: "เปลี่ยนชื่อใน Awake Launcher แล้วชื่อใหม่จะแสดงที่นี่", renameProject: "เปลี่ยนชื่อ…", renameConfirm: "เปลี่ยนชื่อ", renamedProject: "เปลี่ยนชื่อเป็น {name} แล้ว", diff --git a/src/i18n/zh-CN.ts b/src/i18n/zh-CN.ts index a79c063..47bbe91 100644 --- a/src/i18n/zh-CN.ts +++ b/src/i18n/zh-CN.ts @@ -718,6 +718,7 @@ export const zhCN: Catalog = { shareBusyShort: "处理中…", shareManagedNotice: "你正在此处管理此整合包,因此 Awake Launcher 无法更改其模组。", launcherOwnedHint: "归 Awake Launcher 所有,请在其中管理。", + renameInLauncherHint: "请在 Awake Launcher 中重命名,新名称会显示在这里。", renameProject: "重命名…", renameConfirm: "重命名", renamedProject: "已重命名为 {name}", diff --git a/src/i18n/zh-TW.ts b/src/i18n/zh-TW.ts index c59e570..a3c36b5 100644 --- a/src/i18n/zh-TW.ts +++ b/src/i18n/zh-TW.ts @@ -718,6 +718,7 @@ export const zhTW: Catalog = { shareBusyShort: "處理中…", shareManagedNotice: "你正在此處管理此整合包,因此 Awake Launcher 無法變更其模組。", launcherOwnedHint: "屬於 Awake Launcher,請在其中管理。", + renameInLauncherHint: "請在 Awake Launcher 中重新命名,新名稱會顯示在這裡。", renameProject: "重新命名…", renameConfirm: "重新命名", renamedProject: "已重新命名為 {name}", diff --git a/src/views/LibraryView.vue b/src/views/LibraryView.vue index 1543004..bd33907 100644 --- a/src/views/LibraryView.vue +++ b/src/views/LibraryView.vue @@ -163,7 +163,7 @@ function instanceMenu(inst: InstanceSummary): MenuItem[] { separator, { label: t('openFolder'), icon: FolderOpen, disabled: !helper.value, action: () => session.backend.openFolder?.(inst.id) }, ...(inst.path ? [{ label: t('copyPath'), icon: Copy, action: () => copyText(inst.path!) }] : []), - { label: t('renameProject'), icon: Pencil, disabled: !helper.value || !session.can('instances.rename'), hint: helper.value ? undefined : t('launcherOwnedHint'), action: () => rename(inst) }, + { label: t('renameProject'), icon: Pencil, disabled: !helper.value || !session.can('instances.rename'), hint: helper.value ? undefined : t('renameInLauncherHint'), action: () => rename(inst) }, separator, { label: t('deleteProject'), icon: Trash2, danger: true, disabled: !canDelete, hint: canDelete ? undefined : t('launcherOwnedHint'), action: () => removeInstances([inst]) }, ]; diff --git a/tests/sharedInstances.test.ts b/tests/sharedInstances.test.ts index a61ce2e..e1c2703 100644 --- a/tests/sharedInstances.test.ts +++ b/tests/sharedInstances.test.ts @@ -62,6 +62,12 @@ describe('connected Launcher instances', () => { expect(list[0]).toMatchObject({ shared: true, modCount: 392, iconUrl: 'data:image/png;base64,AA==', path: 'E:/launcher/instances/Pack' }); }); + it('shows the name the Launcher has now, not the one saved when it was connected', async () => { + const { composite, launcher } = await connected(); + launcher.listInstances = async () => [summary({ id: 'launcher-pack', name: 'Pack 1.3.0', path: 'E:/launcher/instances/Pack' })]; + expect((await listOn(composite, 'launcher'))[0]).toMatchObject({ id: 'helper-pack', name: 'Pack 1.3.0' }); + }); + it('keeps connected instances off the Manager projects list', async () => { const { composite } = await connected(); expect((await listOn(composite, 'helper')).map((i) => i.id)).toEqual(['project']);