diff --git a/app/views/basil/character.html.erb b/app/views/basil/character.html.erb deleted file mode 100644 index a288d31e..00000000 --- a/app/views/basil/character.html.erb +++ /dev/null @@ -1,224 +0,0 @@ - - - -
- <%= form_for BasilCommission.new, url: basil_character_path(@character) do |f| %> - <%= f.hidden_field :style, value: 'realistic' %> - <%= f.hidden_field :entity_type, value: 'Character' %> - <%= f.hidden_field :entity_id, value: @character.id %> -
-
- <%= link_to basil_path, class: 'grey-text text-darken-2' do %> - chevron_left - Back to my character list - <% end %> -
-
- <%= image_tag @character.random_image_including_private(format: :medium), style: 'width: 100%' %> -

<%= link_to @character.name, @character %>

- <%= link_to 'Edit this character page', edit_polymorphic_path(@character), class: 'grey-text text-darken-2' %> -
- - - - <% if !shown_any_value %> -
- Basil works best with guidance! Please fill out some fields in the "Looks" category for this character - before requesting an image. -
- <% end %> - -
- <% if @can_request_another %> - <%= link_to 'Customize per-field importance', "javascript:var sliders = document.getElementsByClassName('js-importance-slider'); for(var i = 0; i < sliders.length; i++) sliders.item(i).classList.remove('hide')" %> - <% end %> - -
- How to customize per-field importance -

- - This allows you to tell Basil which fields are more or less important to you. For example, if Basil isn't - getting a character's hair color right, you can increase the importance of the "Hair Color" field. -

- You can also tell Basil to ignore a field entirely by dragging the slider all the way to the left. -
-
- -
-

- This is still a work in progress and very much a beta that will change a lot before releasing publicly, - but feel free to use it as much as you'd like to provide feedback! -

-

- If you run into any issues, please let me know <%# in the %> - <%# link_to 'Site Support forums', 'https://www.notebook.ai/forum/site-support' %> - <%# or %> <%= link_to 'on Discord', 'https://discord.gg/7WCuGxY3AW' %>. -

-
-
- -
- <% if @can_request_another && shown_any_value %> -
Available styles
- <% %w(realistic painting sketch digital anime abstract).each do |style| %> - <%= link_to "javascript:commission_basil('#{style}')" do %> -
- <%= style.humanize %> - chevron_right -
- <% end %> - <% end %> - <% end %> - - <% if @can_request_another && shown_any_value %> -
Experimental styles
- <% %w(painting2 horror watercolor).each do |style| %> - <%= link_to "javascript:commission_basil('#{style}')" do %> -
- <%= style.humanize %> - chevron_right -
- <% end %> - <% end %> - <% end %> - - <% if !@can_request_another %> -
- Basil is working on your <%= pluralize @in_progress_commissions.count, 'requested commission' %>. -

- As soon as he completes one, you'll be able to request another. -
- <% end %> -
- <% end %> - -
- <% @commissions.each do |commission| %> -
- <% if commission.complete? %> - <%# image_tag commission.image, style: 'width: 100%' %> - <% - s3 = Aws::S3::Resource.new(region: "us-east-1") - obj = s3.bucket(commission.s3_bucket).object("job-#{commission.job_id}.png") - %> -
-
- <%= link_to obj.presigned_url(:get) do %> - <%= image_tag obj.presigned_url(:get) %> - <% end %> -
-
-
-
- <%= @character.name %> - <% if commission.style? %> - (<%= commission.style.humanize %>) - <% end %> -
-
- Completed <%= time_ago_in_words commission.completed_at %> ago - ·
- Took <%= distance_of_time_in_words commission.completed_at - commission.created_at %> -
-
-
Feedback for Basil
-
- <%= form_for commission.basil_feedbacks.find_or_initialize_by(user: current_user), url: basil_feedback_path(commission.job_id), method: :POST, remote: true do |f| %> -
- -
-
- -
-
- -
-
- -
- <% end %> -
-
-
- -
-
- <% else %> -
- Basil is still working on this commission... (style: <%= commission.style %>) -
- (Requested <%= time_ago_in_words(commission.created_at) %> ago) -
-
- <% end %> -
- <% end %> -
-
diff --git a/app/views/basil/review.html.erb b/app/views/basil/review.html.erb index 9674da4f..3d35d5ed 100644 --- a/app/views/basil/review.html.erb +++ b/app/views/basil/review.html.erb @@ -20,7 +20,7 @@ <% @current_queue_items.each do |commission| %>
  • <%= commission.entity_type %>-<%= commission.entity_id %> (<%= commission.style %>) - for U-<%= commission.user_id %> + for U-<%= commission.user_id %> (#<%= commission.id %>)
  • <% end %> @@ -29,15 +29,10 @@ <% @recent_commissions.each do |commission| %>
    <% if commission.complete? %> - <%# image_tag commission.image, style: 'width: 100%' %> - <% - s3 = Aws::S3::Resource.new(region: "us-east-1") - obj = s3.bucket(commission.s3_bucket).object("job-#{commission.job_id}.png") - %>
    - <%= link_to obj.presigned_url(:get) do %> - <%= image_tag obj.presigned_url(:get) %> + <%= link_to commission.image do %> + <%= image_tag commission.image %> <% end %>
    @@ -45,6 +40,7 @@
    <%= commission.id %>. <% if commission.entity.present? %> + <%= content_class_from_name(commission.entity_type).icon %> <%= link_to commission.entity.name, commission.entity %> <% end %> <% if commission.style? %> diff --git a/app/views/basil/stats.html.erb b/app/views/basil/stats.html.erb index 0dc5ce95..20c7dff7 100644 --- a/app/views/basil/stats.html.erb +++ b/app/views/basil/stats.html.erb @@ -42,7 +42,7 @@
    <%= - area_chart @commissions.group_by_day(:created_at).map { |date, count| [date.to_date, count] }, + area_chart @commissions.where('created_at > ?', 30.days.ago.beginning_of_month).group_by_day(:created_at).map { |date, count| [date.to_date, count] }, colors: ['#9C27B0', '#2196F3'], title: 'Images created per day', suffix: ' images' diff --git a/app/views/notice_dismissal/messages/_19.html.erb b/app/views/notice_dismissal/messages/_19.html.erb index cb512adc..6fb37966 100644 --- a/app/views/notice_dismissal/messages/_19.html.erb +++ b/app/views/notice_dismissal/messages/_19.html.erb @@ -9,7 +9,7 @@ material for your ideas.

    - To generate an image of this <%= @content.try(:page_type) || 'page' %>, + To generate an image of this <%= @content.try(:page_type).try(:downcase) || 'page' %>, simply click a style below. Once the image has generated, you can move it to your <%= link_to @content.try(:name), @content.view_path %> page by clicking "Save" on any image.