Add "Update to Pre-releases" setting

Fix dialog title bar text position
Fix title of textPrompt window
This commit is contained in:
JannisX11 2021-08-05 19:36:23 +02:00
parent cbbfdf670a
commit 2471169d50
5 changed files with 8 additions and 5 deletions

View File

@ -171,7 +171,7 @@
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
padding-left: 26px; padding-left: 26px;
padding-top: 1px; padding-top: 2px;
background: var(--color-button); background: var(--color-button);
height: 30px; height: 30px;
margin-bottom: 20px; margin-bottom: 20px;

View File

@ -283,10 +283,10 @@ const Blockbench = {
}, },
textPrompt(title, value, callback) { textPrompt(title, value, callback) {
showDialog('text_input') showDialog('text_input')
$('#text_input h2').text(tl(title)) $('#text_input .dialog_handle').text(tl(title || 'dialog.input.title'))
$('#text_input input#text_input_field').val(value).select() $('#text_input input#text_input_field').val(value).trigger('select')
$('#text_input button.confirm_btn').off() $('#text_input button.confirm_btn').off()
$('#text_input button.confirm_btn').click(function() { $('#text_input button.confirm_btn').on('click', function() {
var s = $('#text_input input#text_input_field').val() var s = $('#text_input input#text_input_field').val()
if (callback !== undefined) { if (callback !== undefined) {
callback(s) callback(s)

View File

@ -228,6 +228,7 @@ const Settings = {
new Setting('backup_interval', {category: 'application', value: 10, type: 'number', condition: isApp}); new Setting('backup_interval', {category: 'application', value: 10, type: 'number', condition: isApp});
new Setting('backup_retain', {category: 'application', value: 30, type: 'number', condition: isApp}); new Setting('backup_retain', {category: 'application', value: 30, type: 'number', condition: isApp});
new Setting('automatic_updates', {category: 'application', value: true, condition: isApp}); new Setting('automatic_updates', {category: 'application', value: true, condition: isApp});
new Setting('update_to_prereleases', {category: 'application', value: false, condition: isApp, launch_setting: true});
new Setting('hardware_acceleration', {category: 'application', value: true, condition: isApp, launch_setting: true}); new Setting('hardware_acceleration', {category: 'application', value: true, condition: isApp, launch_setting: true});
//Export //Export

File diff suppressed because one or more lines are too long

View File

@ -638,6 +638,8 @@
"settings.backup_retain.desc": "Set how long Blockbench retains old backups in days", "settings.backup_retain.desc": "Set how long Blockbench retains old backups in days",
"settings.automatic_updates": "Automatic Updates", "settings.automatic_updates": "Automatic Updates",
"settings.automatic_updates.desc": "Automatically download new versions and keep Blockbench up-to-date", "settings.automatic_updates.desc": "Automatically download new versions and keep Blockbench up-to-date",
"settings.update_to_prereleases": "Update to Pre-releases",
"settings.update_to_prereleases.desc": "Automatically update to Blockbench beta versions to test new features. Pre-release versions can be unstable, don't enable this option if you rely on Blockbench for work or other important projects.",
"settings.hardware_acceleration": "Hardware Acceleration", "settings.hardware_acceleration": "Hardware Acceleration",
"settings.hardware_acceleration.desc": "Outsource rendering tasks to the graphics card. Restart Blockbench to apply changes", "settings.hardware_acceleration.desc": "Outsource rendering tasks to the graphics card. Restart Blockbench to apply changes",