raise supporter space to 50GB, BW to 3TB. Compare cleanups

This commit is contained in:
Kyle Drake 2017-07-07 13:05:43 -07:00
parent 7b068b0872
commit 5b81b5fc97
4 changed files with 23 additions and 17 deletions

View file

@ -79,8 +79,8 @@ post '/supporter/update' do
self, { self, {
username: site.username, username: site.username,
plan_name: Site::PLAN_FEATURES[params[:plan_type].to_sym][:name], plan_name: Site::PLAN_FEATURES[params[:plan_type].to_sym][:name],
plan_space: Site::PLAN_FEATURES[params[:plan_type].to_sym][:space].to_space_pretty, plan_space: Site::PLAN_FEATURES[params[:plan_type].to_sym][:space].pretty,
plan_bw: Site::PLAN_FEATURES[params[:plan_type].to_sym][:bandwidth].to_space_pretty plan_bw: Site::PLAN_FEATURES[params[:plan_type].to_sym][:bandwidth].pretty
}) })
) )
end end

View file

@ -103,8 +103,8 @@ class Site < Sequel::Model
PLAN_FEATURES[:supporter] = { PLAN_FEATURES[:supporter] = {
name: 'Supporter', name: 'Supporter',
space: Filesize.from('20GB').to_i, space: Filesize.from('50GB'),
bandwidth: Filesize.from('2TB').to_i, bandwidth: Filesize.from('3TB'),
price: 5, price: 5,
unlimited_site_creation: true, unlimited_site_creation: true,
custom_ssl_certificates: true, custom_ssl_certificates: true,
@ -115,8 +115,8 @@ class Site < Sequel::Model
PLAN_FEATURES[:free] = PLAN_FEATURES[:supporter].merge( PLAN_FEATURES[:free] = PLAN_FEATURES[:supporter].merge(
name: 'Free', name: 'Free',
space: Filesize.from('1GB').to_i, space: Filesize.from('1GB'),
bandwidth: Filesize.from('200GB').to_i, bandwidth: Filesize.from('200GB'),
price: 0, price: 0,
unlimited_site_creation: false, unlimited_site_creation: false,
custom_ssl_certificates: false, custom_ssl_certificates: false,
@ -789,7 +789,6 @@ class Site < Sequel::Model
Dir.glob("#{base_files_path}/**/*").each do |path| Dir.glob("#{base_files_path}/**/*").each do |path|
relative_path = path.gsub(base_files_path+'/', '') relative_path = path.gsub(base_files_path+'/', '')
puts "adding #{relative_path}"
if File.directory?(path) if File.directory?(path)
ar.add_dir(zip_name+'/'+relative_path) ar.add_dir(zip_name+'/'+relative_path)
else else
@ -1173,7 +1172,7 @@ class Site < Sequel::Model
end end
def maximum_space def maximum_space
plan_space = PLAN_FEATURES[(parent? ? self : parent).plan_type.to_sym][:space] plan_space = PLAN_FEATURES[(parent? ? self : parent).plan_type.to_sym][:space].to_i
return custom_max_space if custom_max_space > plan_space return custom_max_space if custom_max_space > plan_space

View file

@ -13,15 +13,15 @@
<td class="feature-column"> <td class="feature-column">
<span data-original-title="How much disk space you can use for your site. More space means you can upload more files.">Storage</span> <span data-original-title="How much disk space you can use for your site. More space means you can upload more files.">Storage</span>
</td> </td>
<td><%= Site::PLAN_FEATURES[:free][:space].to_gigabytes_pretty %></td> <td><%= Site::PLAN_FEATURES[:free][:space].to_f('GB').round %> GB</td>
<td><%= (Site::PLAN_FEATURES[:supporter][:space]).to_gigabytes_pretty %></td> <td><%= Site::PLAN_FEATURES[:supporter][:space].to_f('GB').round %> GB</td>
</tr> </tr>
<tr> <tr>
<td class="feature-column"> <td class="feature-column">
<span data-original-title="How much content you can serve in one month. Dont worry—these are soft limits. Temporary surges are fine, we won't take your site down automatically, and we're very flexible.">Bandwidth</span> <span data-original-title="How much content you can serve in one month. Dont worry—these are soft limits. Temporary surges are fine, we won't take your site down automatically, and we're very flexible.">Bandwidth</span>
</td> </td>
<td><%= Site::PLAN_FEATURES[:free][:bandwidth].to_gigabytes_pretty %></td> <td><%= Site::PLAN_FEATURES[:free][:bandwidth].to_f('GB').round %> GB</td>
<td><%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_gigabytes_pretty %></td> <td><%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_f('GB').round %> GB</td>
</tr> </tr>
<tr> <tr>
<td class="feature-column"> <td class="feature-column">
@ -93,6 +93,13 @@
<td><i class="fa fa-check"></i></td> <td><i class="fa fa-check"></i></td>
<td><i class="fa fa-check"></i></td> <td><i class="fa fa-check"></i></td>
</tr> </tr>
<tr>
<td class="feature-column">
<span data-original-title="Our command line tool allows you to easily upload sites from a console.">CLI tool</span>
</td>
<td><i class="fa fa-check"></i></td>
<td><i class="fa fa-check"></i></td>
</tr>
<!-- <!--
<tr> <tr>
<td class="feature-column">Site Tipping (Coming Soon)</td> <td class="feature-column">Site Tipping (Coming Soon)</td>

View file

@ -28,8 +28,8 @@
<div class="price">$<%= Site::PLAN_FEATURES[:free][:price] %></div> <div class="price">$<%= Site::PLAN_FEATURES[:free][:price] %></div>
<ul class="main-features"> <ul class="main-features">
<li><strong><%= Site::PLAN_FEATURES[:free][:space].to_space_pretty %></strong> <span data-original-title="How much space you have to upload files. The more space, the bigger your site can be.">storage</span></li> <li><strong><%= Site::PLAN_FEATURES[:free][:space].to_f('GB').round %> GB</strong> <span data-original-title="How much space you have to upload files. The more space, the bigger your site can be.">storage</span></li>
<li><strong><%= Site::PLAN_FEATURES[:free][:bandwidth].to_space_pretty %></strong> <span data-original-title="How much traffic can visit your site. This is a soft limit. Temporary surges are fine, we won't take your site down automatically, and we're very flexible.">bandwidth</span></li> <li><strong><%= Site::PLAN_FEATURES[:free][:bandwidth].to_f('GB').round %> GB</strong> <span data-original-title="How much traffic can visit your site. This is a soft limit. Temporary surges are fine, we won't take your site down automatically, and we're very flexible.">bandwidth</span></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -55,13 +55,13 @@
<% end %> <% end %>
<ul class="main-features"> <ul class="main-features">
<li><strong><%= (Site::PLAN_FEATURES[:supporter][:space] / (10**6)).to_comma_separated %> MB</strong> <span data-original-title="Much more disk space, so you can build a much bigger web site.">storage</span></li> <li><strong><%= Site::PLAN_FEATURES[:supporter][:space].to_f('GB').round %> GB</strong> <span data-original-title="Much more disk space, so you can build a much bigger web site.">storage</span></li>
<li><strong><%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_bytes_pretty %></strong> <span data-original-title="Tons of bandwidth to serve your site, powered by our high-quality network of servers. This is a soft limit. Temporary surges are fine, we won't take your site down automatically, and we're very flexible.">bandwidth</span></li> <li><strong><%= Site::PLAN_FEATURES[:supporter][:bandwidth].to_f('GB').round %> GB</strong> <span data-original-title="Tons of bandwidth to serve your site, powered by our global Anycast CDN. This is a soft limit. Temporary surges are fine, we won't take your site down automatically, and we're very flexible.">bandwidth</span></li>
</ul> </ul>
<ul> <ul>
<li><span data-original-title="Free plans don't allow uploading music, video, compressed, and executable files to prevent piracy. With a supporter plan, you can upload anything you want.">No File Upload Type Restrictions</span></li> <li><span data-original-title="Free plans don't allow uploading music, video, compressed, and executable files to prevent piracy. With a supporter plan, you can upload anything you want.">No File Upload Type Restrictions</span></li>
<li><span data-original-title="Make as many sites as you want with one account, and easily switch between them.">Unlimited Site Creation</span></li> <li><span data-original-title="Make as many sites as you want, and control them with one account.">Multiple Site Creation</span></li>
<li><span data-original-title="Add your domain name (yoursite.com) to your site!">Custom Domain Support</span></li> <li><span data-original-title="Add your domain name (yoursite.com) to your site!">Custom Domain Support</span></li>
<li><span data-original-title="With WebDAV, you can mount your Neocities site to your computer as a hard drive, making it easy to update with your favorite HTML editor.">Remote Filesystem Support</span></li> <li><span data-original-title="With WebDAV, you can mount your Neocities site to your computer as a hard drive, making it easy to update with your favorite HTML editor.">Remote Filesystem Support</span></li>
</ul> </ul>