Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0:** see [docs/releases/v1.4.0.md](docs/releases/v1.4.0.md).
> **What's new in 1.4.1:** see [docs/releases/v1.4.1.md](docs/releases/v1.4.1.md).

**Version 1.4.0 · Windows x64 · English, ไทย, 简体中文, 繁體中文 · GPL-3.0-only**
**Version 1.4.1 · Windows x64 · English, ไทย, 简体中文, 繁體中文 · GPL-3.0-only**

## Install

1. Download `Awake-Modpack-Manager-v1.4.0-Windows-x64-Setup.exe` from the
1. Download `Awake-Modpack-Manager-v1.4.1-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.4.0-Windows-x64-Setup.exe`).
(`Get-FileHash .\Awake-Modpack-Manager-v1.4.1-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
Expand Down
6 changes: 3 additions & 3 deletions docs/HANDOFF.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Development checkpoint: Manager 1.4.0 and Native Core 0.4.2
# Development checkpoint: Manager 1.4.1 and Native Core 0.4.2

Unreleased until the owner approves the pull request and tags `v1.4.0`.
Unreleased until the owner approves the pull request and tags `v1.4.1`.

## Where things are

- Manager: branch `release/1.4.0`. `npm ci`, then `npm test`, `npm run typecheck`, `cargo test --manifest-path src-tauri/Cargo.toml --lib`.
- Manager: branch `release/1.4.1`. `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/<commit12>/`. `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.

Expand Down
20 changes: 20 additions & 0 deletions docs/releases/v1.4.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Awake Modpack Manager 1.4.1

Works with **Awake Launcher 3.2.2** and newer.

## New

- **YouTube videos play on a project's page.** A YouTube video embedded in a mod, resource pack or shader description now plays in the project window. Other embedded pages are shown as a link; clicking it asks first, then opens it in your browser.
- **Your search stays when you come back.** What you typed on Browse (mods, resource packs and shaders, each separately) is kept while the Manager is open, so switching to another page and back no longer clears it.

## Fixed

- **Blurry screenshots on Modrinth project pages.** The large preview used Modrinth's small thumbnail; it now loads the original image. The strip under it still uses the small one, on both sites.

## Safety

Only YouTube can play inside the Manager. The player address is rebuilt from the video's id (the author's address is never used as is), it uses YouTube's no-cookie domain, runs in a sandbox that cannot navigate the Manager's window, and the app's content policy allows frames from that one domain only.

## Not verified on a real machine yet

