diff --git a/lib/pinchflat_web/controllers/sources/source_html/source_form.html.heex b/lib/pinchflat_web/controllers/sources/source_html/source_form.html.heex index 564296b..7e9ec5a 100644 --- a/lib/pinchflat_web/controllers/sources/source_html/source_form.html.heex +++ b/lib/pinchflat_web/controllers/sources/source_html/source_form.html.heex @@ -1,11 +1,22 @@ -<.simple_form :let={f} for={@changeset} action={@action}> +<.simple_form + :let={f} + for={@changeset} + action={@action} + x-data="{ advancedMode: !!JSON.parse(localStorage.getItem('advancedMode')) }" + x-init="$watch('advancedMode', value => localStorage.setItem('advancedMode', JSON.stringify(value)))" +> <.error :if={@changeset.action}> Oops, something went wrong! Please check the errors below. -
+ Tread carefully +
+