Skip to content

Commit

Permalink
Put upgrade behind upgrade feature
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Jul 18, 2014
1 parent e6b853d commit 1f446cd
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/features.js
Expand Up @@ -116,7 +116,7 @@ var flags = {
fileMenuTest: true, // live 2014-05-27 - #1414

upgrade: function (req) { // we're able to take payments from July 15, 2014
return alpha(req) || Date.now() > new Date('2014-07-13T00:00:00').getTime();
return alpha(req); // || Date.now() > new Date('2014-07-13T00:00:00').getTime();
},

// top introduction view with help and features of JS Bin
Expand Down
24 changes: 18 additions & 6 deletions public/css/style.css
Expand Up @@ -3364,7 +3364,7 @@ a.active:hover {
/* margin: 3px 5px; */
background: white;
box-shadow: 1px 3px 7px rgba(0, 0, 0, 0.1);
border: 1px solid #CCC;
border: 1px solid rgb(204, 204, 204);
height: auto;
/* border-radius: 5px; */
text-align: left;
Expand Down Expand Up @@ -5255,11 +5255,23 @@ a[data-pro]:hover:after {

.gopro { /* not the camera...silly */
text-decoration: none;
margin-right: 5px;
margin-top: 3px;
position: relative;
width: 100%;
display: block;
margin: 0;
background: rgb(39, 192, 39);
font-size: 15px;
text-align: center;
margin-top: -2px;
color: white;
color: white;
border: 1px solid #ccc;
box-sizing: border-box;
border-top: 0;
box-shadow: 1px 3px 7px rgba(0, 0, 0, 0.1);
line-height: 30px;
}

.gopro:hover { /* not the camera...silly */
color: #999;
border-color: #999;
.gopro:hover {
background: rgb(3, 166, 3);
}
2 changes: 2 additions & 0 deletions views/account/preferences.html
Expand Up @@ -7,6 +7,7 @@ <h1>Default Preferences</h1>

<form>
<form id="editor-settings">
{{#feature request "upgrade"}}
<h3>Security</h3>

<div>
Expand All @@ -15,6 +16,7 @@ <h3>Security</h3>
</div>

<p><small>Note that by enabling SSL for all of JS Bin, including non-https assets in your bins will cause the iframe <em>not</em> to render. This is the correct behaviour for https frames containing non-secure content. <a href="http://jsbin.com/help/ssl">Read more</a>.</small></p>
{{/feature}}

{{#feature request "assets"}}
<h3>Custom content</h3>
Expand Down
2 changes: 2 additions & 0 deletions views/account/profile.html
Expand Up @@ -36,6 +36,7 @@ <h2>Third party applications</h2>
{{/if}}
{{/feature}}

{{#feature request "upgrade"}}
{{#feature request "dropbox"}}
{{#if user.dropbox_token}}
<li class="link-container success"><strong>Dropbox automatic exporting</strong> &ndash; complete &#10004; (<a href="{{root}}/auth/dropbox">re-link</a>)</li>
Expand All @@ -45,6 +46,7 @@ <h2>Third party applications</h2>
{{else}}
<li class="link-container"><strong>Export your bins to Dropbox</strong> &ndash; <a href="/account/upgrade"><span class="pro-required">Pro</span></a> <a href="/account/upgrade">account required</a></li>
{{/feature}}
{{/feature}}
</ul>
</section>
<link href="{{static}}/css/account-profile.css" rel="stylesheet" type="text/css"/>
Expand Down
18 changes: 12 additions & 6 deletions views/index.html
Expand Up @@ -46,7 +46,9 @@ <h1>JS Bin</h1></a><a href="/clone" target="_blank" class="button">Save</a>
<a id="public" data-desc="Set this bin to public" class="visibilityToggle button group" title="Set this bin to public" href="{{root}}" data-label="public" data-vis="public">Make bin public</a>
<a id="private" data-desc="Set this bin to private" class="visibilityToggle button group" title="Set this bin to private" href="{{root}}" data-label="private" data-vis="private">Make bin private</a>
{{else}}
{{#feature request "upgrade"}}
<a data-desc="Set this bin to private" data-pro="true" class="button group" title="Set this bin to private" href="{{root}}/account/upgrade">Make bin private</a>
{{/feature}}
{{/feature}}
{{#feature request "delete"}}
<a class="deletebin button group" data-desc="Delete bin" title="Delete this bin" href="{{root}}/delete" data-shortcut="ctrl+shift+del">Delete</a>
Expand All @@ -61,10 +63,12 @@ <h1>JS Bin</h1></a><a href="/clone" target="_blank" class="button">Save</a>
<a title="Create milestone" data-desc="Save current work, and begin new revision on next change" data-shortcut="ctrl+s" class="button save group" data-label="save" href="{{root}}/save">Create milestone</a>
<a data-desc="Copy and create a new bin start at revision #1" data-shortcut="ctrl+shift+s" id="clone" title="Create a new copy" class="button clone group" data-label="clone" href="{{root}}/clone">Clone</a>
<hr data-desc="">
{{#feature request "vanity"}}
{{#feature request "upgrade"}}
{{#feature request "vanity"}}
<a data-desc="Publish the current bin to {{vanity}}" class="publish-to-vanity button group" title="Publish the current bin to {{vanity}}" href="{{root}}/account/bookmark/vanity">Publish to vanity homepage</a>
{{else}}
{{else}}
<a data-pro="true" data-desc="Publish the current bin to {{vanity}}" class="button group" title="Publish the current bin to {{vanity}}" href="{{root}}/account/upgrade">Publish to vanity homepage</a>
{{/feature}}
{{/feature}}
<a data-desc="Export individual panels to Github's gist{{#unless user.github_token}} as an anonymous user{{/unless}}" class="export-as-gist button group" title="Create a new {{#unless user.github_token}}anonymous {{/unless}}GitHub Gist from this bin" href="#export-to-gist">Export as gist</a>
<a data-desc="Download a complete html file for this bin" id="download" title="Save to local drive" class="button download group" href="{{root}}/download" data-label="download">Download</a>
Expand Down Expand Up @@ -128,17 +132,19 @@ <h1>JS Bin</h1></a><a href="/clone" target="_blank" class="button">Save</a>
@{{home}}{{#if user.pro}}<sup class="pro">pro</sup>{{/if}}
</span>

{{#unless user.pro}}
<a href="/account/upgrade" class="gopro pro-required">Go Pro</a>
{{/unless}}

<ul>
<li><a href="/account/profile">Update profile</a></li>
<li><a href="/account/editor">Editor settings</a></li>
<li><a href="/account/preferences">Preferences</a></li>
<li><a href="/logout">Logout</a></li>
</ul>

</div>
{{#feature request "upgrade"}}
{{#unless user.pro}}
<a href="/account/upgrade" class="gopro">Support JS Bin: upgrade to PRO</a>
{{/unless}}
{{/feature}}
</div>
</div>
{{else}}
Expand Down

0 comments on commit 1f446cd

Please sign in to comment.