Skip to content

Commit

Permalink
forms
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Aug 23, 2024
1 parent 05ca1e3 commit 130cf8a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
1 change: 1 addition & 0 deletions app/services/audio_summarizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def summarize
transcribe_chunk(chunk_path)
}
text = transcriptions.join("\n")
puts text
sumarize_transcription(text)
ensure
cleanup_temp_files(chunk_paths)
Expand Down
5 changes: 3 additions & 2 deletions app/views/playlist_purchases/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<%= gettext("Price") %>
</label>

<% if @playlist.name_your_price %>

<% if @playlist.name_your_price && @playlist.name_your_price != "0" %>
<div class="mt-1 flex rounded-md shadow-sm">
<span class="inline-flex items-center rounded-l-md border border-r-0 border-gray-300 dark:bg-gray-900 dark:border-gray-800 bg-gray-50 px-3 text-sm text-gray-500 dark:text-white">
$
Expand Down Expand Up @@ -52,7 +53,7 @@
<label class="hover:underline space-x-2 flex items-center">
<%= form.check_box(:include_message) %>
<span>
<%= t("payments.include_message", name: "foo") %>
<%= t("payments.include_message", name: @playlist.user.username) %>
</span>
</label>
</p>
Expand Down
22 changes: 15 additions & 7 deletions app/views/playlists/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,24 @@
</div>
</div>

<% if @playlist.buy_link.present? %>
<div class="sm:text-xl text-sm container mx-auto px-4 my-4 flex flex-col space-y-4">
<div class="flex justify-end">
<%= link_to @playlist.buy_link_title || "Payment Link",
@playlist.buy_link,
target: :blank,
class: "underline dark:border-white hover:bg-white hover:text-black border-black rounded-sm border-4 px-3 py-3" %>
<div class="flex justify-end items-center space-x-2">
<% if @playlist.buy_link.present? %>
<%= link_to @playlist.buy_link_title || "Payment Link",
@playlist.buy_link,
target: :blank,
class: "underline dark:border-white hover:bg-white hover:text-black border-black rounded-sm border-4 px-3 py-3" %>
<% end %>
<% if @playlist.price %>
<%= render "shared/music_purchase", resource: @playlist %>
<% end %>
</div>
</div>
<% end %>




<!--
<div class="sm:text-xl text-sm container mx-auto px-4 my-4 flex flex-col space-y-4">
Expand Down
11 changes: 5 additions & 6 deletions app/views/shared/_music_purchase.html.erb
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<div id="xx-5">
<div class="text-xl font-bold space-x-2">
<div class="text-xl space-x-2">
<% if resource.is_a?(Track) %>
<%= link_to new_track_track_purchase_path(resource),
"data-turbo-frame": "modal",
class: "hover:underline dark:border-white border-black rounded-lg border-2 p-2 bg-green-500 hover:bg-green-500/90" do %>
class: "underline dark:border-white hover:bg-white hover:text-black border-black rounded-sm border-4 px-3 py-3" do %>
<%= t("tracks.buy_digital_music")%>
<% end %>
<% end %>
<% if resource.is_a?(Playlist) %>
<%= link_to new_playlist_playlist_purchase_path(resource),
"data-turbo-frame": "modal",
class: "hover:underline dark:border-white border-black rounded-lg border-2 p-2 bg-green-500 hover:bg-green-500/90" do %>
class: "underline dark:border-white hover:bg-white hover:text-black border-black rounded-sm border-4 px-3 py-3" do %>
<%= t("tracks.buy_digital_music")%>
<span> <%= number_to_currency(resource.price) %> <span class="text-gray-700 dark:text-gray-300"> USD </span> </span>
<% end %>
<% end %>
<span> <%= number_to_currency(resource.price) %> <span class="text-gray-700 dark:text-gray-300"> USD </span>
</span>
<% if resource.name_your_price.present? %>
<% if resource.name_your_price.present? && resource.name_your_price != "0" %>
<span class="text-gray-700 dark:text-gray-300"> (<%= t("tracks.or_more") %>) </span>
<% end %>

Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


+ podcasts
+ merch / phisical records
+ shipping stripe
+ transcription summary

0 comments on commit 130cf8a

Please sign in to comment.