mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Merge pull request #187 from indentlabs/release/uploads
Oh boy, missing a few commits
This commit is contained in:
commit
85e338805f
@ -7,29 +7,30 @@
|
||||
<%= render partial: 'cards/serendipitous/content_question', locals: { question: @question, content: @questioned_content } %>
|
||||
<% end %>
|
||||
|
||||
<% if @content.any? %>
|
||||
|
||||
<div class="slider" style="height: 140px;">
|
||||
<ul class="slides">
|
||||
<li>
|
||||
<%= image_tag "card-headers/#{content_type.pluralize}" %>
|
||||
<img src="http://lorempixel.com/580/250/nature/1">
|
||||
<div class="caption center-align">
|
||||
<h3><%= content_type.titleize.pluralize %></h3>
|
||||
<h5 class="light grey-text text-lighten-3"><%= t("content_oneliners.#{content_type}") %></h5>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="slider" style="height: 140px;">
|
||||
<ul class="slides">
|
||||
<li>
|
||||
<%= image_tag "card-headers/#{content_type.pluralize}" %>
|
||||
<img src="http://lorempixel.com/580/250/nature/1">
|
||||
<div class="caption center-align">
|
||||
<h3><%= content_type.titleize.pluralize %></h3>
|
||||
<h5 class="light grey-text text-lighten-3"><%= t("content_oneliners.#{content_type}") %></h5>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.slider').slider({
|
||||
height: 200,
|
||||
indicators: false
|
||||
});
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.slider').slider({
|
||||
height: 200,
|
||||
indicators: false
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
|
||||
<% if @content.any? %>
|
||||
|
||||
<h4>
|
||||
You've created <%= pluralize(@content.count, @content.content_name) %>
|
||||
@ -65,7 +66,7 @@
|
||||
|
||||
<% elsif @content.empty? %>
|
||||
|
||||
<div class="center" style="margin-bottom: 50px;">
|
||||
<div class="center" style="margin: 50px 0">
|
||||
<h4>You haven't created any <%= @content.content_name.pluralize %> yet!</h4>
|
||||
<h1>
|
||||
<i class="material-icons <%= content_type_class.color %>-text" style="font-size: 200%">
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
|
||||
<div class="actions center" style="margin-top: 20px;">
|
||||
<%= f.submit "Sign up", class: 'btn' %>
|
||||
<%= f.submit "Sign up", class: 'btn blue' %>
|
||||
<p class="center">
|
||||
<br />
|
||||
<%= render "devise/shared/links" %>
|
||||
|
||||
@ -22,21 +22,24 @@
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="card-panel blue lighten-5 hoverable">
|
||||
<p class="center"><strong>Subscriptions are here!</strong></p>
|
||||
<div class="card-panel green lighten-5 hoverable">
|
||||
<p class="center"><strong>You can now upload images!</strong></p>
|
||||
<p>
|
||||
Read about what that means for you and your notebook <a href="https://medium.com/indent-labs/notebook-ai-adds-subscriptions-for-more-detailed-worldbuilding-54482b91c6b0#.4jeavd1l7" class="blue-text lighten-5" target="_new">in our latest blog post</a>.
|
||||
Image uploading has been our most-requested feature since launch. Now that I'm working full-time on
|
||||
Notebook.ai, I'm happy to say it took about a week to finish up — and now it's ready for you.
|
||||
</p>
|
||||
<p>
|
||||
You can upload images to any content from the "Gallery" tab while editing it.
|
||||
</p>
|
||||
<p>
|
||||
Free users have 50MB of space, and premium users have a whopping 1GB.
|
||||
<% if current_user && current_user.selected_billing_plan_id == BillingPlan.find_by(stripe_plan_id: 'free-for-life').id %>
|
||||
Because you were here at Notebook.ai's launch, <strong>we've quintupled your space from 50MB to 250MB. Thank you!</strong>
|
||||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
Happy worldbuilding, and
|
||||
<a href="https://docs.google.com/forms/d/e/1FAIpQLScOhSMdDqWqJu9HGPQdmd0R9s90_AcSo0g6_Nc1qNjQIbSaXA/viewform" target="_new">
|
||||
don't forget to leave feedback on what feature you'd like to see next</a>!
|
||||
</p>
|
||||
<% active_billing_plans = current_user.active_billing_plans if current_user %>
|
||||
<% if current_user && active_billing_plans.any? && active_billing_plans.first.stripe_plan_id == 'free-for-life' %>
|
||||
<p>
|
||||
Because you signed up during Notebook.ai's October "free for life" promotion, your account will continue to be just that —
|
||||
free for life. :)
|
||||
</p>
|
||||
<% else %>
|
||||
<p>
|
||||
You can sign up for a subscription by clicking "Account billing" from the dropdown menu in the top-right of any page, or by
|
||||
<%= link_to 'clicking here', subscription_path %>.
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -15,8 +15,10 @@
|
||||
|
||||
<div class="row">
|
||||
<% [:universe, :character, :location, :item, :creature, :race, :religion, :group, :magic, :language, :scene].each do |type| %>
|
||||
<% content_list = current_user.send(type.to_s.pluralize) %>
|
||||
<% next if !current_user.can_create?(type.to_s.capitalize.constantize) && content_list.empty? %>
|
||||
<div class="dashboard-row col <%= "s#{s_width} m#{m_width} l#{l_width}" %>">
|
||||
<%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: type, content_list: current_user.send(type.to_s.pluralize) } %>
|
||||
<%= render partial: 'content/cards/in_universe_content_list', locals: { content_type: type, content_list: content_list } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="container">
|
||||
<br />
|
||||
<br />
|
||||
<h1 class="header center teal-text text-lighten-2">
|
||||
<h1 class="header center blue-text">
|
||||
<%= t('marketing.landing_page.promo_header') %>
|
||||
</h1>
|
||||
<div class="row center">
|
||||
@ -14,7 +14,7 @@
|
||||
<div class="row center">
|
||||
<%= link_to t('marketing.landing_page.cta.get_yours'),
|
||||
new_user_registration_path,
|
||||
class: 'btn-large waves-effect waves-light teal lighten-1' %>
|
||||
class: 'btn-large waves-effect waves-light blue lighten-1' %>
|
||||
<br />
|
||||
<br />
|
||||
<%= t('marketing.landing_page.promo_subtext') %>
|
||||
@ -208,7 +208,7 @@
|
||||
</div>
|
||||
|
||||
<div class="container" style="margin-top: 50px; margin-bottom: 75px;">
|
||||
<h3 class="header center teal-text"><%= t('marketing.landing_page.pricing.title') %></h3>
|
||||
<h3 class="header center blue-text"><%= t('marketing.landing_page.pricing.title') %></h3>
|
||||
<div class="row center" style="clear: both">
|
||||
<div class="card-panel green white-text" width="200px;">
|
||||
<%= t('marketing.landing_page.pricing.subtitle') %>
|
||||
@ -276,7 +276,7 @@
|
||||
<div class="row center">
|
||||
<%= link_to t('marketing.landing_page.pricing.cta.button'),
|
||||
new_user_registration_path,
|
||||
class: 'btn-large waves-effect waves-light teal lighten-1' %>
|
||||
class: 'btn-large waves-effect waves-light blue lighten-1' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -35,4 +35,37 @@ namespace :data_migrations do
|
||||
# Since no active subscriptions is equivalent to the free tier, there's no need to build Subscriptions for these users
|
||||
end
|
||||
end
|
||||
|
||||
desc "Add bandwidth bonuses to billing plans"
|
||||
task billing_plan_bandwidths: :environment do
|
||||
puts "Updating bandwidths for all billing plans"
|
||||
BillingPlan.find_by(stripe_plan_id: 'starter').update(bonus_bandwidth_kb: 50_000)
|
||||
BillingPlan.find_by(stripe_plan_id: 'free-for-life').update(bonus_bandwidth_kb: 250_000)
|
||||
BillingPlan.find_by(stripe_plan_id: 'early-adopters').update(bonus_bandwidth_kb: 950_000)
|
||||
BillingPlan.find_by(stripe_plan_id: 'premium').update(bonus_bandwidth_kb: 950_000)
|
||||
puts "Done"
|
||||
end
|
||||
|
||||
desc "Add bandwidth counts to existing users"
|
||||
task initialize_user_bandwidths: :environment do
|
||||
starter_id = BillingPlan.find_by(stripe_plan_id: 'starter').id
|
||||
beta_id = BillingPlan.find_by(stripe_plan_id: 'free-for-life').id
|
||||
premium_ids = [
|
||||
BillingPlan.find_by(stripe_plan_id: 'early-adopters').id,
|
||||
BillingPlan.find_by(stripe_plan_id: 'premium').id
|
||||
]
|
||||
|
||||
# Premium
|
||||
puts "Setting premium users to 1GB"
|
||||
puts User.where(selected_billing_plan_id: premium_ids).update_all(upload_bandwidth_kb: 1_000_000) # 1GB
|
||||
|
||||
# Starter
|
||||
puts "Setting starter users to 50MB"
|
||||
puts User.where(selected_billing_plan_id: nil).update_all(upload_bandwidth_kb: 50_000) # 50MB
|
||||
puts User.where(selected_billing_plan_id: starter_id).update_all(upload_bandwidth_kb: 50_000) # 50MB
|
||||
|
||||
# Beta
|
||||
puts "Setting beta users to 250MB"
|
||||
puts User.where(selected_billing_plan_id: beta_id).update_all(upload_bandwidth_kb: 250_000) # 250MB
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue
Block a user