Skip to content

Commit

Permalink
💄 feat(UI): add buttons for exporting & importing json preferences fi…
Browse files Browse the repository at this point in the history
…le (#427)
  • Loading branch information
neon-mmd committed Nov 2, 2024
1 parent 1bba810 commit 2764201
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/templates/partials/settings_tabs/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ pub fn general(safe_search_level: u8) -> Markup {
option value=(SAFE_SEARCH_LEVELS[2].0){(SAFE_SEARCH_LEVELS[2].1)}
}
}
h3{"Restore preferences from file"}
p class="description"{
"Select a json file to restore preferences for the search engine."
}
form method="post" enctype="multipart/form-data" onsubmit="setTimeout(function () { window.location.reload(); }, 10)" action="/settings" target="_self"{
input type="file" name="file" accept="application/json";
button type="submit" {"Submit"}
}
h3{"Export preferences to a file"}
p class="description"{
"Export all the settings saved as a cookie as a json file."
}
a class="export_btn" href="./download" download="settings.json" {
button type="submit" {"Export"}
}
}
)
}

0 comments on commit 2764201

Please sign in to comment.