ux: default loadout -> base 4; add 'Curated' preset (config.recommendedCiphers)
Default-on is the clean base 4; a one-click 'Curated' preset enables an extended set defined by config.recommendedCiphers (button only renders when that list is set). config.default.js documents it; forks opt in by listing ciphers (keep in sync with the lite db.json). No db change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2570372ebf
commit
a71eee7e07
3 files changed
+24
-3
No files matched your search
+18
-2
@@ -266,8 +266,9 @@ function createCiphersMenu() {
|
||||
'<input class="intBtn3 ciphPresetBtn" type="button" value="Empty" onclick="disableAllCiphers()">';
|
||||
o +=
|
||||
'<input class="intBtn3 ciphPresetBtn" type="button" value="Base" onclick="enableBaseCiphers()">';
|
||||
o +=
|
||||
'<input class="intBtn3 ciphPresetBtn" type="button" value="Default" onclick="enableDefaultCiphers()">';
|
||||
if (typeof CALC_CONFIG !== 'undefined' && Array.isArray(CALC_CONFIG.recommendedCiphers) && CALC_CONFIG.recommendedCiphers.length > 0)
|
||||
o +=
|
||||
'<input class="intBtn3 ciphPresetBtn" type="button" value="Curated" onclick="enableRecommendedCiphers()">';
|
||||
o +=
|
||||
'<input class="intBtn3 ciphPresetBtn" type="button" value="All (EN)" onclick="enableAllEnglishCiphers()">';
|
||||
o +=
|
||||
@@ -1623,6 +1624,21 @@ function enableBaseCiphers() {
|
||||
updateTables(); // update
|
||||
}
|
||||
|
||||
// "Curated" preset: the fork's recommended extended loadout (CALC_CONFIG.recommendedCiphers,
|
||||
// = the lite-db set, so all match instantly). Button only renders when that list is non-empty.
|
||||
function enableRecommendedCiphers() {
|
||||
prevCiphIndex = -1; // reset cipher selection
|
||||
var rec = (typeof CALC_CONFIG !== 'undefined' && Array.isArray(CALC_CONFIG.recommendedCiphers)) ? CALC_CONFIG.recommendedCiphers : [];
|
||||
var cur_chkbox;
|
||||
for (i = 0; i < cipherList.length; i++) {
|
||||
var on = rec.indexOf(cipherList[i].cipherName) > -1;
|
||||
cipherList[i].enabled = on;
|
||||
cur_chkbox = document.getElementById("cipher_chkbox" + i);
|
||||
if (cur_chkbox !== null) cur_chkbox.checked = on;
|
||||
}
|
||||
updateTables(); // update
|
||||
}
|
||||
|
||||
function toggleCipherCategory(ciph_cat) {
|
||||
prevCiphIndex = -1; // reset cipher selection
|
||||
// Check if custom config category
|
||||
|
||||
Reference in new issue
Block a user