diff --git a/gulpfile.js b/gulpfile.js
index 6241af60..f71621a9 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -81,8 +81,8 @@ gulp.task("webpack-dev-server", function () {
gulp.task("styles-app", function () {
var includedStyles = [
- "resources/assets/styles/base/colorbox.css",
- "resources/assets/styles/app.less"
+ "node_modules/angular-material/angular-material.css",
+ "resources/assets/styles/app.less",
];
if (!argv.production) {
@@ -108,30 +108,32 @@ gulp.task("styles-app", function () {
// note that we're not doing autoprefixer on dev builds for now to shave off roughly 600-700 milliseconds per
// build. It's already taking forever to recompile the less
- return argv.production
+ if (argv.production) {
// Production pipeline
- ? gulp.src(includedStyles, {base: "resources/assets/styles"})
- .pipe(plug.plumber(plumberOptions))
- .pipe(plug.if(/\.less/, plug.less()))
- .pipe(plug.autoprefixer({
- browsers: ["last 2 versions"],
- cascade: false
- }))
- .pipe(plug.concat("app.css"))
- .pipe(plug.cleanCss())
- .pipe(header(licenseHeader))
- .pipe(gulp.dest("public/build/styles"))
-
+ return gulp.src(includedStyles)
+ .pipe(plug.plumber(plumberOptions))
+ .pipe(plug.if(/\.less/, plug.less()))
+ .pipe(plug.autoprefixer({
+ browsers: ["last 2 versions"],
+ cascade: false
+ }))
+ .pipe(plug.concat("app.css"))
+ .pipe(plug.cleanCss())
+ .pipe(header(licenseHeader))
+ .pipe(gulp.dest("public/build/styles"));
+ } else {
// Development pipeline
- : gulp.src(includedStyles, {base: "resources/assets/styles"})
- .pipe(plug.plumber(plumberOptions))
- .pipe(plug.cached("styles"))
- .pipe(plug.sourcemaps.init())
- .pipe(plug.if(/\.less/, plug.less()))
- .pipe(header(licenseHeader))
- .pipe(plug.sourcemaps.write())
- .pipe(gulp.dest("public/build/styles"))
- .pipe(plug.livereload());
+ return gulp.src(includedStyles)
+ .pipe(plug.plumber(plumberOptions))
+ .pipe(plug.cached("styles"))
+ .pipe(plug.sourcemaps.init())
+ .pipe(plug.if(/\.less/, plug.less()))
+ .pipe(plug.concat("app.css"))
+ .pipe(header(licenseHeader))
+ .pipe(plug.sourcemaps.write())
+ .pipe(gulp.dest("public/build/styles"))
+ .pipe(plug.livereload());
+ }
});
gulp.task("styles-embed", function () {
diff --git a/public/templates/directives/favourite-button.html b/public/templates/directives/favourite-button.html
index f9778b26..649bab6e 100644
--- a/public/templates/directives/favourite-button.html
+++ b/public/templates/directives/favourite-button.html
@@ -1,10 +1,10 @@
-
-
- Favourite This!
- favorite_border
-
-
- In Your Favourites
- favorite
-
-
+
+
+ Favourite
+ favorite_border
+
+
+ In your favourites
+ favorite
+
+
diff --git a/public/templates/partials/credits-dialog.html b/public/templates/partials/credits-dialog.html
index a8a860b1..039f3390 100644
--- a/public/templates/partials/credits-dialog.html
+++ b/public/templates/partials/credits-dialog.html
@@ -2,7 +2,6 @@
@@ -59,6 +58,6 @@
- Close
+ Close
diff --git a/public/templates/partials/playlist-share-dialog.html b/public/templates/partials/playlist-share-dialog.html
index 4f9e630e..12ed5fac 100644
--- a/public/templates/partials/playlist-share-dialog.html
+++ b/public/templates/partials/playlist-share-dialog.html
@@ -1,19 +1,16 @@
-
-
-
-
-
-
Shortlink
-
-
-
+
+
+
-
-
+
+
Shortlink
+
+
+
+
+ Close
+
+
diff --git a/public/templates/partials/track-share-dialog.html b/public/templates/partials/track-share-dialog.html
index 376359f0..726dbb6d 100644
--- a/public/templates/partials/track-share-dialog.html
+++ b/public/templates/partials/track-share-dialog.html
@@ -1,25 +1,19 @@
-
-
+
+
+ Close
+
+
diff --git a/public/templates/tracks/frame.html b/public/templates/tracks/frame.html
index 440368a9..56c4912b 100644
--- a/public/templates/tracks/frame.html
+++ b/public/templates/tracks/frame.html
@@ -1,65 +1,53 @@
diff --git a/resources/assets/scripts/app/controllers/track.coffee b/resources/assets/scripts/app/controllers/track.coffee
index 0fffda05..56a1b53c 100644
--- a/resources/assets/scripts/app/controllers/track.coffee
+++ b/resources/assets/scripts/app/controllers/track.coffee
@@ -15,8 +15,8 @@
# along with this program. If not, see .
module.exports = angular.module('ponyfm').controller "track", [
- '$scope', 'meta', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$modal', 'download-cached', '$window', '$timeout'
- ($scope, meta, tracks, $state, playlists, auth, favourites, $modal, cachedTrack, $window, $timeout) ->
+ '$scope', 'meta', 'tracks', '$state', 'playlists', 'auth', 'favourites', '$modal', 'download-cached', '$window', '$timeout', '$mdDialog'
+ ($scope, meta, tracks, $state, playlists, auth, favourites, $modal, cachedTrack, $window, $timeout, $mdDialog) ->
$scope.track
$scope.trackId = parseInt($state.params.id)
@@ -52,15 +52,19 @@ module.exports = angular.module('ponyfm').controller "track", [
track.is_favourited = res.is_favourited
$scope.favouriteWorking = false
- $scope.share = () ->
- dialog = $modal
+ $scope.share = (ev) ->
+ $mdDialog.show(
templateUrl: '/templates/partials/track-share-dialog.html',
- controller: ['$scope', ($localScope) ->
- $localScope.track = $scope.track
- $localScope.close = () ->
- dialog.$hide()
- ],
- show: true
+ scope: $scope,
+ clickOutsideToClose: true,
+ controller: ($scope, $mdDialog) ->
+ $scope.closeDialog = ->
+ $mdDialog.cancel()
+ ).then (() ->
+ return
+ ), ->
+ console.log $state.current
+ $scope.$apply()
$scope.addToNewPlaylist = () ->
dialog = $modal
@@ -91,6 +95,14 @@ module.exports = angular.module('ponyfm').controller "track", [
$scope.getCachedTrack = (id, format) ->
$scope.isInProgress = true
+ $mdDialog.show(
+ $mdDialog.alert()
+ .clickOutsideToClose(true)
+ .title('Preparing download...')
+ .textContent('We\'re getting your download ready! This\'ll take a few seconds.')
+ .ok('Sure thing')
+ )
+
cachedTrack.download('tracks', id, format).then (response) ->
$scope.trackUrl = response
if $scope.trackUrl == 'error'
diff --git a/resources/assets/scripts/shared/layout.coffee b/resources/assets/scripts/shared/layout.coffee
index 997c19cb..4b706617 100644
--- a/resources/assets/scripts/shared/layout.coffee
+++ b/resources/assets/scripts/shared/layout.coffee
@@ -33,7 +33,7 @@ window.handleResize = () ->
$this.css
'max-height': newMaxHeight
- $('.stretch-to-bottom').each () ->
+ $('ui-view').each () ->
$this = $ this
newHeight = windowHeight - $this.offset().top
if isMobile
diff --git a/resources/assets/styles/app.less b/resources/assets/styles/app.less
index f5b2414c..8e45949e 100644
--- a/resources/assets/styles/app.less
+++ b/resources/assets/styles/app.less
@@ -16,9 +16,7 @@
* along with this program. If not, see .
*/
-@import 'https://fonts.googleapis.com/css?family=Roboto:400,400i,700|Material+Icons';
@import 'base/bootstrap/bootstrap';
-@import (less) '../../../node_modules/angular-material/angular-material.min.css';
@import 'variables';
@import 'mixins';
@import 'layout';
diff --git a/resources/assets/styles/forms.less b/resources/assets/styles/forms.less
index 82dbfd3b..45c587ef 100644
--- a/resources/assets/styles/forms.less
+++ b/resources/assets/styles/forms.less
@@ -43,3 +43,13 @@ input[type="text"], input[type="password"], input[type="date"], input[type="numb
background: @btn-danger-bg;
}
}
+
+.modal-dialog {
+ h2 {
+ margin-top: 0;
+ margin-bottom: 20px;
+ }
+ input, textarea {
+ width: 100%;
+ }
+}
diff --git a/resources/assets/styles/layout.less b/resources/assets/styles/layout.less
index 9a8cb3f3..f9984e47 100644
--- a/resources/assets/styles/layout.less
+++ b/resources/assets/styles/layout.less
@@ -370,3 +370,15 @@ md-input-container#title {
._md-select-menu-container {
z-index: 100;
}
+
+md-backdrop {
+ position: fixed;
+}
+
+.buttons {
+ margin-bottom: 10px;
+
+ .md-menu {
+ padding: 0;
+ }
+}
diff --git a/resources/assets/styles/mobile.less b/resources/assets/styles/mobile.less
index 4d8fa3be..f89758b9 100644
--- a/resources/assets/styles/mobile.less
+++ b/resources/assets/styles/mobile.less
@@ -433,6 +433,10 @@
.account-tabs {
margin: -49px 0px 5px;
}
+
+ .modal-dialog {
+ width: 95%;
+ }
}
// Super small phones like the iPhone 5
@@ -491,6 +495,9 @@
}
}
}
+ .modal-dialog {
+ width: 100%;
+ }
}
@media only screen and (max-height: 500px) {
diff --git a/resources/views/shared/_layout.blade.php b/resources/views/shared/_layout.blade.php
index 1c6bbc67..7a190e43 100644
--- a/resources/views/shared/_layout.blade.php
+++ b/resources/views/shared/_layout.blade.php
@@ -26,6 +26,7 @@
+
@yield('styles')