Add accept to file inputs

This commit is contained in:
WardPearce
2026-03-07 00:59:59 +13:00
parent ed81bcae4c
commit 4e28697ac2
2 changed files with 3 additions and 1 deletions
@@ -92,6 +92,7 @@
}
});
}}
accept=".json,.opml,.csv"
type="file"
/>
</div>
@@ -174,6 +175,7 @@
await loadSettingsFromFile(files[0]);
}}
accept=".json"
type="file"
/>
</div>
+1 -1
View File
@@ -58,7 +58,7 @@ export async function importSubscriptionsFromFile(file: File) {
const subsToImport: Subscription[] = [];
if (fileContents.startsWith('<opml')) {
if (file.name.endsWith('.opml')) {
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(fileContents, 'text/xml');