Skip to content

Commit

Permalink
Some doc related stuff
Browse files Browse the repository at this point in the history
* Spread some more icons around
* Add max file size upload value to mustache and show on script/lib upload page as an info alert. Mentioned at #OpenUserJS#360 (comment)

Applies to OpenUserJS#186
  • Loading branch information
Martii committed Oct 22, 2014
1 parent 3349d9c commit 5e30026
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ exports.newScriptPage = function (aReq, aRes, aNext) {
options.newUserJS = true;
options.newScriptEditorPageUrl = '/user/add/scripts/new';
options.uploadNewScriptPageUrl = '/user/add/scripts/upload';
options.maximumUploadScriptSize = settings.maximum_upload_script_size;

// Page metadata
pageMetadata(options, 'New Script');
Expand Down Expand Up @@ -753,6 +754,7 @@ exports.newLibraryPage = function (aReq, aRes, aNext) {
options.newJSLibrary = true;
options.newScriptEditorPageUrl = '/user/add/lib/new';
options.uploadNewScriptPageUrl = '/user/add/lib/upload';
options.maximumUploadScriptSize = settings.maximum_upload_script_size;

// Page metadata
pageMetadata(options, 'New Library');
Expand Down
2 changes: 1 addition & 1 deletion views/pages/loginPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h3>
</span>
</div>
<div class="alert alert-warning" role="alert">
<strong>CAUTION</strong>: The unique Username that you choose to sign up with here will be displayed to everyone. It is strongly recommended to <strong>not</strong> use an email address.
<i class="fa fa-exclamation-triangle"></i> <strong>CAUTION</strong>: The unique Username that you choose to sign up with here will be displayed to everyone. It is strongly recommended to <strong>not</strong> use an email address.
</div>
</form>
</div>
Expand Down
7 changes: 5 additions & 2 deletions views/pages/newScriptPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4 class="list-group-item-heading"><code>@icon url</code></h4>
</div>
<div class="list-group-item active">
<h4 class="list-group-item-heading"><code>@license License Type; License Homepage</code></h4>
<p class="list-group-item-text">Specially formatted on the script page. All values shown in reverse order. If absent MIT License (Expat) is implied.</p>
<p class="list-group-item-text">Specially formatted on the script page. All values shown in reverse order. If absent MIT License (Expat) is implied. See <a href="/about/Terms-of-Service#licensing">licensing terms</a> for specifics.</p>
</div>
<div class="list-group-item active">
<h4 class="list-group-item-heading"><code>@homepageURL url</code></h4>
Expand Down Expand Up @@ -72,7 +72,7 @@ <h2><i class="fa fa-question"></i> Library Docs</h2>
<div class="panel panel-default">
<div class="panel-body">
<h3>OpenUserJS.org Supported</h3>
<p>Any <a href="/about/Userscript-Beginners-HOWTO#what-is-a-userscript-">UserScript</a> on OpenUserJS.org that <code>//@require</code>'s libraries from OpenUserJS.org will link to the library on the UserScript page.</p>
<p>Any UserScript on OpenUserJS.org that <code>//@require</code>'s libraries from OpenUserJS.org will link to the library on the UserScript page.</p>
</div>
</div>
{{/newJSLibrary}}
Expand Down Expand Up @@ -125,6 +125,9 @@ <h4 class="list-group-item-heading"><i class="octicon octicon-fw octicon-repo-cl
Click here to import a script<em>(s)</em> from a GitHub repository.
</p>
</a>
<div role="alert" class="alert alert-info">
<i class="octicon octicon-fw octicon-info"></i> <strong>LIMITS</strong>: The current upload size limit is set at <span class="label label-default">{{maximumUploadScriptSize}} bytes</span> per script.
</div>
</div>
</div>
<div class="col-md-4">
Expand Down

0 comments on commit 5e30026

Please sign in to comment.