Checked with the automated tests and the built-in demo data. Still unverified in the desktop app: a real YouTube video playing in the project window, and full-size Modrinth screenshots.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "awake-modpack-manager",
"private": true,
"version": "1.4.0",
"version": "1.4.1",
"license": "GPL-3.0-only",
"type": "module",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "awake-modpack-manager"
version = "1.4.0"
version = "1.4.1"
description = "Awake Modpack Manager desktop host"
license = "GPL-3.0-only"
repository = "https://github.com/awakenginexe/Awake-Modpack-Manager"
Expand Down
27 changes: 19 additions & 8 deletions src-tauri/src/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,11 +1032,21 @@ pub struct ProjectDetail {
/// The window renders it through an allowlist; nothing here is trusted.
body: String,
body_format: &'static str,
gallery: Vec<String>,
gallery: Vec<Shot>,
}
/// Screenshots, at most 12, and only from https.
fn gallery(list: &Value, key: &str) -> Vec<String> {
list.as_array().map_or(vec![], |g| g.iter().filter_map(|x| x[key].as_str()).filter(|u| u.starts_with("https://")).take(12).map(String::from).collect())
#[derive(serde::Serialize, Debug, PartialEq)]
pub struct Shot {
full: String,
thumb: String,
}
/// Screenshots, at most 12, and only from https: the full image for the big view, the site's small one for the strip.
fn gallery(list: &Value, full: &str, thumb: &str) -> Vec<Shot> {
let https = |v: &Value| v.as_str().filter(|u| u.starts_with("https://")).map(String::from);
list.as_array().map_or(vec![], |g| g.iter().filter_map(|x| {
let small = https(&x[thumb]);
let big = https(&x[full]).or(small.clone())?;
Some(Shot { thumb: small.unwrap_or(big.clone()), full: big })
}).take(12).collect())
}

pub fn parse_modrinth_detail(p: &Value, members: &Value) -> ProjectDetail {
Expand All @@ -1051,7 +1061,8 @@ pub fn parse_modrinth_detail(p: &Value, members: &Value) -> ProjectDetail {
page_url: Some(format!("https://modrinth.com/{}/{}", p["project_type"].as_str().filter(|t| ["resourcepack", "shader"].contains(t)).unwrap_or("mod"), s(p, "slug"))),
body: s(p, "body").into(),
body_format: "markdown",
gallery: gallery(&p["gallery"], "url"),
// Modrinth's `url` is a 350px webp; `raw_url` is the uploaded original.
gallery: gallery(&p["gallery"], "raw_url", "url"),
}
}
pub fn parse_curseforge_detail(p: &Value, description: &str) -> ProjectDetail {
Expand All @@ -1065,7 +1076,7 @@ pub fn parse_curseforge_detail(p: &Value, description: &str) -> ProjectDetail {
page_url: p["links"]["websiteUrl"].as_str().filter(|u| u.starts_with("https://")).map(Into::into),
body: description.into(),
body_format: "html",
gallery: gallery(&p["screenshots"], "url"),
gallery: gallery(&p["screenshots"], "url", "thumbnailUrl"),
}
}

Expand Down Expand Up @@ -1189,9 +1200,9 @@ mod tests {

#[test]
fn project_details_read_both_providers() {
let m = parse_modrinth_detail(&json!({"slug": "sodium", "description": "Fast", "downloads": 5.0, "updated": "2026-01-01T00:00:00Z", "license": {"id": "LGPL-3.0"}, "categories": ["optimization"], "project_type": "shader", "body": "# Hi", "gallery": [{"url": "https://cdn.modrinth.com/a.png"}, {"url": "http://plain/b.png"}]}), &json!([{"role": "Member", "user": {"username": "b"}}, {"role": "Owner", "user": {"username": "jelly"}}]));
let m = parse_modrinth_detail(&json!({"slug": "sodium", "description": "Fast", "downloads": 5.0, "updated": "2026-01-01T00:00:00Z", "license": {"id": "LGPL-3.0"}, "categories": ["optimization"], "project_type": "shader", "body": "# Hi", "gallery": [{"url": "https://cdn.modrinth.com/a_350.webp", "raw_url": "https://cdn.modrinth.com/a.png"}, {"url": "http://plain/b.png"}]}),&json!([{"role": "Member", "user": {"username": "b"}}, {"role": "Owner", "user": {"username": "jelly"}}]));
assert_eq!((m.author.as_str(), m.license.as_deref(), m.page_url.as_deref()), ("jelly", Some("LGPL-3.0"), Some("https://modrinth.com/shader/sodium")));
assert_eq!((m.body.as_str(), m.body_format, m.gallery), ("# Hi", "markdown", vec!["https://cdn.modrinth.com/a.png".to_string()]));
assert_eq!((m.body.as_str(), m.body_format, m.gallery), ("# Hi", "markdown", vec![Shot { full: "https://cdn.modrinth.com/a.png".into(), thumb: "https://cdn.modrinth.com/a_350.webp".into() }]));
let c = parse_curseforge_detail(&json!({"authors": [{"name": "mezz"}], "summary": "Items", "downloadCount": 9.0, "categories": [{"name": "API"}], "links": {"websiteUrl": "https://www.curseforge.com/minecraft/mc-mods/jei"}, "screenshots": [{"url": "https://media.forgecdn.net/s.png"}]}), "<p>Items</p>");
assert_eq!((c.body.as_str(), c.body_format, c.gallery.len()), ("<p>Items</p>", "html", 1));
assert_eq!((c.author.as_str(), c.categories.len(), c.downloads), ("mezz", 1, Some(9.0)));
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "Awake Modpack Manager",
"version": "1.4.0",
"version": "1.4.1",
"identifier": "io.github.awakenginexe.AwakeModpackManager",
"build": {
"frontendDist": "../dist",
Expand All @@ -25,7 +25,7 @@
}
],
"security": {
"csp": "default-src 'self'; img-src 'self' data: https:; style-src 'self' 'unsafe-inline'; font-src 'self'; connect-src ipc: http://ipc.localhost",
"csp": "default-src 'self'; img-src 'self' data: https:; style-src 'self' 'unsafe-inline'; font-src 'self'; connect-src ipc: http://ipc.localhost; frame-src https://www.youtube-nocookie.com",
"devCsp": null
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/backend/host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BackendError, type AddedContent, type ContentEntry, type ContentImage,
export interface FetchedPack { token: string; format: 'mrpack' | 'curseforge'; size: number; sha256: string; notes: string[] }
export interface ProjectMeta { provider: ProviderId; projectId: string; name: string; iconUrl?: string; restricted?: boolean; pageUrl?: string }
export interface ModUpdate { provider: ProviderId; projectId: string; installedVersionId: string; candidate: { id: string; name: string; releaseType: 'release' | 'beta' | 'alpha' } | null }
export interface ProjectDetail { author: string; summary: string; downloads: number | null; updatedAt: string | null; license: string | null; categories: string[]; pageUrl: string | null; body?: string; bodyFormat?: 'markdown' | 'html'; gallery?: string[] }
export interface ProjectDetail { author: string; summary: string; downloads: number | null; updatedAt: string | null; license: string | null; categories: string[]; pageUrl: string | null; body?: string; bodyFormat?: 'markdown' | 'html'; gallery?: { full: string; thumb: string }[] }
export interface ProjectRef { provider: ProviderId; projectId: string; versionId?: string }

/**
Expand Down
4 changes: 2 additions & 2 deletions src/backend/mock/MockBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ export class MockBackend implements ManagerBackend {
bodyFormat: provider === 'curseforge' ? 'html' as const : 'markdown' as const,
body: provider === 'curseforge'
? '<h2>About</h2><p>A <strong>demo</strong> page written as HTML.</p><ul><li>One thing</li><li>Another</li></ul><script>window.bad = 1</script>'
: '# About\n\nA **demo** page written as Markdown, with a [link](https://example.com/).\n\n## Features\n\n- One thing\n- Another\n\n```\n/give @s demo\n```',
gallery: [shot(seed % 360), shot((seed + 120) % 360), shot((seed + 240) % 360)],
: '# About\n\nA **demo** page written as Markdown, with a [link](https://example.com/).\n\n## Features\n\n- One thing\n- Another\n\n```\n/give @s demo\n```\n\n## Showcase\n\n<iframe src="https://www.youtube.com/embed/jNQXAC9IVRw"></iframe>\n\n<iframe src="https://example.com/trailer"></iframe>',
gallery: [seed, seed + 120, seed + 240].map((h) => ({ full: shot(h % 360), thumb: shot(h % 360) })),
};
}

Expand Down
14 changes: 10 additions & 4 deletions src/components/ProjectDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { ProjectDetail } from '../backend/host';
import { formatDate, formatNumber, t } from '../i18n';
import { openExternal } from '../state/appUpdate';
import { useSession } from '../state/session';
import { confirmDialog } from '../ui/desktop';
import { renderRich } from '../ui/richText';
import Avatar from './Avatar.vue';
import ProviderLogo from './ProviderLogo.vue';
Expand Down Expand Up @@ -42,7 +43,10 @@ function onBodyClick(event: MouseEvent) {
const link = (event.target as HTMLElement).closest('a');
if (!link) return;
event.preventDefault();
void openExternal(link.href);
if (link.dataset.embed === undefined) { void openExternal(link.href); return; }
const host = new URL(link.href).host;
void confirmDialog({ title: t('detailEmbedTitle'), body: t('detailEmbedBody', { host }), details: [link.href], confirm: t('detailEmbedConfirm'), cancel: t('cancel') })
.then((ok) => { if (ok) void openExternal(link.href); });
}
</script>

Expand All @@ -68,10 +72,10 @@ function onBodyClick(event: MouseEvent) {
<div v-if="detail?.categories.length" class="tags"><span v-for="c in detail.categories.slice(0, 10)" :key="c" class="chip">{{ c }}</span></div>

<section v-if="gallery.length" class="gallery" :aria-label="t('detailGallery')">
<img class="hero" :src="gallery[shot]" alt="" referrerpolicy="no-referrer" />
<img class="hero" :src="gallery[shot]?.full" alt="" referrerpolicy="no-referrer" />
<div v-if="gallery.length > 1" class="thumbs">
<button v-for="(g, i) in gallery" :key="g" type="button" class="thumb" :class="{ active: i === shot }" :aria-label="t('detailShot', { n: i + 1 })" :aria-pressed="i === shot" @click="shot = i">
<img :src="g" alt="" loading="lazy" referrerpolicy="no-referrer" />
<button v-for="(g, i) in gallery" :key="g.full" type="button" class="thumb" :class="{ active: i === shot }" :aria-label="t('detailShot', { n: i + 1 })" :aria-pressed="i === shot" @click="shot = i">
<img :src="g.thumb" alt="" loading="lazy" referrerpolicy="no-referrer" />
</button>
</div>
</section>
Expand Down Expand Up @@ -119,6 +123,8 @@ function onBodyClick(event: MouseEvent) {
.rich :deep(p), .rich :deep(ul), .rich :deep(ol), .rich :deep(blockquote), .rich :deep(pre), .rich :deep(table) { margin: 0 0 0.8em; }
.rich :deep(ul), .rich :deep(ol) { padding-left: 1.4em; }
.rich :deep(img) { max-width: 100%; height: auto; border-radius: 6px; }
.rich :deep(iframe.video) { display: block; width: 100%; max-width: 720px; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; background: rgba(0, 0, 0, 0.35); margin: 0 0 0.8em; }
.rich :deep(a.embed-link) { display: inline-flex; padding: 8px 12px; margin: 0 0 0.8em; border: 1px solid var(--border-subtle); border-radius: 8px; background: rgba(255, 255, 255, 0.04); text-decoration: none; }
.rich :deep(a) { color: #7dd3fc; text-decoration: underline; text-underline-offset: 2px; }
.rich :deep(code) { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: rgba(255, 255, 255, 0.08); padding: 1px 5px; border-radius: 4px; }
.rich :deep(pre) { background: rgba(0, 0, 0, 0.35); padding: 12px; border-radius: 8px; overflow-x: auto; }
Expand Down
4 changes: 4 additions & 0 deletions src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,10 @@ export const en = {
detailGallery: "Screenshots",
detailShot: "Screenshot {n}",
detailNoBody: "This project has no description on its page.",
detailEmbedOpen: "Embedded content from {host}: open in browser",
detailEmbedTitle: "Open this in your browser?",
detailEmbedBody: "The description embeds a page from {host}. Only YouTube videos play inside the Manager; this one opens in your browser.",
detailEmbedConfirm: "Open in browser",
} as const;

export type MessageKey = keyof typeof en;
Expand Down
4 changes: 4 additions & 0 deletions src/i18n/th.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,4 +815,8 @@ export const th: Catalog = {
detailGallery: "ภาพหน้าจอ",
detailShot: "ภาพหน้าจอ {n}",
detailNoBody: "โปรเจกต์นี้ไม่มีคำอธิบายบนหน้าเว็บ",
detailEmbedOpen: "เนื้อหาฝังจาก {host}: เปิดในเบราว์เซอร์",
detailEmbedTitle: "เปิดในเบราว์เซอร์ไหม?",
detailEmbedBody: "คำอธิบายนี้ฝังหน้าเว็บจาก {host} ไว้ ตัวจัดการเล่นได้เฉพาะวิดีโอ YouTube ภายในแอป ลิงก์นี้จะเปิดในเบราว์เซอร์ของคุณ",
detailEmbedConfirm: "เปิดในเบราว์เซอร์",
};
4 changes: 4 additions & 0 deletions src/i18n/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,4 +815,8 @@ export const zhCN: Catalog = {
detailGallery: "截图",
detailShot: "截图 {n}",
detailNoBody: "此项目的页面上没有说明。",
detailEmbedOpen: "来自 {host} 的嵌入内容:在浏览器中打开",
detailEmbedTitle: "在浏览器中打开?",
detailEmbedBody: "说明中嵌入了来自 {host} 的页面。管理器内只播放 YouTube 视频,此链接将在浏览器中打开。",
detailEmbedConfirm: "在浏览器中打开",
};
4 changes: 4 additions & 0 deletions src/i18n/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,4 +815,8 @@ export const zhTW: Catalog = {
detailGallery: "螢幕截圖",
detailShot: "螢幕截圖 {n}",
detailNoBody: "此專案的頁面上沒有說明。",
detailEmbedOpen: "來自 {host} 的嵌入內容:在瀏覽器中開啟",
detailEmbedTitle: "在瀏覽器中開啟?",
detailEmbedBody: "說明中嵌入了來自 {host} 的頁面。管理器內只播放 YouTube 影片,此連結將在瀏覽器中開啟。",
detailEmbedConfirm: "在瀏覽器中開啟",
};
4 changes: 3 additions & 1 deletion src/state/nav.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { ref, shallowRef } from 'vue';
import { reactive, ref, shallowRef } from 'vue';
import type { ContentArea, ContentKind } from '../backend/contract';

/** What Browse is showing: mods go through a reviewed plan, resource packs and shaders install directly. */
export type BrowseKind = 'mod' | ContentKind;
export const browseKind = ref<BrowseKind>('mod');
/** What was typed in each Browse search, kept while the app runs so leaving the screen doesn't clear it. */
export const browseText = reactive<Record<BrowseKind, string>>({ mod: '', resourcepack: '', shader: '' });

/**
* Set by a screen that may hold unsaved work (the file editor). Asked before another screen
Expand Down
Loading
Loading