Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: 添加"关闭启动时的更新弹窗"功能 #4706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MindsMaster wants to merge 1 commit into HMCL-dev:main
base: main
Choose a base branch
Loading
from MindsMaster:main
Open
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
15 changes: 15 additions & 0 deletions HMCL/src/main/java/org/jackhuang/hmcl/setting/Config.java
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,21 @@ public void setAcceptPreviewUpdate(boolean acceptPreviewUpdate) {
this.acceptPreviewUpdate.set(acceptPreviewUpdate);
}

@SerializedName("disableStartupUpdateDialog")
private final BooleanProperty disableStartupUpdateDialog = new SimpleBooleanProperty(false);

public BooleanProperty disableStartupUpdateDialogProperty() {
return disableStartupUpdateDialog;
}

public boolean isDisableStartupUpdateDialog() {
return disableStartupUpdateDialog.get();
}

public void setDisableStartupUpdateDialog(boolean disableStartupUpdateDialog) {
this.disableStartupUpdateDialog.set(disableStartupUpdateDialog);
}

@SerializedName("shownTips")
private final ObservableMap<String, Object> shownTips = FXCollections.observableHashMap();

Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public void accept(String currentGame) {
private void showUpdate(boolean show) {
doAnimation(show);

if (show && getLatestVersion() != null && !Objects.equals(config().getPromptedVersion(), getLatestVersion().getVersion())) {
if (show && getLatestVersion() != null && !Objects.equals(config().getPromptedVersion(), getLatestVersion().getVersion()) && !config().isDisableStartupUpdateDialog()) {
Controllers.dialog(new MessageDialogPane.Builder("", i18n("update.bubble.title", getLatestVersion().getVersion()), MessageDialogPane.MessageType.INFO)
.addAction(i18n("button.view"), () -> {
config().setPromptedVersion(getLatestVersion().getVersion());
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public SettingsPage() {
selectedItemPropertyFor(cboLanguage).bindBidirectional(config().localizationProperty());

disableAutoGameOptionsPane.selectedProperty().bindBidirectional(config().disableAutoGameOptionsProperty());
disableStartupUpdateNotificationPane.selectedProperty().bindBidirectional(config().disableStartupUpdateDialogProperty());
// ====

fileCommonLocation.selectedDataProperty().bindBidirectional(config().commonDirTypeProperty());
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public abstract class SettingsView extends StackPane {
protected final JFXRadioButton chkUpdateDev;
protected final JFXButton btnUpdate;
protected final OptionToggleButton previewPane;
protected final OptionToggleButton disableStartupUpdateNotificationPane;
protected final ScrollPane scroll;

public SettingsView() {
Expand Down Expand Up @@ -157,6 +158,13 @@ public SettingsView() {
settingsPane.getContent().add(previewPane);
}

{
disableStartupUpdateNotificationPane = new OptionToggleButton();
disableStartupUpdateNotificationPane.setTitle(i18n("update.disable_startup_update_dialog"));

settingsPane.getContent().add(disableStartupUpdateNotificationPane);
}

{
fileCommonLocation = new MultiFileItem<>();
fileCommonLocationSublist = new ComponentSublist();
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N.properties
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,7 @@ update.no_browser=Cannot open in system browser. But we copied the link to your
update.tooltip=Update
update.preview=Preview HMCL releases early
update.preview.tooltip=Enable this option to receive new versions of HMCL early for testing before their official release.
update.disable_startup_update_dialog=Disable update dialog on startup

version=Games
version.name=Instance Name
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_es.properties
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,7 @@ update.no_browser=No se puede abrir en el navegador del sistema. Pero, hemos cop
update.tooltip=Actualización
update.preview=Vista previa de actualizaciones anticipadas
update.preview.tooltip=Activa esta opción para recibir nuevas versiones del lanzador antes de su lanzamiento oficial para probarlas
update.disable_startup_update_dialog=Desactivar diálogo de actualización al iniciar

version=Juegos
version.name=Nombre de instancia
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_ja.properties
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ update.note=警告:ベータ版には、より多くの機能とバグ修正
update.latest=これは最新バージョンです。
update.no_browser=ブラウザを開くことができません。リンクがクリップボードにコピーされました。ブラウザのアドレスバーに貼り付けて更新します。
update.tooltip=更新
update.disable_startup_update_dialog=起動時の更新ダイアログを無効にする

version=ゲーム
version.cannot_read=ゲームのバージョンが見つかりません。自動インストールを続行できません。
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_lzh.properties
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,7 @@ update.note=开發版與預版,虽增功、修阙,然亦恐生他患。
update.latest=當版至新
update.no_browser=無啟瀏覽器。址固鈔訖,君可自粘之以啟頁。
update.tooltip=迭更
update.disable_startup_update_dialog=關啟時之迭更窗

version=戲
version.name=戲例之名
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_ru.properties
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,7 @@ update.note=Предупреждение: Бета-версии могут им
update.latest=Это последняя версия.
update.no_browser=Не удалось открыть браузер. Ссылка была скопирована в буфер обмена. Вставьте его в адресную строку браузера для обновления.
update.tooltip=Обновить
update.disable_startup_update_dialog=Отключить диалог обновления при запуске

version=Игры
version.name=Название сборки
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_uk.properties
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,7 @@ update.note=Канали Бета та Нічний можуть мати біл
update.latest=Це остання версія
update.no_browser=Не вдається відкрити в системному браузері. Але ми скопіювали посилання до вашого буфера обміну, і ви можете відкрити його вручну.
update.tooltip=Оновити
update.disable_startup_update_dialog=Вимкнути діалог оновлення під час запуску

version=Ігри
version.name=Назва екземпляра
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_zh.properties
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,7 @@ update.no_browser=無法開啟瀏覽器。網址已經複製到剪貼簿了,
update.tooltip=更新
update.preview=提前測試 HMCL 預覽版本
update.preview.tooltip=啟用此選項,你將可以提前取得 HMCL 的新版本,以便在正式發布前進行測試。
update.disable_startup_update_dialog=關閉啟動時的更新彈窗

version=遊戲
version.name=遊戲實例名稱
Expand Down
1 change: 1 addition & 0 deletions HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,7 @@ update.no_browser=无法打开浏览器。网址已经复制到剪贴板,你
update.tooltip=更新
update.preview=提前预览 HMCL 版本
update.preview.tooltip=启用此选项,你将可以提前获取 HMCL 的新版本,以便在正式发布前进行测试。
update.disable_startup_update_dialog=关闭启动时的更新弹窗

version=游戏
version.name=游戏实例名称
Expand Down

AltStyle によって変換されたページ (->オリジナル) /