From 2f47677af6eecbba8cc81b7e296107ddac0220e3 Mon Sep 17 00:00:00 2001 From: Kieran Eglin Date: Mon, 3 Jun 2024 16:36:47 -0700 Subject: [PATCH] Updated settings UI --- .../controllers/settings/setting_html.ex | 2 -- .../codec_settings_help.html.heex | 26 +++++++++---------- .../setting_html/setting_form.html.heex | 16 +++++------- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/lib/pinchflat_web/controllers/settings/setting_html.ex b/lib/pinchflat_web/controllers/settings/setting_html.ex index d6f549e..dcb549a 100644 --- a/lib/pinchflat_web/controllers/settings/setting_html.ex +++ b/lib/pinchflat_web/controllers/settings/setting_html.ex @@ -1,8 +1,6 @@ defmodule PinchflatWeb.Settings.SettingHTML do use PinchflatWeb, :html - alias Pinchflat.Downloading.CodecParser - embed_templates "setting_html/*" @doc """ diff --git a/lib/pinchflat_web/controllers/settings/setting_html/codec_settings_help.html.heex b/lib/pinchflat_web/controllers/settings/setting_html/codec_settings_help.html.heex index d6b6354..4d90703 100644 --- a/lib/pinchflat_web/controllers/settings/setting_html/codec_settings_help.html.heex +++ b/lib/pinchflat_web/controllers/settings/setting_html/codec_settings_help.html.heex @@ -1,17 +1,17 @@ diff --git a/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex b/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex index 73ee7bb..0f017ab 100644 --- a/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex +++ b/lib/pinchflat_web/controllers/settings/setting_html/setting_form.html.heex @@ -37,24 +37,20 @@

<.input - id="video_codec_preference_string" - name="setting[video_codec_preference_string]" - value={Enum.join(f[:video_codec_preference].value, ">")} - placeholder="avc>vp9>av01" + field={f[:video_codec_preference]} + placeholder="avc" type="text" label="Video Codec Preference" - help="Order of preference for video codecs. Separate with >. Will be remuxed into an MP4 container. See below for available codecs" + help="Video codec preference. Will be remuxed into an MP4 container. See below for more details" inputclass="font-mono text-sm mr-4" /> <.input - id="audio_codec_preference_string" - name="setting[audio_codec_preference_string]" - value={Enum.join(f[:audio_codec_preference].value, ">")} - placeholder="mp4a>opus>aac" + field={f[:audio_codec_preference]} + placeholder="m4a" type="text" label="Audio Codec Preference" - help="Order of preference for audio codecs. Separate with >. See below for available codecs" + help="Audio codec preference. See below for more details" inputclass="font-mono text-sm mr-4" />