Skip to content

offline: Nginx start fail issues & local images route & enlarge images#4604

Open
haolloyin wants to merge 2 commits into
halogenandtoast:mainfrom
haolloyin:contrib/offline-20260522
Open

offline: Nginx start fail issues & local images route & enlarge images#4604
haolloyin wants to merge 2 commits into
halogenandtoast:mainfrom
haolloyin:contrib/offline-20260522

Conversation

@haolloyin
Copy link
Copy Markdown
Contributor

  1. Fixed an issue where Nginx failed to start when the offline release package
    was extracted to a directory with spaces in its absolute
    path (e.g., Program Files in Windows).

Enclose path-related configurations in nginx.conf within double quotes.

haolloyin added 2 commits May 22, 2026 20:19
…nt directory

1) Fixed an issue where Nginx failed to start when the offline release package
was extracted to a directory with spaces in its absolute
path (e.g., `Program Files` in Windows).

Enclose path-related configurations in `nginx.conf` within double quotes.

2) Use Nginx to route local image paths from `frontend/dist/img/arkham` to the
directory where `start.sh` is located, making it easier for offline package users
to place high-resolution placeholder images.

**Nginx request processing chain:**

Request for `/img/arkham/cards/01104.avif` (English)
→ 1. alias cards/en/ → Look for `cards/en/01104.avif`
→ 2. @img_builtin    → Look for `frontend/dist/img/arkham/cards/01104.avif`
→ 3. @img_cdn        → Fetch from CDN origin

Request for `/img/arkham/zh/cards/01104.avif` (Chinese)
→ 1. alias cards/zh/ → Look for `cards/zh/01104.avif`
→ 2. @img_builtin    → Look for `frontend/dist/img/arkham/zh/cards/01104.avif`
→ 3. @img_cdn        → Fallback to CDN origin

Users simply need to place card images in the top-level
`cards/en/` or `cards/zh/` directories; existing files
in `frontend/dist/` remain untouched as a fallback.
… option in the settings

1. By default, images from the official CDN do not display a hint icon
in the upper-right corner, unless the user selects this option on the settings page.

**Reason**: Clicking the icon allows users to jump directly to the corresponding
page on `arkhamdb.com` to view card details.

2. Users can select a `+N%` scaling factor in the settings page to proportionally
enlarge in-game hover images.

**Reason**: Users of the offline package feel that local high-resolution images
should be enlarged for better visibility, especially since they have larger
screens and the hover images in the original repository are currently quite small.

__Note__: Both of the above features currently apply only to the `offline` version;
they do not modify the original repository’s source code but are implemented through
modifications or injections during compilation.
@haolloyin
Copy link
Copy Markdown
Contributor Author

  1. Use Nginx to route local image paths from frontend/dist/img/arkham to the
    directory where start.sh is located, making it easier for offline package users
    to place high-resolution placeholder images.

Nginx request processing chain:

Request for /img/arkham/cards/01104.avif (English)
→ 1. alias cards/en/ → Look for cards/en/01104.avif
→ 2. @img_builtin → Look for frontend/dist/img/arkham/cards/01104.avif
→ 3. @img_cdn → Fetch from CDN origin

Request for /img/arkham/zh/cards/01104.avif (Chinese)
→ 1. alias cards/zh/ → Look for cards/zh/01104.avif
→ 2. @img_builtin → Look for frontend/dist/img/arkham/zh/cards/01104.avif
→ 3. @img_cdn → Fallback to CDN origin

Users simply need to place card images in the top-level
cards/en/ or cards/zh/ directories; existing files
in frontend/dist/ remain untouched as a fallback.

@haolloyin
Copy link
Copy Markdown
Contributor Author

  1. By default, images from the official CDN do not display a hint icon
    in the upper-right corner, unless the user selects this option on the settings page.

Reason: Clicking the icon allows users to jump directly to the corresponding
page on arkhamdb.com to view card details.

@haolloyin
Copy link
Copy Markdown
Contributor Author

  1. Users can select a +N% scaling factor in the settings page to proportionally
    enlarge in-game hover images.

Reason: Users of the offline package feel that local high-resolution images
should be enlarged for better visibility, especially since they have larger
screens and the hover images in the original repository are currently quite small.

Note: Both of the above features currently apply only to the offline version;
they do not modify the original repository’s source code but are implemented through
modifications or injections during compilation.

Hi @halogenandtoast, do you think the original repo needs the image zoom feature?
I can modify the source code and submit a PR.

卡图放大-zipic 卡图放大2-zipic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant