diff --git a/.DS_Store b/.DS_Store
index 7cdede6..d3c41a4 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css
index aedcbfb..0822877 100644
--- a/app/assets/stylesheets/application.tailwind.css
+++ b/app/assets/stylesheets/application.tailwind.css
@@ -208,12 +208,12 @@
}
textarea {
- @apply block w-full rounded-md border-0 py-1.5 dark:bg-gray-900 dark:text-gray-100 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6;
+ @apply block w-full rounded-md border-0 py-1.5 bg-muted text-default shadow-sm ring-1 ring-inset ring-subtle placeholder:text-subtle focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6;
}
.select,
select {
- @apply block w-full rounded-md border-0 px-3 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6;
+ @apply block w-full rounded-md border-0 px-3 pl-3 pr-10 text-default ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6;
}
label {
@@ -221,22 +221,23 @@
}
input[type="number"] {
- @apply block w-full rounded-md border-0 px-3 pl-3 dark:bg-gray-900 dark:text-gray-100 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6;
+ @apply block w-full rounded-md border-0 py-1.5 bg-muted text-default shadow-sm ring-1 ring-inset ring-subtle placeholder:text-subtle focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6;
}
input[type="date"],
input[type="datetime-local"] {
- @apply block w-full rounded-md border-0 px-3 pl-3 pr-10 dark:bg-gray-900 dark:text-gray-100 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6;
+ @apply block w-full rounded-md border-0 py-1.5 bg-muted text-default shadow-sm ring-1 ring-inset ring-subtle placeholder:text-subtle focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6;
}
input[type="text"],
+ input[type="url"],
input[type="email"],
input[type="password"] {
- @apply block w-full rounded-md border-0 px-3 pl-3 pr-10 dark:bg-gray-900 dark:text-gray-100 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6;
+ @apply block w-full rounded-md border-0 py-1.5 bg-muted text-default shadow-sm ring-1 ring-inset ring-subtle placeholder:text-subtle focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6;
}
select {
- @apply shadow-sm focus:ring-brand-500 focus:border-brand-500 block w-full sm:text-sm border-gray-300 dark:border-gray-600 rounded-md dark:bg-gray-900 dark:text-gray-100;
+ @apply shadow-sm focus:ring-brand-500 focus:border-brand-500 block w-full sm:text-sm border-muted rounded-md dark:bg-default;
}
label {
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index cba0733..31cbcd9 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -44,4 +44,8 @@ def become
redirect_to root_url, error: "not allowed"
end
end
+
+ def disable_footer
+ @disable_footer = true
+ end
end
diff --git a/app/controllers/podcasts_controller.rb b/app/controllers/podcasts_controller.rb
index 0a56b3d..d70b2ff 100644
--- a/app/controllers/podcasts_controller.rb
+++ b/app/controllers/podcasts_controller.rb
@@ -1,32 +1,29 @@
class PodcastsController < ApplicationController
+ before_action :find_user
+ before_action :unset_user_menu
+ before_action :disable_footer
- def show
- @user = User.find_by(username: params[:user_id])
+ def index
+ @collection = @user.tracks.published.podcasts.page(params[:page]).per(10)
end
- def edit
- @user = User.find_by(username: params[:user_id])
- @info = @user.podcaster_info || @user.build_podcaster_info
+ def show
+ @podcast = @user.tracks.published.podcasts.friendly.find(params[:id])
end
- def update
- @user = User.find_by(username: params[:user_id])
- @info = @user.podcaster_info || @user.build_podcaster_info
- @info.update(podcaster_params)
- redirect_to user_podcast_path(@user.username)
+ def about
end
+ private
- def create
- @user = User.find_by(username: params[:user_id])
- @info = @user.podcaster_info || @user.build_podcaster_info
- @info.update(podcaster_params)
- redirect_to user_podcast_path(@user.username)
+ def unset_user_menu
+ @disable_user_menu = true
end
-
- private
+ def find_user
+ @user = User.find_by(username: params[:user_id])
+ end
def podcaster_params
params.require(:podcaster_info).permit(:about, :title, :description)
diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb
index ee30e92..e656052 100644
--- a/app/controllers/tracks_controller.rb
+++ b/app/controllers/tracks_controller.rb
@@ -119,6 +119,7 @@ def track_params
:display_comments, :display_stats, :include_in_rss,
:offline_listening, :enable_app_playblack,
:cover,
+ :podcast,
:copyright, :attribution, :noncommercial, :copies,
tags: []
)
diff --git a/app/controllers/user_settings_controller.rb b/app/controllers/user_settings_controller.rb
index c2e844d..494c689 100644
--- a/app/controllers/user_settings_controller.rb
+++ b/app/controllers/user_settings_controller.rb
@@ -1,5 +1,6 @@
class UserSettingsController < ApplicationController
before_action :authenticate_user!
+ before_action :disable_footer
def show
@section = params[:section] || "profile"
@@ -47,7 +48,11 @@ def user_attributes
:new_message_app,
:profile_header,
:like_and_plays_on_your_post_email,
- :tbk_commerce_code, :pst_enabled, :tbk_test_mode
+ :tbk_commerce_code, :pst_enabled, :tbk_test_mode,
+ podcaster_info_attributes: [
+ :title, :about, :description, :avatar, :id,
+ :spotify_url, :apple_podcasts_url, :google_podcasts_url, :stitcher_url, :overcast_url, :pocket_casts_url
+ ]
)
end
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 3ca4f3c..b4879fb 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -502,6 +502,8 @@ def icon_for(kind)
+ <%= link_to @user.podcaster_info.title, user_podcasts_path %> +
++ <%= @user.podcaster_info.description %> +
++ <%= gettext("Podcaster information form.") %> +
+