Compare commits

..
Author SHA1 Message Date
layue13andClaude Sonnet 5.5 f176fbd1fd chore: remove the Java runtime that was committed by mistake and ignore /java/
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (pull_request) Canceled after 0s
A launcher run from the repository root downloads Mojang Java into java/, and it was
picked up by git add -A in e12c7e53f. The files stay in history.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 17:12:22 +08:00
layue13 23811dad7f Merge pull request 'ci: 减少重复构建并加缓存' (#5) from ci/faster-builds into main
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (push) Canceled after 0s
2026-11-08 08:30:18 +00:00
layue13andClaude Sonnet 5.5 e792bfc554 ci: try installing xvfb before refreshing the package index
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (pull_request) Failing after 16s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 16:21:40 +08:00
layue13andClaude Sonnet 5.5 d6b4af2d96 ci: one workflow run per change, cancel superseded runs, cache the Gradle distribution
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (pull_request) Canceled after 0s
Pushes to feature branches built twice (push and pull request) and Check Codes
repeated the compile in a second workflow. Build now runs only on main, tags and
pull requests, cancels older runs of the same ref, folds checkstyle and
checkTranslations into the single Gradle invocation, caches the wrapper download
and skips apt when xvfb is installed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 16:19:50 +08:00
layue13 2a915460ae Merge pull request 'fix: 账号浮层添加账号入口,统一账号页与设置页样式' (#4) from fix/account-add-when-empty into main
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Check Codes / build (push) Successful in 7m28s
Java CI / build (push) Failing after 3h0m3s
2026-11-08 08:18:58 +00:00
layue13andClaude Sonnet 5.5 e9b577f66f style: light cards and lists, sans section titles, hairline outlined buttons, quieter sidebar labels
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (push) Failing after 2m7s
Check Codes / build (push) Successful in 5m52s
Check Codes / build (pull_request) Successful in 7m0s
Java CI / build (pull_request) Failing after 3h0m10s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 16:08:31 +08:00
layue13andClaude Sonnet 5.5 e12c7e53f6 fix: keep the add-account action in the account popup when there are no accounts
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Java CI / build (push) Failing after 2m30s
Check Codes / build (push) Successful in 4m58s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 15:50:52 +08:00
layue13 61caf8a925 Merge pull request 'feat: 服务器专用启动器(一键进服、新界面、精简)' (#3) from feat/server-launcher-redesign into main
Mirror Repository / Mirror to CNB (push) Skipped
Mirror Repository / Mirror to Gitee (push) Skipped
Check Codes / build (push) Canceled after 7m7s
Java CI / build (push) Failing after 3h0m4s
2026-11-08 07:31:54 +00:00
8 changed files with 136 additions and 78 deletions

No files matched your search

-21
View File
@@ -1,21 +0,0 @@
name: Check Codes Comment
# Disabled on this Gitea fork: the upstream flow depends on reviewdog
# (missing from git.nest.potatolab.uk) and a checkstyle-artifact produced by
# check-codes.yml. Re-enable only after those actions are mirrored or the
# comment path is rewritten without reviewdog.
on:
workflow_dispatch:
permissions:
actions: read
contents: read
pull-requests: write
jobs:
comment:
runs-on: ubuntu-latest
if: false
steps:
- name: Disabled
run: echo "check-codes-comment is disabled on this fork"
-35
View File
@@ -1,35 +0,0 @@
name: Check Codes
on:
workflow_dispatch:
push:
paths:
- '**.java'
- '**.properties'
- '.github/workflows/check-codes.yml'
pull_request:
paths:
- '**.java'
- '**.properties'
- '.github/workflows/check-codes.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup JDK 17
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
java-package: 'jdk+fx'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-cleanup: never
# Keep only Gradle checks. reviewdog/action-setup is not mirrored on
# git.nest.potatolab.uk (404), so PR-comment artifact steps are omitted
# for Gitea Actions / act runners.
- name: Check Codes
run: ./gradlew checkstyle checkTranslations --no-daemon --parallel --stacktrace
+29 -4
View File
@@ -1,11 +1,22 @@
name: Java CI
# Pushes to main and pull requests only. A branch with an open pull request used to build twice
# (once for the push, once for the pull request), which kept the runners queued.
on:
push:
branches:
- main
tags:
- '*'
pull_request:
paths-ignore:
- '**.md'
# A newer run for the same pull request or branch replaces the older one.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
@@ -23,12 +34,26 @@ jobs:
uses: gradle/actions/setup-gradle@v5
with:
cache-cleanup: never
# Only main writes the dependency cache; pull requests read it.
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
# The repository's wrapper downloads Gradle itself, so cache that download too.
- name: Cache Gradle distribution
uses: actions/cache@v4
with:
path: |
~/.gradle/wrapper
.gradle/wrapper-neo
key: gradle-dist-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'gradle/wrapper/GradleWrapperNeo.java') }}
- name: Install Xvfb
run: |
sudo apt-get update
sudo apt-get install -y xvfb
- name: Build with Gradle
run: xvfb-run --auto-servernum ./gradlew build --no-daemon --parallel
# Installing is the slowest setup step, so skip it when the runner already has xvfb, and
# only refresh the package index when a plain install fails.
command -v xvfb-run >/dev/null || sudo apt-get install -y --no-install-recommends xvfb \
|| { sudo apt-get update && sudo apt-get install -y --no-install-recommends xvfb; }
# One Gradle run builds, tests and runs the code and translation checks, so the
# project is configured and compiled once instead of in two workflows.
- name: Build and check with Gradle
run: xvfb-run --auto-servernum ./gradlew build checkstyle checkTranslations --no-daemon --parallel
env:
JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
MICROSOFT_AUTH_ID: ${{ secrets.MICROSOFT_AUTH_ID }}
+3
View File
@@ -77,3 +77,6 @@ language-subtag-registry
!/.gemini/config.yaml
.codex
/.gradle-*/
# Managed Java downloaded by the launcher when it is run from the repository root
/java/
@@ -28,7 +28,6 @@ import org.jackhuang.hmcl.util.javafx.MappedObservableList;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.UnmodifiableView;
import java.util.Locale;
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
import static org.jackhuang.hmcl.util.javafx.ExtendedProperties.createSelectedItemPropertyFor;
@@ -78,7 +77,7 @@ public final class AccountListPage extends DecoratorAnimatedPage implements Deco
getSidebar().clear();
getSidebar()
.startCategory(i18n("account.create").toUpperCase(Locale.ROOT))
.startCategory(i18n("account.create"))
.add(offlineItem)
.add(microsoftItem);
@@ -11,6 +11,7 @@ import javafx.beans.binding.BooleanBinding;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import org.jackhuang.hmcl.auth.Account;
import org.jackhuang.hmcl.setting.Accounts;
import org.jackhuang.hmcl.ui.Controllers;
@@ -19,6 +20,8 @@ import org.jackhuang.hmcl.ui.SVG;
import org.jackhuang.hmcl.ui.construct.AdvancedListItem;
import org.jackhuang.hmcl.ui.construct.AdvancedListBox;
import java.util.List;
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
public final class AccountListPopupMenu extends StackPane {
@@ -69,20 +72,6 @@ public final class AccountListPopupMenu extends StackPane {
box.add(item);
}
// Footer actions: add another account, or open the full account page.
AdvancedListItem addItem = footerItem(SVG.ADD_CIRCLE, i18n("account.add"));
addItem.setOnAction(e -> {
hidePopup();
Controllers.dialog(new CreateAccountPane());
});
AdvancedListItem manageItem = footerItem(SVG.SETTINGS, i18n("account.open_manage"));
manageItem.setOnAction(e -> {
hidePopup();
Controllers.navigate(Controllers.getAccountListPage());
});
box.add(addItem);
box.add(manageItem);
// https://github.com/HMCL-dev/HMCL/issues/5343
Platform.runLater(() -> box.setVvalue(0.0));
};
@@ -92,9 +81,31 @@ public final class AccountListPopupMenu extends StackPane {
Label placeholder = new Label(i18n("account.empty"));
placeholder.setStyle("-fx-padding: 10px; -fx-text-fill: -monet-on-surface-variant; -fx-font-style: italic;");
FXUtils.onChangeAndOperate(isEmpty, empty -> {
getChildren().setAll(empty ? placeholder : box);
// Footer actions stay visible even when there is no account yet: add one, or open the full account page.
AdvancedListItem addItem = footerItem(SVG.ADD_CIRCLE, i18n("account.add"));
addItem.setOnAction(e -> {
hidePopup();
// The first account uses the short name dialog; later ones can pick any login method.
if (Accounts.getAccounts().isEmpty()) {
Controllers.dialog(new FirstRunAccountDialog());
} else {
Controllers.dialog(new CreateAccountPane());
}
});
AdvancedListItem manageItem = footerItem(SVG.SETTINGS, i18n("account.open_manage"));
manageItem.setOnAction(e -> {
hidePopup();
Controllers.navigate(Controllers.getAccountListPage());
});
VBox footer = new VBox(addItem, manageItem);
footer.setPrefWidth(220);
VBox content = new VBox();
FXUtils.onChangeAndOperate(isEmpty, empty -> {
footer.getChildren().setAll(empty ? List.of(addItem) : List.of(addItem, manageItem));
content.getChildren().setAll(empty ? List.of(placeholder, footer) : List.of(box, footer));
});
getChildren().setAll(content);
}
}
@@ -135,6 +135,7 @@ public class ComponentList extends Control implements NoPaddingComponent {
{
Label advanced = new Label(title);
advanced.getStyleClass().add("component-list-title");
node.getChildren().setAll(advanced);
}
@@ -2349,3 +2349,78 @@
-fx-pref-height: 18px;
-fx-max-height: 18px;
}
/* ---- Unified list and card styling ---- */
/* Sidebar section labels: small muted text without an underline. */
.class-title {
-fx-font-family: "Noto Sans SC";
-fx-padding: 13px 16px 4px 16px;
}
.class-title Text {
-fx-fill: -monet-on-surface-variant;
}
.class-title Rectangle {
-fx-fill: transparent;
}
/* Cards: a hairline border instead of a drop shadow. */
.card, .card-no-padding, .card-non-transparent {
-fx-background-color: -monet-surface-bright;
-fx-border-color: -monet-outline-variant;
-fx-border-radius: 13px;
-fx-effect: null;
}
/* Icon buttons use a softer ink than body text. */
.toggle-icon4 .svg, .toggle-icon-tiny .svg {
-fx-fill: -monet-on-surface-variant;
}
/* ---- Settings lists ---- */
.component-list-title {
-fx-font-family: "Noto Sans SC";
-fx-font-weight: bold;
-fx-font-size: 14px;
-fx-text-fill: -monet-on-surface;
}
.options-list {
-fx-background-radius: 13px;
-fx-border-color: -monet-outline-variant;
-fx-border-radius: 13px;
-fx-effect: null;
}
.options-list-item {
-fx-background-color: -monet-surface-bright;
}
.options-list-item:first {
-fx-background-radius: 13px 13px 0 0;
}
.options-list-item:last {
-fx-background-radius: 0 0 13px 13px;
}
.options-list-item:first:last {
-fx-background-radius: 13px;
}
/* Sidebar rows: a lighter selected and hover tint. */
.advanced-list-item:selected .rippler-container,
.advanced-list-item .rippler-container:hover {
-fx-background-color: -monet-surface-container-high;
}
/* Outlined buttons: one crisp hairline. */
.jfx-button-border {
-fx-border-color: -monet-outline-variant;
-fx-border-radius: 8px;
-fx-border-width: 1px;
-fx-background-radius: 8px;
-fx-padding: 8px 16px;
}