From a2063c9de1fb29f79c7e8cff843e15725b216eec Mon Sep 17 00:00:00 2001 From: nelsonlaquet Date: Sun, 1 Sep 2013 04:17:53 -0500 Subject: [PATCH] Fixed display of things --- public/asset.php | 6 +++++- public/scripts/app/services/upload.coffee | 2 +- public/templates/uploader/index.html | 13 ++++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/public/asset.php b/public/asset.php index a9cc17ac..ce56ef1c 100644 --- a/public/asset.php +++ b/public/asset.php @@ -42,10 +42,14 @@ $bundle->ensureFilter(new UglifyCssFilter(Config::get('app.uglify-css'), Config::get('app.node'))); $bundle->setTargetPath('styles'); } else { + $node = Config::get('app.node'); + if ($node == null) + $node = 'node'; + $filePath = trim($_GET['file'], '/'); $lastModifiedCollection = new AssetCollection([new GlobAsset("styles/*.less")]); $bundle = new AssetCollection([new FileAsset($filePath), new CacheBusterAsset($lastModifiedCollection->getLastModified())], - [new LessFilter(Config::get('app.node'), Config::get('app.node_paths'))]); + [new LessFilter($node, Config::get('app.node_paths'))]); $bundle->setTargetPath($filePath); } diff --git a/public/scripts/app/services/upload.coffee b/public/scripts/app/services/upload.coffee index 00c2a959..b21ebcdf 100644 --- a/public/scripts/app/services/upload.coffee +++ b/public/scripts/app/services/upload.coffee @@ -31,7 +31,7 @@ angular.module('ponyfm').factory('upload', [ if xhr.status != 200 error = if xhr.getResponseHeader('content-type') == 'application/json' - $.parseJSON(xhr.responseText).message + $.parseJSON(xhr.responseText).errors.track.join ', ' else 'There was an unknown error!' diff --git a/public/templates/uploader/index.html b/public/templates/uploader/index.html index 70f39dd6..3ee7d0c7 100644 --- a/public/templates/uploader/index.html +++ b/public/templates/uploader/index.html @@ -3,13 +3,21 @@

Drop files here to begin your upload!

+

FLAC, WAV, and AIFF files will be accepted. Each file can be up to 200 MB in size.

+ +

Tracks must be a minimum of 30 seconds long.

+ +

Please note that you need to publish your tracks after uploading them before they will become available to the public.

+