Compare commits

..

No commits in common. "54ed2e08e79c174c61db66b8ffb6474c1cca812e" and "75ced3fa0eb9e277e35ef67a5778b6d8d36e5802" have entirely different histories.

3 changed files with 5 additions and 14 deletions

View File

@ -169,7 +169,7 @@ export default function IECPage({ config, setConfig }: IECPageProps) {
/>
)}
<h2 className="text-sm text-neutral-500 pt-4 flex items-center gap-2"><List className="w-4 h-4" /> Directory Enhancements</h2>
<h2 className="text-sm text-neutral-500 pt-4 flex items-center gap-2"><List className="w-4 h-4" /> Directory Settings</h2>
<div className="bg-white border border-neutral-200 rounded-lg divide-y divide-neutral-200">
{Object.entries(iec.directory || {}).map(([key, value]) => (

View File

@ -40,20 +40,12 @@ const SAVED_INDICATOR_MS = 1500;
export type SettingsConfig = Record<string, any>;
/** Try primary path first, fall back to secondary. Returns null if both fail. */
async function getTextWithFallback(primary: string, fallback: string): Promise<string | null> {
try { return await getFileContents(primary).then(b => b.text()); } catch { /* try fallback */ }
try { return await getFileContents(fallback).then(b => b.text()); } catch { /* both failed */ }
return null;
}
/** Read both config files from the WebDAV server and merge them. Returns null on failure. */
export async function readSettings(): Promise<SettingsConfig | null> {
try {
// Mirror firmware priority: /sd/.sys/ first, fall back to /.sys/
const [configText, devicesText] = await Promise.all([
getTextWithFallback('/sd' + SETTINGS_PATH, SETTINGS_PATH),
getTextWithFallback('/sd' + DEVICES_PATH, DEVICES_PATH),
getFileContents(SETTINGS_PATH).then(b => b.text()),
getFileContents(DEVICES_PATH).then(b => b.text()).catch(() => null),
]);
if (!configText) return null;
const config = JSON.parse(configText);

View File

@ -91,11 +91,10 @@
},
"directory": {
"force_0801": 1,
"bam_message": 1,
"nfo_header": 1,
"hidden_dirs": 1,
"bam_message": 1,
"hidden_files": 1,
"extension_colon": 1,
"hidden_dirs": 1,
"date_time": 1,
"load_address": 1,
"sys_address": 1,