From 993865909ce9837650e6fbc3e84e2e83981ec878 Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 11 Mar 2024 20:19:10 -0700 Subject: [PATCH] Onboarding improvements (#76) * Disabled pro modal during onboarding * Restructured the way onboarding changes settings * Added better upload date template placeholder --- lib/pinchflat/profiles/media_profile.ex | 2 +- lib/pinchflat/profiles/output_path_builder.ex | 3 +- .../components/layouts/root.html.heex | 8 +++-- .../media_profiles/media_profile_html.ex | 1 + .../media_profile_form.html.heex | 2 +- .../controllers/pages/page_controller.ex | 30 ++++++++----------- .../page_html/onboarding_checklist.html.heex | 2 +- .../controllers/page_controller_test.exs | 30 ++++--------------- 8 files changed, 30 insertions(+), 48 deletions(-) diff --git a/lib/pinchflat/profiles/media_profile.ex b/lib/pinchflat/profiles/media_profile.ex index c8e3aee..fca3a94 100644 --- a/lib/pinchflat/profiles/media_profile.ex +++ b/lib/pinchflat/profiles/media_profile.ex @@ -30,7 +30,7 @@ defmodule Pinchflat.Profiles.MediaProfile do field :name, :string field :output_path_template, :string, - default: "/{{ source_custom_name }}/{{ title }}/{{ title }} [{{ id }}].{{ ext }}" + default: "/{{ source_custom_name }}/{{ upload_yyyy_mm_dd }} {{ title }}/{{ title }} [{{ id }}].{{ ext }}" field :download_subs, :boolean, default: true field :download_auto_subs, :boolean, default: true diff --git a/lib/pinchflat/profiles/output_path_builder.ex b/lib/pinchflat/profiles/output_path_builder.ex index 8ac62ef..de0b6b9 100644 --- a/lib/pinchflat/profiles/output_path_builder.ex +++ b/lib/pinchflat/profiles/output_path_builder.ex @@ -39,7 +39,8 @@ defmodule Pinchflat.Profiles.OutputPathBuilder do # Individual parts of the upload date "upload_year" => "%(upload_date>%Y)S", "upload_month" => "%(upload_date>%m)S", - "upload_day" => "%(upload_date>%d)S" + "upload_day" => "%(upload_date>%d)S", + "upload_yyyy_mm_dd" => "%(upload_date>%Y)S-%(upload_date>%m)S-%(upload_date>%d)S" } end end diff --git a/lib/pinchflat_web/components/layouts/root.html.heex b/lib/pinchflat_web/components/layouts/root.html.heex index 1e3fd03..410adcc 100644 --- a/lib/pinchflat_web/components/layouts/root.html.heex +++ b/lib/pinchflat_web/components/layouts/root.html.heex @@ -13,13 +13,17 @@ <%= @inner_content %> <.donate_modal conn={@conn} /> -