Merge branch 'master' of https://bitbucket.org/yackob03/quay
This commit is contained in:
commit
2ae4dbd9fa
17 changed files with 300 additions and 65 deletions
|
@ -115,7 +115,7 @@
|
|||
margin-top: -20px;
|
||||
margin-bottom: 0px;
|
||||
|
||||
padding-top: 66px;
|
||||
padding-top: 46px;
|
||||
|
||||
min-height: 440px;
|
||||
}
|
||||
|
@ -137,11 +137,36 @@
|
|||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.form-signup input.ng-invalid.ng-dirty {
|
||||
.signin-buttons {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.landing-signup-button {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.landing-social-alternate {
|
||||
color: #777;
|
||||
font-size: 2em;
|
||||
margin-left: 43px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.landing-social-alternate .inner-text {
|
||||
text-align: center;
|
||||
position: relative;
|
||||
color: white;
|
||||
left: -43px;
|
||||
top: -9px;
|
||||
font-weight: bold;
|
||||
font-size: .4em;
|
||||
}
|
||||
|
||||
form input.ng-invalid.ng-dirty {
|
||||
background-color: #FDD7D9;
|
||||
}
|
||||
|
||||
.form-signup input.ng-valid.ng-dirty {
|
||||
form input.ng-valid.ng-dirty {
|
||||
background-color: #DDFFEE;
|
||||
}
|
||||
|
||||
|
@ -201,7 +226,7 @@
|
|||
@media (max-height: 768px) {
|
||||
.landing {
|
||||
padding: 20px;
|
||||
padding-top: 46px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -687,6 +712,11 @@ p.editable:hover i {
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.user-admin .form-change-pw input {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
#image-history-container .node circle {
|
||||
cursor: pointer;
|
||||
fill: #fff;
|
||||
|
|
|
@ -5,7 +5,8 @@ quayApp = angular.module('quay', ['restangular', 'angularMoment', 'angulartics',
|
|||
verified: false,
|
||||
anonymous: true,
|
||||
username: null,
|
||||
email: null
|
||||
email: null,
|
||||
askForPassword: false,
|
||||
}
|
||||
|
||||
var userService = {}
|
||||
|
@ -22,6 +23,9 @@ quayApp = angular.module('quay', ['restangular', 'angularMoment', 'angulartics',
|
|||
'$username': userResponse.username,
|
||||
'verified': userResponse.verified
|
||||
});
|
||||
mixpanel.people.set_once({
|
||||
'$created': new Date()
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -41,8 +45,10 @@ quayApp = angular.module('quay', ['restangular', 'angularMoment', 'angulartics',
|
|||
|
||||
if ($location.host() === 'quay.io') {
|
||||
keyService['stripePublishableKey'] = 'pk_live_P5wLU0vGdHnZGyKnXlFG4oiu';
|
||||
keyService['githubClientId'] = '5a8c08b06c48d89d4d1e';
|
||||
} else {
|
||||
keyService['stripePublishableKey'] = 'pk_test_uEDHANKm9CHCvVa2DLcipGRh';
|
||||
keyService['githubClientId'] = 'cfbc4aca88e5c1b40679';
|
||||
}
|
||||
|
||||
return keyService;
|
||||
|
@ -116,6 +122,8 @@ quayApp = angular.module('quay', ['restangular', 'angularMoment', 'angulartics',
|
|||
|
||||
$analyticsProvider.virtualPageviews(true);
|
||||
|
||||
$locationProvider.html5Mode(true);
|
||||
|
||||
$routeProvider.
|
||||
when('/repository/:namespace/:name', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}).
|
||||
when('/repository/:namespace/:name/tag/:tag', {templateUrl: '/static/partials/view-repo.html', controller: RepoCtrl}).
|
||||
|
|
|
@ -130,7 +130,7 @@ function RepoListCtrl($scope, Restangular, UserService) {
|
|||
});
|
||||
}
|
||||
|
||||
function LandingCtrl($scope, $timeout, Restangular, UserService) {
|
||||
function LandingCtrl($scope, $timeout, Restangular, UserService, KeyService) {
|
||||
$('.form-signup').popover();
|
||||
|
||||
$scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) {
|
||||
|
@ -141,6 +141,13 @@ function LandingCtrl($scope, $timeout, Restangular, UserService) {
|
|||
$scope.user = currentUser;
|
||||
}, true);
|
||||
|
||||
angulartics.waitForVendorApi(mixpanel, 500, function(loadedMixpanel) {
|
||||
var mixpanelId = loadedMixpanel.get_distinct_id();
|
||||
$scope.github_state_clause = '&state=' + mixpanelId;
|
||||
});
|
||||
|
||||
$scope.githubClientId = KeyService.githubClientId;
|
||||
|
||||
$scope.awaitingConfirmation = false;
|
||||
$scope.registering = false;
|
||||
|
||||
|
@ -162,12 +169,6 @@ function LandingCtrl($scope, $timeout, Restangular, UserService) {
|
|||
$scope.registering = false;
|
||||
|
||||
mixpanel.alias($scope.newUser.username);
|
||||
mixpanel.people.set_once({
|
||||
'$email': $scope.newUser.email,
|
||||
'$username': $scope.newUser.username,
|
||||
'$created': new Date(),
|
||||
'verified': false
|
||||
});
|
||||
}, function(result) {
|
||||
$scope.registering = false;
|
||||
$scope.registerError = result.data.message;
|
||||
|
@ -468,9 +469,13 @@ function RepoAdminCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
});
|
||||
}
|
||||
|
||||
function UserAdminCtrl($scope, Restangular, PlanService, KeyService, $routeParams) {
|
||||
function UserAdminCtrl($scope, $timeout, Restangular, PlanService, UserService, KeyService, $routeParams) {
|
||||
$scope.plans = PlanService.planList();
|
||||
|
||||
$scope.$watch(function () { return UserService.currentUser(); }, function (currentUser) {
|
||||
$scope.askForPassword = currentUser.askForPassword;
|
||||
}, true);
|
||||
|
||||
var subscribedToPlan = function(sub) {
|
||||
$scope.subscription = sub;
|
||||
$scope.subscribedPlan = PlanService.getPlan(sub.plan);
|
||||
|
@ -557,4 +562,33 @@ function UserAdminCtrl($scope, Restangular, PlanService, KeyService, $routeParam
|
|||
$scope.subscribe(requested);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.updatingUser = false;
|
||||
$scope.changePasswordSuccess = false;
|
||||
$('.form-change-pw').popover();
|
||||
|
||||
$scope.changePassword = function() {
|
||||
$('.form-change-pw').popover('hide');
|
||||
$scope.updatingUser = true;
|
||||
$scope.changePasswordSuccess = false;
|
||||
var changePasswordPost = Restangular.one('user/');
|
||||
changePasswordPost.customPUT($scope.user).then(function() {
|
||||
$scope.updatingUser = false;
|
||||
$scope.changePasswordSuccess = true;
|
||||
|
||||
// Reset the form
|
||||
$scope.user.password = '';
|
||||
$scope.user.repeatPassword = '';
|
||||
$scope.changePasswordForm.$setPristine();
|
||||
|
||||
UserService.load();
|
||||
}, function(result) {
|
||||
$scope.updatingUser = false;
|
||||
|
||||
$scope.changePasswordError = result.data.message;
|
||||
$timeout(function() {
|
||||
$('.form-change-pw').popover('show');
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
<div ng-show="user.anonymous">
|
||||
<h1>Secure hosting for <b>private</b> docker repositories</h1>
|
||||
<h3>Use the docker images <b>your team</b> needs with the safety of <b>private</b> repositories</h3>
|
||||
<div class="sellcall"><a href="#/plans">Private repository plans starting at $7/mo</a></div>
|
||||
<div class="sellcall"><a href="/plans">Private repository plans starting at $7/mo</a></div>
|
||||
</div>
|
||||
|
||||
<div ng-show="!user.anonymous">
|
||||
|
@ -16,7 +16,7 @@
|
|||
<h2>Your Top Repositories</h2>
|
||||
<div class="repo-listing" ng-repeat="repository in myrepos">
|
||||
<i class="icon-hdd icon-large"></i>
|
||||
<a ng-href="#/repository/{{repository.namespace}}/{{ repository.name }}">{{repository.namespace}}/{{repository.name}}</a>
|
||||
<a ng-href="/repository/{{repository.namespace}}/{{ repository.name }}">{{repository.namespace}}/{{repository.name}}</a>
|
||||
<div class="description" ng-bind-html-unsafe="getCommentFirstLine(repository.description)"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,9 +25,9 @@
|
|||
You don't have any <b>private</b> repositories yet!
|
||||
|
||||
<div class="options">
|
||||
<div class="option"><a href="#/guide">Learn how to create a repository</a></div>
|
||||
<div class="option"><a href="/guide">Learn how to create a repository</a></div>
|
||||
<div class="or"><span>or</span></div>
|
||||
<div class="option"><a href="#/repository">Browse the public repositories</a></div>
|
||||
<div class="option"><a href="/repository">Browse the public repositories</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,9 +40,14 @@
|
|||
<input type="text" class="form-control" placeholder="Create a username" name="username" ng-model="newUser.username" autofocus required>
|
||||
<input type="email" class="form-control" placeholder="Email address" ng-model="newUser.email" required>
|
||||
<input type="password" class="form-control" placeholder="Create a password" ng-model="newUser.password" required>
|
||||
<input type="password" class="form-control" placeholder="Verify your password" ng-model="newUser.repeatePassword" match="newUser.password" required>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-lg btn-primary btn-block" ng-disabled="signupForm.$invalid" type="submit" analytics-on analytics-event="register">Sign Up for Free!</button>
|
||||
<input type="password" class="form-control" placeholder="Verify your password" ng-model="newUser.repeatPassword" match="newUser.password" required>
|
||||
<div class="form-group signin-buttons">
|
||||
<button class="btn btn-primary btn-block landing-signup-button" ng-disabled="signupForm.$invalid" type="submit" analytics-on analytics-event="register">Sign Up for Free!</button>
|
||||
<span class="landing-social-alternate">
|
||||
<i class="icon-circle"></i>
|
||||
<span class="inner-text">OR</span>
|
||||
</span>
|
||||
<a href="https://github.com/login/oauth/authorize?client_id={{ githubClientId }}&scope=user:email{{ github_state_clause }}" class="btn btn-primary btn-block"><i class="icon-github icon-large"></i> Sign In with GitHub</a>
|
||||
<p class="help-block">No credit card required.</p>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -152,7 +157,7 @@
|
|||
<h4>Support</h4>
|
||||
<ul>
|
||||
<li><a href="mailto:support@quay.io">Contact Support</a></li>
|
||||
<li><a href="#/guide/">Getting Started Guide</a></li>
|
||||
<li><a href="/guide/">Getting Started Guide</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="container repo repo-admin" ng-show="!loading && repo && permissions">
|
||||
<div class="header">
|
||||
<a href="{{ '#/repository/' + repo.namespace + '/' + repo.name }}" class="back"><i class="icon-chevron-left"></i></a>
|
||||
<a href="{{ '/repository/' + repo.namespace + '/' + repo.name }}" class="back"><i class="icon-chevron-left"></i></a>
|
||||
<h3>
|
||||
<i class="icon-hdd icon-large"></i> <span style="color: #aaa;"> {{repo.namespace}}</span> <span style="color: #ccc">/</span> {{repo.name}}
|
||||
</h3>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div ng-show="private_repositories.length > 0">
|
||||
<div class="repo-listing" ng-repeat="repository in private_repositories">
|
||||
<i class="icon-hdd icon-large"></i>
|
||||
<a ng-href="#/repository/{{repository.namespace}}/{{ repository.name }}">{{repository.namespace}}/{{repository.name}}</a>
|
||||
<a ng-href="/repository/{{repository.namespace}}/{{ repository.name }}">{{repository.namespace}}/{{repository.name}}</a>
|
||||
<div class="description" ng-bind-html-unsafe="getCommentFirstLine(repository.description)"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<div ng-show="private_repositories.length == 0" style="padding:20px;">
|
||||
<div class="alert alert-info">
|
||||
<h4>You don't have any repositories yet!</h4>
|
||||
<a href="#/guide"><b>Click here</b> to learn how to create a repository</a>
|
||||
<a href="/guide"><b>Click here</b> to learn how to create a repository</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<h3>Top Public Repositories</h3>
|
||||
<div class="repo-listing" ng-repeat="repository in public_repositories">
|
||||
<i class="icon-hdd icon-large"></i>
|
||||
<a ng-href="#/repository/{{repository.namespace}}/{{ repository.name }}">{{repository.namespace}}/{{repository.name}}</a>
|
||||
<a ng-href="/repository/{{repository.namespace}}/{{ repository.name }}">{{repository.namespace}}/{{repository.name}}</a>
|
||||
<div class="description" ng-bind-html-unsafe="getCommentFirstLine(repository.description)"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
<div class="alert alert-danger">{{ errorMessage }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" ng-show="askForPassword">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">Your account does not currently have a password. You will need to create a password before you will be able to <strong>push</strong> or <strong>pull</strong> repositories.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" ng-hide="planLoading">
|
||||
<div class="col-md-3" ng-repeat='plan in plans'>
|
||||
<div class="panel" ng-class="{'panel-success': subscription.plan == plan.stripeId, 'panel-default': subscription.plan != plan.stripeId}">
|
||||
|
@ -52,4 +57,24 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="loading" ng-show="updatingUser">
|
||||
<i class="icon-spinner icon-spin icon-3x"></i>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Change Password
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-change-pw" name="changePasswordForm" ng-submit="changePassword()" data-trigger="manual" data-content="{{ changePasswordError }}" data-placement="right" ng-show="!awaitingConfirmation && !registering">
|
||||
<input type="password" class="form-control" placeholder="Your new password" ng-model="user.password" required>
|
||||
<input type="password" class="form-control" placeholder="Verify your new password" ng-model="user.repeatPassword" match="user.password" required>
|
||||
<button class="btn btn-danger" ng-disabled="changePasswordForm.$invalid" type="submit" analytics-on analytics-event="register">Change Password</button>
|
||||
<span class="help-block" ng-show="changePasswordSuccess">Password changed successfully</span>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<span style="color: #aaa;"> {{repo.namespace}}</span> <span style="color: #ccc">/</span> {{repo.name}}
|
||||
|
||||
<span class="settings-cog" ng-show="repo.can_admin" title="Repository Settings">
|
||||
<a href="{{ '#/repository/' + repo.namespace + '/' + repo.name + '/admin' }}">
|
||||
<a href="{{ '/repository/' + repo.namespace + '/' + repo.name + '/admin' }}">
|
||||
<i class="icon-cog icon-large"></i>
|
||||
</a>
|
||||
</span>
|
||||
|
|
Reference in a new issue