Merge branch 'patch5-temp' into patch-5

This commit is contained in:
mcchampions committed 2024-08-14 21:24:49 +08:00
commit 538eab6ac6
1 file changed
+6 -2
+6 -2
View File
@@ -101,11 +101,12 @@ const ConfigEditorPage: React.FC = () => {
val += splitLine[j]; val += splitLine[j];
} }
val = val.trim(); val = val.trim();
/*
if (splitLine[0].includes('proxy-protocol-whitelisted-ips')) { if (splitLine[0].includes('proxy-protocol-whitelisted-ips')) {
currentComment = ''; currentComment = '';
continue; continue;
} }
*/
if (commented) { if (commented) {
currentComment += '<strong>Note: This option is commented on, and if you change it, it will be automatically uncommented.</strong>' + '<br>'; currentComment += '<strong>Note: This option is commented on, and if you change it, it will be automatically uncommented.</strong>' + '<br>';
@@ -214,7 +215,10 @@ const ConfigEditorPage: React.FC = () => {
return <input key={name} className={styles.formInput} type='text' disabled defaultValue={value.replace(/"/g, '')} />; return <input key={name} className={styles.formInput} type='text' disabled defaultValue={value.replace(/"/g, '')} />;
case 'metrics.uuid': case 'metrics.uuid':
return <input key={name} className={styles.formInput} id={name} type='text' disabled defaultValue={value === 'generateduuid' ? crypto.randomUUID() : value} />; return <input key={name} className={styles.formInput} id={name} type='text' disabled defaultValue={value === 'generateduuid' ? crypto.randomUUID() : value} />;
case 'bedrock.#proxy-protocol-whitelisted-ips':
case 'bedrock.proxy-protocol-whitelisted-ips':
console.log(JSON.parse(value));
console.log(value);
default: default:
// Handle all the other inputs // Handle all the other inputs
if (value.toLowerCase() === 'true' || value.toLowerCase() === 'false') { if (value.toLowerCase() === 'true' || value.toLowerCase() === 'false') {